define(["exports","./../modules/emby-apiclient/connectionmanager.js","./../modules/common/globalize.js","./../modules/layoutmanager.js","./../modules/tabbedview/basetab.js","./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/tabbedview/sectionscontroller.js"],function(_exports,_connectionmanager,_globalize,_layoutmanager,_basetab,_embyItemscontainer,_embyScroller,_sectionscontroller){function TvFavoritesTab(view,params){_basetab.default.apply(this,arguments),_sectionscontroller.default.apply(this,arguments),this.view=view,this.params=params,this.apiClient=_connectionmanager.default.getApiClient(params.serverId)}function FavoritesTab(view,params){_basetab.default.apply(this,arguments),_sectionscontroller.default.apply(this,arguments),this.view=view,this.params=params,this.apiClient=_connectionmanager.default.currentApiClient()}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(TvFavoritesTab.prototype,_basetab.default.prototype),Object.assign(TvFavoritesTab.prototype,_sectionscontroller.default.prototype),Object.assign(FavoritesTab.prototype,_basetab.default.prototype),Object.assign(FavoritesTab.prototype,_sectionscontroller.default.prototype),TvFavoritesTab.prototype.fetchSections=function(){var sections=[],monitor=["markfavorite"],enableFocusPreview=this.enableFocusPreview(),parentId=this.params.parentId;sections.push({Id:"Series",Name:_globalize.default.translate("HeaderFavoriteShows"),CollectionType:"tvshows",Monitor:monitor,ListOptions:{fields:enableFocusPreview?[]:["Name","ProductionYear"]},QueryOptions:{IncludeItemTypes:"Series",ParentId:parentId,Recursive:!0},LimitItems:!1}),sections.push({Id:"Episodes",Name:_globalize.default.translate("HeaderFavoriteEpisodes"),CollectionType:"tvshows",Monitor:monitor,ListOptions:{fields:enableFocusPreview?[]:["ParentName","Name"],preferThumb:!1},QueryOptions:{IncludeItemTypes:"Episode",ParentId:parentId,Recursive:!0},LimitItems:!1});for(var i=0,length=sections.length;i<length;i++)sections[i].QueryOptions.Filters="IsFavorite";return Promise.resolve(sections)},TvFavoritesTab.prototype.enablePushDownFocusPreview=function(){return _layoutmanager.default.tv&&"y"===this.scrollDirection()},TvFavoritesTab.prototype.onResume=function(options){return _basetab.default.prototype.onResume.apply(this,arguments),_sectionscontroller.default.prototype.onResume.apply(this,arguments)},TvFavoritesTab.prototype.onPause=function(){_basetab.default.prototype.onPause.apply(this,arguments),_sectionscontroller.default.prototype.onPause.apply(this,arguments)},TvFavoritesTab.prototype.destroy=function(){_basetab.default.prototype.destroy.apply(this,arguments),_sectionscontroller.default.prototype.destroy.apply(this,arguments)};_exports.default=TvFavoritesTab});