define(["itemsTab","globalize","userSettings"],function(ItemsTab,globalize,userSettings){"use strict";function ChannelsTab(view,params){this.enableAlphaPicker=!0,ItemsTab.call(this,view,params)}return Object.assign(ChannelsTab.prototype,ItemsTab.prototype),ChannelsTab.prototype.getItemTypes=function(){return["TvChannel"]},ChannelsTab.prototype.getSettingsKey=function(){return"livetvchannels"},ChannelsTab.prototype.getChannelNumberSortOption=function(){return{name:globalize.translate("ChannelNumber"),value:"ChannelNumber,SortName",defaultSortOrder:"Ascending"}},ChannelsTab.prototype.getFavoritesSortOption=function(){return{name:globalize.translate("Favorites"),value:"IsFavorite,DatePlayed,ChannelNumber,SortName",defaultSortOrder:"Ascending",sortOrderAscending:"Ascending,Descending,Ascending",sortOrderDescending:"Descending,Ascending,Ascending"}},ChannelsTab.prototype.getDateAddedSortOption=function(){return null},ChannelsTab.prototype.getParentalRatingSortOption=function(){return null},ChannelsTab.prototype.getRuntimeSortOption=function(){return null},ChannelsTab.prototype.getReleaseDateSortOption=function(){return null},ChannelsTab.prototype.getCriticRatingSortOption=function(){return null},ChannelsTab.prototype.getCommunityRatingSortOption=function(){return null},ChannelsTab.prototype.getCardOptions=function(items){var options=ItemsTab.prototype.getCardOptions.apply(this,arguments);return-1!==(this.getSortValues().sortBy||"").toLowerCase().indexOf("channelnumber,sortname")&&(options.channelNumberFirst=!0),options.preferThumb="auto",options.defaultBackground=!0,options.multiSelect=!1,options.fields.push("CurrentProgramParentName"),options.fields.push("CurrentProgramTime"),options},ChannelsTab.prototype.getListViewOptions=function(items,settings){var options=ItemsTab.prototype.getListViewOptions.apply(this,arguments);return options.multiSelect=!1,options},ChannelsTab.prototype.getVisibleFilters=function(){return["IsFavorite"]},ChannelsTab.prototype.getVisibleViewSettings=function(){var settings={settings:["imageType"],fields:["Name"]};return this.apiClient.isMinServerVersion("4.6.0.29")&&settings.settings.push("groupItemsIntoTags"),settings},ChannelsTab.prototype.getSortBySettingsKey=function(sortMenuOptions){return userSettings.getLiveTvChannelSortSettingsKey()},ChannelsTab.prototype.getSortMenuOptions=function(){return userSettings.getLiveTvChannelSortOrders(globalize)},ChannelsTab.prototype.getDefaultSortBy=function(){var query={};return userSettings.addLiveTvChannelSortingToQuery(query,globalize),query.SortBy},ChannelsTab.prototype.getSortByValue=function(){var query={};return userSettings.addLiveTvChannelSortingToQuery(query,globalize),query.SortBy},ChannelsTab});