define(["../list/list","apphost","connectionManager","loading","layoutManager","imageLoader","dom","globalize","appRouter","cardBuilder","emby-linkbutton","emby-itemscontainer","emby-scroller"],function(ListPage,appHost,connectionManager,loading,layoutManager,imageLoader,dom,globalize,appRouter,cardBuilder){"use strict";function SelectServerPage(view,params){ListPage.call(this,view,params)}return Object.assign(SelectServerPage.prototype,ListPage.prototype),SelectServerPage.prototype.getItems=function(sortBy,startIndex,limit){return connectionManager.getAvailableServers().then(function(result){return function(items){items.push({Name:globalize.translate("HeaderAddServer"),Type:"AddServer"}),items.push({Name:globalize.translate("HeaderSignInWithConnect"),Type:"EmbyConnect"}),appHost.supports("sync")&&items.push({Name:globalize.translate("Downloads"),Type:"Downloads"})}(result=result.slice(0)),result})},SelectServerPage.prototype.setTitle=function(){},SelectServerPage.prototype.getItemsHtml=function(items){return cardBuilder.getCardsHtml({items:items,shape:"square",showTitle:!0,centerText:!0,overlayMoreButton:!0,overlayText:!1,multiSelect:!1,cardLayout:!layoutManager.tv,action:layoutManager.tv?"menu":"connecttoserver",defaultBackground:!0})},SelectServerPage});