define(["itemsTab","globalize"],function(ItemsTab,globalize){"use strict";function VideosTab(view,params,options){this.options=options,this.enableAlphaPicker=!1!==options.enableAlphaPicker,ItemsTab.call(this,view,params)}return Object.assign(VideosTab.prototype,ItemsTab.prototype),VideosTab.prototype.getListViewOptions=function(items,settings){var options=ItemsTab.prototype.getListViewOptions.apply(this,arguments);return"MusicVideo"!==this.options.itemType&&"Episode"!==this.options.itemType||(options.showParentTitle=!0),options},VideosTab.prototype.getCardOptions=function(items,settings){var options=ItemsTab.prototype.getCardOptions.apply(this,arguments);return"MusicVideo"!==this.options.itemType&&"Episode"!==this.options.itemType||(options.showParentTitle=settings.fields.includes("Name")),options},VideosTab.prototype.getBaseQuery=function(){var query=ItemsTab.prototype.getBaseQuery.call(this);return"Episode"===this.options.itemType&&(query.ExcludeLocationTypes="Virtual"),query},VideosTab.prototype.getSettingsKey=function(){return ItemsTab.prototype.getSettingsKey.call(this)+"-videos"},VideosTab.prototype.getVisibleViewSettings=function(){return{settings:["imageType","groupItemsIntoCollections"],fields:["Name","ProductionYear","OfficialRating","CommunityRating","CriticRating"]}},VideosTab.prototype.getItemTypes=function(){return[this.options.itemType]},VideosTab.prototype.getVisibleFilters=function(){return["Genres","Studios","Tags","OfficialRatings","Containers","Years","AudioCodecs","VideoCodecs","SubtitleCodecs","IsUnplayed","IsPlayed","IsFavorite","IsResumable","HasTrailer","HasSpecialFeature","HasThemeSong","HasThemeVideo","VideoType","HasSubtitles","HasOverview","HasImdbId","HasTmdbId","IsLocked"]},VideosTab.prototype.getItemTypes=function(){return[this.options.itemType]},VideosTab.prototype.getCriticRatingSortOption=function(){return"Movie"===this.options.itemType?{name:globalize.translate("CriticRating"),value:"CriticRating,SortName",defaultSortOrder:"Descending"}:null},VideosTab.prototype.getCommunityRatingOptionName=function(){return"Movie"===this.options.itemType?globalize.translate("ImdbRating"):ItemsTab.prototype.getCommunityRatingOptionName.call(this)},VideosTab.prototype.getNameSortOption=function(){return"Episode"===this.options.itemType?{name:globalize.translate("Title"),value:"SeriesSortName,SortName",defaultSortOrder:"Ascending"}:ItemsTab.prototype.getNameSortOption.call(this)},VideosTab.prototype.getDefaultSortBy=function(){return"Episode"===this.options.itemType?"SeriesSortName,SortName":ItemsTab.prototype.getDefaultSortBy.call(this)},VideosTab.prototype.getViewSettingDefaults=function(currentItem,listItems,allowedVisibleFields){var defaults=ItemsTab.prototype.getViewSettingDefaults.apply(this,arguments);return"Episode"===this.options.itemType&&(defaults.fields=["Name"]),defaults},VideosTab});