define(["exports","./basetab.js","./../emby-apiclient/connectionmanager.js","./listcontroller.js"],function(_exports,_basetab,_connectionmanager,_listcontroller){function ItemsTab(view,params,options){_basetab.default.apply(this,arguments),_listcontroller.default.apply(this,arguments),this.view=view,this.params=params,this.options=options,params.serverId&&(this.apiClient=_connectionmanager.default.getApiClient(params.serverId))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(ItemsTab.prototype,_basetab.default.prototype),Object.assign(ItemsTab.prototype,_listcontroller.default.prototype),ItemsTab.prototype.onTemplateLoaded=function(){_basetab.default.prototype.onTemplateLoaded.apply(this,arguments);var params=this.params;this.initItemsContainer(),this.addFocusBehavior(this.itemsContainer),params.parentId&&!this.isGlobalQuery()&&this.itemsContainer.setAttribute("data-parentid",params.parentId),this.initButtons()},ItemsTab.prototype.getSettingsKey=function(){return this.params.parentId+"-1"},ItemsTab.prototype.isRecursiveQuery=function(){return!0},ItemsTab.prototype.onResume=function(options){_basetab.default.prototype.onResume.apply(this,arguments),_listcontroller.default.prototype.resume.apply(this,arguments),options&&options.refresh&&this.updateSortText(),this.supportsAlphaPicker()&&this.initAlphaPicker();var alphaNumericShortcuts=this.alphaNumericShortcuts,instance=(alphaNumericShortcuts&&alphaNumericShortcuts.resume(),this),autoFocus=options.autoFocus;this.itemsContainer.resume(options).then(function(result){autoFocus&&instance.autoFocus()})},ItemsTab.prototype.loadItemsTemplate=function(){var promise=require(["text!modules/tabbedview/itemstab.template.html"]);return"y"===this.scrollDirection()?promise:promise.then(function(responses){var html=responses[0];return html=(html=(html=(html=(html=(html=html.replace('data-horizontal="false"','data-horizontal="true"')).replace('data-forcescrollbar="true"','data-forcescrollbar="false"')).replace('data-bindheader="true"','data-bindheader="false"')).replace(" padded-bottom-page","")).replace(" vertical-wrap","")).replace(' data-virtualscrolllayout="vertical-grid"',""),responses[0]=html,responses})},ItemsTab.prototype.supportsAlphaPicker=function(){return!1},ItemsTab.prototype.refresh=function(options){var instance=this,autoFocus=options.autoFocus;this.itemsContainer.refreshItems(options).then(function(result){autoFocus&&instance.autoFocus()})},ItemsTab.prototype.onPause=function(){_basetab.default.prototype.onPause.apply(this,arguments),_listcontroller.default.prototype.pause.apply(this,arguments)},ItemsTab.prototype.destroy=function(){_basetab.default.prototype.destroy.apply(this,arguments),_listcontroller.default.prototype.destroy.apply(this,arguments),this.view=null,this.params=null,this.options=null,this.apiClient=null};_exports.default=ItemsTab});