/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2018 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(["sap/ui/core/Element","sap/m/ListItemBase","./library","sap/m/Button","sap/m/OverflowToolbar","sap/m/ToolbarSpacer","sap/ui/base/Interface"],function(E,L,l,B,O,T,I){"use strict";var S=L.extend("sap.m.SelectionDetailsListItem");S.prototype.onBeforeRendering=function(){var t;if(this._getParentElement().getEnableNav()){t=l.ListType.Navigation;}else{t=l.ListType.Inactive;}this.setProperty("type",t,true);};var a=E.extend("sap.m.SelectionDetailsItem",{metadata:{library:"sap.m",properties:{enableNav:{type:"boolean",defaultValue:false,group:"Behavior"}},aggregations:{lines:{type:"sap.m.SelectionDetailsItemLine",multiple:true,bindable:"bindable"},actions:{type:"sap.ui.core.Item",multiple:true},_overflowToolbar:{type:"sap.m.OverflowToolbar",multiple:false,visibility:"hidden"}}}});a.prototype.exit=function(){if(this._oListItem){this._oListItem.destroy();this._oListItem=null;}};a.prototype._aFacadeMethods=["addCustomData","getCustomData","indexOfCustomData","insertCustomData","removeCustomData","removeAllCustomData","destroyCustomData","data","addEventDelegate","removeEventDelegate","setEnableNav","getEnableNav","addAction","removeAction"];a.prototype.getFacade=function(){var f=new I(this,a.prototype._aFacadeMethods);this.getFacade=function(){return f;};return f;};a.prototype._getListItem=function(){if(!this._oListItem){this._oListItem=new S({press:[this._onSelectionDetailsListItemPress,this]});this._oListItem._getParentElement=function(){return this;}.bind(this);this._addOverflowToolbar();}return this._oListItem;};a.prototype._onSelectionDetailsListItemPress=function(){this.fireEvent("_navigate");};a.prototype._addOverflowToolbar=function(){var b=this.getActions(),i,o;this.destroyAggregation("_overflowToolbar");if(b.length===0){return;}var t=new O(this.getId()+"-action-toolbar");this.setAggregation("_overflowToolbar",t,true);t.addAggregation("content",new T(),true);for(i=0;i