define(["../list/list","globalize","appRouter","paper-icon-button-light","cardStyle","emby-linkbutton","emby-button","indicators","flexStyles"],function(ListPage,globalize,appRouter){"use strict";function showNewUserDialog(e){appRouter.show("users/new")}function setUserProperies(user){user.ServerId=ApiClient.serverId()}function UsersPage(view,params){params.serverId=ApiClient.serverId(),this.supportsPlayback=!1,this.enableAlphaPicker=!0,ListPage.call(this,view,params),function(view){view.querySelector(".listTotalRecordCount").insertAdjacentHTML("afterend",'<button is="emby-button" type="button" class="raised raised-mini btnAddUser submit" style="margin-left:.5em;" title="'+globalize.translate("HeaderNewUser")+'" aria-label="'+globalize.translate("HeaderNewUser")+'"><i class="md-icon button-icon button-icon-left">&#xE145;</i><span>'+globalize.translate("HeaderNewUser")+"</span></button>")}(view),view.querySelector(".btnAddUser").addEventListener("click",showNewUserDialog)}return Object.assign(UsersPage.prototype,ListPage.prototype),UsersPage.prototype.getItems=function(query){return ApiClient.getUsersQueryResult(query).then(function(result){return result.Items.forEach(setUserProperies),result})},UsersPage.prototype.getPrefixesApiClientMethodName=function(){return"getUserPrefixes"},UsersPage.prototype.getItemCountText=function(numItems){return 1===numItems?globalize.translate("OneUser"):globalize.translate("UserCountValue",numItems)},UsersPage.prototype.getSettingsKey=function(){return"users"},UsersPage.prototype.setTitle=function(){},UsersPage.prototype.getCardOptions=function(items,settings){var options=ListPage.prototype.getCardOptions.apply(this,arguments);return(options=Object.assign(options,{centerText:!0,overlayText:!1,showParentTitle:!1,draggable:!1,multiSelect:!1})).fields.push("UserLastSeen"),options},UsersPage.prototype.getListViewOptions=function(items,settings){var options=ListPage.prototype.getListViewOptions.apply(this,arguments);return options.enableDefaultIcon=!0,options.multiSelect=!1,options.fields.push("UserLastSeen"),options},UsersPage.prototype.getSortMenuOptions=function(){return[]},UsersPage.prototype.getVisibleFilters=function(){return[]},UsersPage.prototype.getVisibleViewSettings=function(){return{settings:["imageType"]}},UsersPage});