define(["itemsTab","cardBuilder","layoutManager","globalize","listView","emby-itemscontainer"],function(ItemsTab,cardBuilder,layoutManager,globalize,listView){"use strict";function TrailersTab(view,params){this.enableAlphaPicker=!0,ItemsTab.call(this,view,params)}return Object.assign(TrailersTab.prototype,ItemsTab.prototype),TrailersTab.prototype.getBaseQuery=function(){var query=ItemsTab.prototype.getBaseQuery.call(this);query.ParentId=null;var premiereDate=new Date;return premiereDate.setTime(premiereDate.getTime()-10368e6),query.MinPremiereDate=premiereDate.toISOString(),query},TrailersTab.prototype.getItemsHtml=function(items){var settings=this.getViewSettings();if("list"===settings.imageType)return listView.getListViewHtml({items:items});var shape,preferThumb,preferDisc;"banner"===settings.imageType?shape="banner":"disc"===settings.imageType?(shape="square",preferDisc=!0):"thumb"===settings.imageType?(shape="backdrop",preferThumb=!0):shape="auto";return cardBuilder.getCardsHtml(items,{items:items,shape:shape,centerText:!0,preferThumb:preferThumb,preferDisc:preferDisc,overlayMoreButton:!layoutManager.tv,showTitle:settings.showTitle,showYear:settings.showYear,overlayText:!settings.showTitle,cardLayout:!1})},TrailersTab.prototype.getSettingsKey=function(){return ItemsTab.prototype.getSettingsKey.call(this)+"-trailers"},TrailersTab.prototype.getViewSettings=function(){var settings=ItemsTab.prototype.getViewSettings.call(this);return settings.showTitle=!1!==settings.showTitle,settings.showYear=!1!==settings.showYear,settings},TrailersTab.prototype.getCommunityRatingSortOption=function(){return{name:globalize.translate("sharedcomponents#ImdbRating"),reverseName:globalize.translate("sharedcomponents#ImdbRatingHighToLow"),value:"CommunityRating,SortName"}},TrailersTab.prototype.getVisibleViewSettings=function(){return["showTitle","showYear","imageType"]},TrailersTab.prototype.getItemTypes=function(){return["Trailer"]},TrailersTab.prototype.getVisibleFilters=function(){return["Genres","Studios","Tags","OfficialRatings","Containers","Years","AudioCodecs","VideoCodecs","SubtitleCodecs","IsUnplayed","IsPlayed","IsFavorite","HasSubtitles"]},TrailersTab});