define(["itemsTab","appRouter","cardBuilder","layoutManager","globalize","listView","emby-itemscontainer"],function(ItemsTab,appRouter,cardBuilder,layoutManager,globalize,listView){"use strict";function TrailersTab(view,params){this.enableAlphaPicker=!0,ItemsTab.call(this,view,params)}function getDefaultEmptyListMessage(){return Promise.resolve(globalize.translate("NoTrailersMessage","",""))}return Object.assign(TrailersTab.prototype,ItemsTab.prototype),TrailersTab.prototype.getBaseQuery=function(){var query=ItemsTab.prototype.getBaseQuery.call(this),premiereDate=new Date;return premiereDate.setTime(premiereDate.getTime()-10368e6),query.MinPremiereDate=premiereDate.toISOString(),query},TrailersTab.prototype.isGlobalQuery=function(){return!0},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("ImdbRating"),reverseName:globalize.translate("ImdbRatingHighToLow"),value:"CommunityRating,SortName"}},TrailersTab.prototype.getVisibleViewSettings=function(){return["showTitle","showYear","imageType"]},TrailersTab.prototype.getItemTypes=function(){return["Trailer"]},TrailersTab.prototype.getEmptyListMessage=function(){return this.apiClient.getCurrentUser().then(function(user){if(self.Dashboard&&user.Policy.IsAdministrator){var routeUrl=appRouter.getRouteUrl("PluginCatalog");return"<div>"+globalize.translate("NoTrailersMessage",'<a is="emby-linkbutton" class="button-link" href="'+routeUrl+'">',"</a></div>")}return getDefaultEmptyListMessage()},getDefaultEmptyListMessage)},TrailersTab.prototype.getVisibleFilters=function(){return["Genres","Studios","Tags","OfficialRatings","Containers","Years","AudioCodecs","VideoCodecs","SubtitleCodecs","IsUnplayed","IsPlayed","IsFavorite","HasSubtitles","HasOverview"]},TrailersTab});