define(["exports","./../modules/tabbedview/tabbedview.js","./../modules/common/globalize.js","./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-scroller/emby-scroller.js"],function(_exports,_tabbedview,_globalize,_embyItemscontainer,_embyButton,_embyScroller){function HomeVideosView(view,params){_tabbedview.default.apply(this,arguments)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(HomeVideosView.prototype,_tabbedview.default.prototype),HomeVideosView.prototype.getTabs=function(){var subviews=this.item.Subviews;return[{name:_globalize.default.translate("Shows"),id:"series",enabled:subviews.includes("series")&&!subviews.includes("movies")},function(item,subviews){return!item.CollectionType&&subviews.includes("movies")&&subviews.includes("series")?{name:_globalize.default.translate("MoviesAndShows"),id:"moviesshows",enabled:!0}:{name:item.CollectionType&&"movies"!==item.CollectionType?_globalize.default.translate("Videos"):_globalize.default.translate("Movies"),id:"videos",enabled:subviews.includes("videos")||subviews.includes("movies")}}(this.item,subviews),{name:_globalize.default.translate("Suggestions"),id:"suggestions",enabled:"movies"===this.item.CollectionType},{name:_globalize.default.translate("Trailers"),id:"trailers",enabled:"movies"===this.item.CollectionType},{name:_globalize.default.translate("Photos"),id:"photos",enabled:subviews.includes("photos")},{name:_globalize.default.translate("HeaderAlbumArtists"),id:"albumartists",enabled:subviews.includes("albumartists")},{name:_globalize.default.translate("Artists"),id:"artists",enabled:subviews.includes("artists")},{name:_globalize.default.translate("Playlists"),id:"playlists",enabled:subviews.includes("playlists")},{name:_globalize.default.translate("Collections"),id:"collections",enabled:subviews.includes("collections")},{name:_globalize.default.translate("Genres"),id:"genres",enabled:subviews.includes("genres")},{name:_globalize.default.translate("Tags"),id:"tags",enabled:subviews.includes("tags")},{name:_globalize.default.translate("Favorites"),id:"favorites",enabled:"movies"===this.item.CollectionType},{name:_globalize.default.translate("Folders"),id:"folders"}]},HomeVideosView.prototype.getAutoBackdropItemTypes=function(){return["Movie","Series","MusicVideo","Video"]},HomeVideosView.prototype.supportsHorizontalTabScroll=function(){return!0},HomeVideosView.prototype.loadTabController=function(id){switch(id){case"suggestions":return Emby.importModule("./videos/moviesuggestions.js");case"photos":return Emby.importModule("./videos/photos.js");case"trailers":return Emby.importModule("./videos/trailers.js");case"albumartists":case"artists":return Emby.importModule("./modules/tabbedview/artiststab.js");case"collections":return Emby.importModule("./modules/tabbedview/collectionstab.js");case"playlists":return Emby.importModule("./modules/tabbedview/playliststab.js");case"genres":return Emby.importModule("./modules/tabbedview/genrestab.js");case"tags":return Emby.importModule("./modules/tabbedview/tagstab.js");case"videos":case"moviesshows":case"favorites":return Emby.importModule("./modules/tabbedview/videostab.js");case"folders":return Emby.importModule("./modules/tabbedview/folderstab.js");case"series":return Emby.importModule("./modules/tabbedview/seriestab.js");default:throw new Error("tab not found: "+id)}},HomeVideosView.prototype.getDefaultTabId=function(){return this.item.CollectionType?null:"folders"},HomeVideosView.prototype.getTabControllerOptions=function(id){var options=_tabbedview.default.prototype.getTabControllerOptions.apply(this,arguments);return"favorites"===id?"movies"===this.item.CollectionType&&(options.itemType="Movie",options.enableAlphaPicker=!0,options.mode="favorites"):"genres"===id?"movies"===this.item.CollectionType?options.queryIncludeItemTypes=["Movie"]:"musicvideos"===this.item.CollectionType?options.queryIncludeItemTypes=["MusicVideo"]:"homevideos"===this.item.CollectionType&&(options.queryIncludeItemTypes=["Video","Photo"]):"videos"===id?(options.itemType="musicvideos"===this.item.CollectionType?"MusicVideo":this.item.CollectionType&&"movies"!==this.item.CollectionType?"Video":"Movie",options.enableAlphaPicker="Episode"!==options.itemType):"moviesshows"===id&&(options.itemTypes=["Movie","Series"],options.enableAlphaPicker=!0),options};_exports.default=HomeVideosView});