define(["exports","./../list/list.js","./../modules/common/globalize.js","./../modules/emby-elements/emby-input/emby-input.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/common/servicelocator.js","./../modules/layoutmanager.js"],function(_exports,_list,_globalize,_embyInput,_embyButton,_embyScroller,_connectionmanager,_servicelocator,_layoutmanager){function SelectServerPage(view,params){this.enableAlphaNumericShortcuts=!1,this.enableTotalRecordCountDisplay=!1,this.supportsViewSettings=!1,_list.default.call(this,view,params),this.itemsContainer.setAttribute("data-monitor","Servers"),this.itemsContainer.classList.add("itemsContainer-defaultCardSize")}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(SelectServerPage.prototype,_list.default.prototype),SelectServerPage.prototype.getSortMenuOptions=function(){return[]},SelectServerPage.prototype.getItemTypes=function(){return["Server"]},SelectServerPage.prototype.getItems=function(query){return _connectionmanager.default.getAvailableServers().then(function(items){!function(items){items.push({Name:_globalize.default.translate("HeaderAddServer"),Type:"AddServer"}),items.push({Name:_globalize.default.translate("HeaderSignInWithConnect"),Type:"EmbyConnect"}),_servicelocator.appHost.supports("sync")&&items.push({Name:_globalize.default.translate("Downloads"),Type:"Downloads"})}(items=items.slice(0));var totalRecordCount=items.length;return query&&(query.StartIndex&&(items=items.slice(query.StartIndex)),null!=query.Limit)&&query.Limit<items.length&&(items.length=query.Limit),{Items:items,TotalRecordCount:totalRecordCount}})},SelectServerPage.prototype.setTitle=function(){},SelectServerPage.prototype.getBaseListRendererOptions=function(){var options=_list.default.prototype.getBaseListRendererOptions.apply(this,arguments);return options.draggable=!1,options.multiSelect=!1,options.action=_layoutmanager.default.tv?"menu":"connecttoserver",options},SelectServerPage.prototype.getCardOptions=function(items,settings){var options=_list.default.prototype.getCardOptions.apply(this,arguments);return options.shape="backdrop",options.defaultBackground=!0,options.fields=["Name","LastServerAddress"],options};_exports.default=SelectServerPage});