define(["itemsTab","appRouter","globalize"],function(ItemsTab,appRouter,globalize){"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.getCommunityRatingOptionName=function(){return globalize.translate("ImdbRating")},TrailersTab.prototype.getVisibleViewSettings=function(){return{settings:["imageType"],fields:["Name","ProductionYear","OfficialRating","CommunityRating","CriticRating"]}},TrailersTab.prototype.getItemTypes=function(){return["Trailer"]},TrailersTab.prototype.getEmptyListMessage=function(){return this.apiClient.getCurrentUser().then(function(user){var pluginCatalogRouteUrl=appRouter.getRouteUrl("PluginCatalog");return user.Policy.IsAdministrator&&appRouter.getRouteInfo(pluginCatalogRouteUrl)?"<div>"+globalize.translate("NoTrailersMessage",'<a is="emby-linkbutton" class="button-link" href="'+pluginCatalogRouteUrl+'">',"</a></div>"):getDefaultEmptyListMessage()},getDefaultEmptyListMessage)},TrailersTab.prototype.getVisibleFilters=function(){return["Genres","Studios","Tags","OfficialRatings","Containers","Years","AudioCodecs","VideoCodecs","SubtitleCodecs","IsUnplayed","IsPlayed","IsFavorite","HasSubtitles","HasOverview"]},TrailersTab});