define(["itemsTab","cardBuilder","layoutManager","globalize","listView","emby-itemscontainer"],function(ItemsTab,cardBuilder,layoutManager,globalize,listView){"use strict";function FoldersTab(view,params){this.enableAlphaPicker=!0,ItemsTab.call(this,view,params)}return Object.assign(FoldersTab.prototype,ItemsTab.prototype),FoldersTab.prototype.getBaseQuery=function(){var parentId=this.params.parentId,sortValues=this.getSortValues(),fields="BasicSyncInfo,MediaSourceCount";layoutManager.mobile||(fields+=",SortName"),"primary"===this.getViewSettings().imageType&&(fields+=",PrimaryImageAspectRatio");var query={SortBy:sortValues.sortBy,SortOrder:sortValues.sortOrder,Fields:fields,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb,Disc",StartIndex:this.startIndex||0,Limit:this.nextPageButtons.length?100:null,ParentId:parentId},alphaPicker=this.alphaPicker;return alphaPicker&&(query.NameStartsWithOrGreater=alphaPicker.value()),query},FoldersTab.prototype.getContext=function(){return"folders"},FoldersTab.prototype.getSettingsKey=function(){return ItemsTab.prototype.getSettingsKey.call(this)+"-folders"},FoldersTab.prototype.getViewSettings=function(){var settings=ItemsTab.prototype.getViewSettings.call(this);return settings.showTitle=!1!==settings.showTitle,settings},FoldersTab.prototype.getDefaultSortBy=function(){return"IsFolder,SortName"},FoldersTab.prototype.getFolderSortOption=function(){return{name:globalize.translate("Folders"),value:"IsFolder,SortName"}},FoldersTab.prototype.getVisibleViewSettings=function(){var settings=["showTitle","imageType"];return this.apiClient.isMinServerVersion("3.6.0.43")&&settings.push("groupItemsIntoCollections"),settings},FoldersTab.prototype.getVisibleFilters=function(){return[]},FoldersTab});