text: define(function(){"use strict";var a="sulu.collection-select.",b={instanceName:"",title:"",rootCollection:!1,disableIds:[],disabledChildren:!1},c={columnNavigation:function(){return['<div id="child-column-navigation"></div>','<div id="wait-container" style="margin-top: 50px; margin-bottom: 200px; display: none;"></div>'].join("")}},d={columnNavigationSelector:"#child-column-navigation",columnNavigationContainerSelector:"#child-column-navigation .container"},e=function(){return h.call(this,"selected")},f=function(){return h.call(this,"closed")},g=function(){return h.call(this,"initialized")},h=function(b,c){return c||(c=a),c+(this.options.instanceName?this.options.instanceName+".":"")+b};return{initialize:function(){this.options=this.sandbox.util.extend(!0,{locale:this.sandbox.sulu.getDefaultContentLocale()},b,this.options),this.bindCustomEvents(),this.openOverlay(),this.sandbox.emit(g.call(this))},bindCustomEvents:function(){this.sandbox.once(h.call(this,"opened","husky.overlay."),this.startOverlayColumnNavigation.bind(this))},openOverlay:function(){var a=this.sandbox.dom.createElement('<div class="overlay-container"/>'),b=[{type:"cancel",align:"center"}];this.sandbox.dom.append(this.$el,a),this.sandbox.start([{name:"overlay@husky",options:{cssClass:"collection-select",el:a,openOnStart:!0,removeOnClose:!0,instanceName:this.options.instanceName,skin:"responsive-width",propagateEvents:!1,title:this.sandbox.translate("sulu.media.move.overlay-title"),data:c.columnNavigation(),buttons:b,okCallback:function(){this.sandbox.emit("husky.column-navigation."+this.options.instanceName+".get-marked",function(a){1===Object.keys(a).length&&this.sandbox.emit(e.call(this),a[Object.keys(a)[0]]),this.sandbox.stop()}.bind(this))}.bind(this),cancelCallback:function(){this.sandbox.stop()}.bind(this)}}])},startOverlayColumnNavigation:function(){this.$find(d.columnNavigationSelector).append($('<div class="container"/>'));var a={el:d.columnNavigationContainerSelector,instanceName:this.options.instanceName,resultKey:"collections",showOptions:!1,showStatus:!1,markable:!0,singleMarkable:!0,responsive:!1,sortable:!1,skin:"fixed-height-small",disableIds:this.options.disableIds,disabledChildren:this.options.disabledChildren};this.options.rootCollection?a.prefilledData={_embedded:{collections:[{id:"root",title:this.sandbox.translate("sulu.media.all-collections"),hasSub:!0,_links:{children:{href:"/admin/api/collections?sortBy=title&locale="+this.options.locale}},_embedded:{collections:[]}}]}}:a.url="/admin/api/collections?sortBy=title&locale="+this.options.locale,this.sandbox.start([{name:"column-navigation@husky",options:a}])},destroy:function(){this.sandbox.emit(f.call(this))}}});