define(["tabbedView","layoutManager","require","globalize","emby-itemscontainer","emby-tabs","emby-button","emby-scroller"],function(TabbedView,layoutManager,require,globalize){"use strict";function MusicView(view,params){TabbedView.call(this,view,params)}return Object.assign(MusicView.prototype,TabbedView.prototype),MusicView.prototype.getTabs=function(){var subviews=this.item.Subviews||["albums","albumartists","artists","playlists","songs","genres","folders"],collectionType=this.item.CollectionType;return[{name:globalize.translate("Suggestions"),id:"suggestions"},{name:"audiobooks"===collectionType?globalize.translate("Books"):globalize.translate("Albums"),id:"albums",enabled:subviews.includes("albums")},{name:globalize.translate("HeaderAlbumArtists"),id:"albumartists",enabled:"audiobooks"!==collectionType},{name:"audiobooks"===collectionType?globalize.translate("Authors"):globalize.translate("Artists"),id:"artists",enabled:subviews.includes("artists")},{name:globalize.translate("Composers"),id:"composers",enabled:"audiobooks"!==collectionType},{name:globalize.translate("Playlists"),id:"playlists",enabled:subviews.includes("playlists")},{name:globalize.translate("Genres"),id:"genres",enabled:subviews.includes("genres")},{name:globalize.translate("Songs"),id:"songs",enabled:"audiobooks"!==collectionType},{name:globalize.translate("Tags"),id:"tags",enabled:subviews.includes("tags")},{name:globalize.translate("Folders"),id:"folders"}]},MusicView.prototype.loadTabController=function(id){switch(id){case"suggestions":return require(["./suggestions"]);case"albums":return require(["./albums"]);case"albumartists":case"artists":case"composers":return require(["artistsTab"]);case"playlists":return require(["playlistsTab"]);case"genres":return require(["genresTab"]);case"songs":return require(["./songs"]);case"tags":return require(["tagsTab"]);case"folders":return require(["foldersTab"]);default:throw new Error("tab not found: "+id)}},MusicView.prototype.getTabControllerOptions=function(id){var options=TabbedView.prototype.getTabControllerOptions.apply(this,arguments);return"genres"===id&&(options.queryIncludeItemTypes=["MusicAlbum"]),options},MusicView});