define(["exports","./../modules/tabbedview/itemstab.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js","./../modules/common/globalize.js","./../components/taskbutton.js","./librariescontroller.js"],function(_exports,_itemstab,_embyButton,_embyScroller,_embyItemscontainer,_globalize,_taskbutton,_librariescontroller){function LibraryTab(view,params){this.supportsViewSettings=!1,this.hasOtherViewButtons=!0,this.enableAlphaNumericShortcuts=!1,_itemstab.default.apply(this,arguments)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(LibraryTab.prototype,_itemstab.default.prototype),LibraryTab.prototype.onTemplateLoaded=function(){_itemstab.default.prototype.onTemplateLoaded.apply(this,arguments),this.itemsContainer.refreshOnItemUpdated=!0,_librariescontroller.default.addButtons(this,!0);var btnRefresh=this.view.querySelector(".btnRefresh");btnRefresh&&(this.libraryScanTaskButton=new _taskbutton.default({progressElem:this.view.querySelector(".refreshProgress"),taskKey:"RefreshLibrary",button:btnRefresh}))},LibraryTab.prototype.onResume=function(options){var _this$libraryScanTask;_itemstab.default.prototype.onResume.apply(this,arguments),null!=(_this$libraryScanTask=this.libraryScanTaskButton)&&_this$libraryScanTask.resume({})},LibraryTab.prototype.onPause=function(){var _this$libraryScanTask2;_itemstab.default.prototype.onPause.apply(this,arguments),null!=(_this$libraryScanTask2=this.libraryScanTaskButton)&&_this$libraryScanTask2.pause()},LibraryTab.prototype.loadTemplate=function(){return this.loadItemsTemplate()},LibraryTab.prototype.getItems=function(query){return this.getApiClient().getVirtualFolders(query)},LibraryTab.prototype.getItemTypes=function(){return["VirtualFolder"]},LibraryTab.prototype.getSettingsKey=function(){return"libraries"},LibraryTab.prototype.getEmptyListMessage=function(){return Promise.resolve("")},LibraryTab.prototype.getItemCountText=function(numItems){return 1===numItems?_globalize.default.translate("OneLibrary"):_globalize.default.translate("LibraryCountValue",numItems)},LibraryTab.prototype.getContext=function(){return null},LibraryTab.prototype.getBaseListRendererOptions=function(){var options=_itemstab.default.prototype.getBaseListRendererOptions.apply(this,arguments);return options.draggable=!1,options.draggableXActions=!0,options.multiSelect=!1,options.action="edit",options.playQueueIndicator=!1,options},LibraryTab.prototype.getCardOptions=function(items,settings){var options=_itemstab.default.prototype.getCardOptions.apply(this,arguments);return Object.assign(options,{shape:"backdrop",fields:["Name","CollectionType","LibraryFolders"],cardLayout:!0,hoverPlayButton:!1,defaultBackground:!0,linkButtonAction:"edit"})},LibraryTab.prototype.getSortMenuOptions=function(){return[]},LibraryTab.prototype.destroy=function(){var _this$libraryScanTask3;_itemstab.default.prototype.destroy.apply(this,arguments),null!=(_this$libraryScanTask3=this.libraryScanTaskButton)&&_this$libraryScanTask3.destroy(),this.libraryScanTaskButton=null};_exports.default=LibraryTab});