define(["../list/list","globalize","emby-linkbutton","emby-itemscontainer","cardStyle"],function(ListPage,globalize){"use strict";function setDeviceProperies(device){device.Type="Device",device.ServerId=ApiClient.serverId(),device.PrimaryImageAspectRatio=1;var iconUrl=device.IconUrl;iconUrl&&-1===iconUrl.indexOf("://")&&(iconUrl=ApiClient.getUrl(iconUrl)),device.ImageUrl=iconUrl}function DevicesPage(view,params){params.serverId=ApiClient.serverId(),this.supportsPlayback=!1,this.enableAlphaNumericShortcuts=!1,ListPage.call(this,view,params)}return Object.assign(DevicesPage.prototype,ListPage.prototype),DevicesPage.prototype.getItems=function(query){return ApiClient.getDevices(query).then(function(result){return result.Items.forEach(setDeviceProperies),result})},DevicesPage.prototype.getSettingsKey=function(){return"devices"},DevicesPage.prototype.getItemCountText=function(numItems){return 1===numItems?globalize.translate("OneDevice"):globalize.translate("DeviceCountValue",numItems)},DevicesPage.prototype.setTitle=function(){},DevicesPage.prototype.getCardOptions=function(items,settings){var options=ListPage.prototype.getCardOptions.apply(this,arguments);return(options=Object.assign(options,{centerText:!0,overlayText:!1,paddedImage:!0,defaultBackground:!0,showParentTitle:!1,shape:"backdrop",draggable:!1,multiSelect:!1})).fields.push("DeviceAppInfo"),options.fields.push("DeviceUserInfo"),options},DevicesPage.prototype.getListViewOptions=function(items,settings){var options=ListPage.prototype.getListViewOptions.apply(this,arguments);return options.enableDefaultIcon=!0,options.fields.push("DeviceAppInfo"),options.fields.push("DeviceUserInfo"),options.multiSelect=!1,options},DevicesPage.prototype.getSortMenuOptions=function(){return[]},DevicesPage.prototype.getVisibleFilters=function(){return[]},DevicesPage.prototype.getVisibleViewSettings=function(){return{settings:["imageType"]}},DevicesPage});