define(["itemsTab","userSettings","globalize","emby-itemscontainer"],function(ItemsTab,userSettings,globalize){"use strict";function SeriesTab(view,params){this.enableAlphaPicker=!0,ItemsTab.call(this,view,params)}return Object.assign(SeriesTab.prototype,ItemsTab.prototype),SeriesTab.prototype.getSettingsKey=function(){return ItemsTab.prototype.getSettingsKey.call(this)+"-series"},SeriesTab.prototype.getVisibleViewSettings=function(){return{settings:["imageType","groupItemsIntoCollections"],fields:["Name","ProductionYear","OfficialRating","CommunityRating","CriticRating"]}},SeriesTab.prototype.getVisibleFilters=function(){return["Genres","Studios","Tags","OfficialRatings","Containers","Years","IsUnplayed","IsPlayed","IsFavorite","SeriesStatus","HasTrailer","HasThemeSong","HasThemeVideo","HasOverview","HasImdbId","HasTmdbId","HasTvdbId","IsLocked"]},SeriesTab.prototype.getItemTypes=function(){return["Series"]},SeriesTab.prototype.getBaseQuery=function(){var query=ItemsTab.prototype.getBaseQuery.call(this);return this.getViewSettings().fields.includes("ProductionYear")&&(query.Fields+=",Status,EndDate"),query},SeriesTab.prototype.getSortMenuOptions=function(){var sortBy=ItemsTab.prototype.getSortMenuOptions.call(this);return sortBy.push({name:globalize.translate("LastEpisodeDateAdded"),value:"DateLastContentAdded,SortName",defaultSortOrder:"Descending"}),this.sortOptionsByName(sortBy),sortBy},SeriesTab.prototype.getCommunityRatingOptionName=function(){return globalize.translate("ImdbRating")},SeriesTab.prototype.getCriticRatingSortOption=function(){return null},SeriesTab.prototype.getDatePlayedSortOption=function(){return{name:globalize.translate("DatePlayed"),value:"SeriesDatePlayed,SortName",defaultSortOrder:"Descending"}},SeriesTab.prototype.getPlayCountSortOption=function(){return null},SeriesTab.prototype.getViewSettingDefaults=function(currentItem,listItems,allowedVisibleFields){var defaults=ItemsTab.prototype.getViewSettingDefaults.apply(this,arguments);return defaults.fields=["Name"],defaults},SeriesTab});