text: /*!
   * OpenUI5
   * (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
   * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
   */
  sap.ui.define(["sap/m/OverflowToolbarLayoutData","sap/base/Log","sap/m/library"],function(O,L,l){"use strict";var a=l.OverflowToolbarPriority;var A=function(){if(!this.isA("sap.ui.core.Element")){return;}this._prepareNewAdditionalControl=function(c){if(!c.getLayoutData()){c.setLayoutData(new O({priority:a.Low}));}return c;};this.addAdditionalContent=function(c){this.validateAggregation("additionalContent",c,true);if(this.indexOfAdditionalContent(c)!==-1){L.warning("Object"+c+" is already added to ShellBar");return this;}this._aAdditionalContent.push(this._prepareNewAdditionalControl(c));this._updateParent();return this;};this.insertAdditionalContent=function(c,i){this.validateAggregation("additionalContent",c,true);if(this.indexOfAdditionalContent(c)!==-1){L.warning("Object"+c+" is already added to ShellBar");return this;}this._aAdditionalContent.splice(i,0,c);this._updateParent();return this;};this.indexOfAdditionalContent=function(c){for(var i=0;i<this._aAdditionalContent.length;i++){if(this._aAdditionalContent[i]===c){return i;}}return-1;};this.removeAdditionalContent=function(o){var c,i,_=o;if(typeof(_)==="string"){for(i=0;i<this._aAdditionalContent.length;i++){if(this._aAdditionalContent[i]&&this._aAdditionalContent[i].getId()===_){_=i;break;}else if(i===this._aAdditionalContent.length-1){_=-1;}}}if(typeof(_)==="object"){for(i=0;i<this._aAdditionalContent.length;i++){if(this._aAdditionalContent[i]===_){_=i;break;}else if(i===this._aAdditionalContent.length-1){_=-1;}}}if(typeof(_)==="number"){if(_<0||_>=this._aAdditionalContent.length){L.warning("ShellBar.removeAggregation AdditionalContent called with invalid parameter for "+"non-existing object:, "+o);return null;}else{c=this._aAdditionalContent[_];this._aAdditionalContent.splice(_,1);c.setParent(null);this._updateParent();return c;}}else{return null;}};this.removeAllAdditionalContent=function(){var c,C=this._aAdditionalContent,i;if(!C){return[];}this._aAdditionalContent=[];for(i=0;i<C.length;i++){c=C[i];c.setParent(null);}this._updateParent();return C;};this.destroyAdditionalContent=function(){this._aAdditionalContent.forEach(this._destroyAllAdditionalContent,this);this._aAdditionalContent=[];this._updateParent();return this;};this._destroyAllAdditionalContent=function(c){return c.destroy();};this.getAdditionalContent=function(){return this._aAdditionalContent;};this._updateParent=function(){this._bOTBUpdateNeeded=true;this.invalidate();};};return A;});
  