define(["exports","./../modules/viewmanager/baseview.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/loading/loading.js","./../modules/common/servicelocator.js","./../modules/focusmanager.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/navdrawer/navdrawercontent.js","./../modules/layoutmanager.js"],function(_exports,_baseview,_connectionmanager,_loading,_servicelocator,_focusmanager,_embyButton,_embyScroller,_navdrawercontent,_layoutmanager){function renderSettings(view,params){var apiClient=params.serverId?_connectionmanager.default.getApiClient(params.serverId):_connectionmanager.default.currentApiClient();apiClient.getUser(params.userId||apiClient.getCurrentUserId()).then(function(user){apiClient.getCurrentUser().then(function(loggedInUser){!function(view,apiClient,user,loggedInUser){var mobileBorders=!_layoutmanager.default.tv,options={apiClient:apiClient,user:user,loggedInUser:loggedInUser,userImage:!0,selectServer:!0,signOut:!0,itemClass:"navMenuOption-settings"+(mobileBorders?" navMenuOption-settings-hidelastborder":""),itemsContainerClass:mobileBorders?" navDrawerItemsContainer-shaded defaultCardBackground":null,home:!1,collapsible:!1,header:!1,border:!1,highlight:mobileBorders,allowBorderXOffset:!0,asideIcon:!0,contextMenu:!1,listItemBodyClass:"settingsMenuListItemBody"+(_layoutmanager.default.tv?"":" settingsMenuListItemBody-extrapadding"),itemBackground:_layoutmanager.default.tv,headerClass:"navMenuHeader-settings"};_navdrawercontent.default.getSettingsDrawerHtml(options).then(function(html){var routesElem=view.querySelector(".dynamicRoutes");mobileBorders&&routesElem.classList.add("padded-left","padded-right"),routesElem.innerHTML=html,_navdrawercontent.default.initItemsContainers(routesElem,options).then(function(){_focusmanager.default.autoFocus(routesElem,{skipIfNotEnabled:!0})})})}(view,apiClient,user,loggedInUser)})})}function View(view,params){_baseview.default.apply(this,arguments);var appInfo,appInfoText=_servicelocator.appHost.appName()+" "+_servicelocator.appHost.appVersion();_layoutmanager.default.tv?(view.querySelector(".settingsContentContainer").classList.add("settingsContentContainer-tv"),function(view){view.insertAdjacentHTML("afterbegin",'<div class="settingsDescriptionContainer padded-top-page padded-left padded-right"><div class="padded-left padded-right flex-grow flex-direction-column flex justify-content-flex-start align-items-center settingsDescriptionContent"><div class="settingsDescriptionContent-logo"></div><div class="settingsDescriptionContent-description secondaryText" style="margin-top:2em;"></div></div></div>')}(view),view.querySelector(".settingsDescriptionContent-description").innerHTML=appInfoText):((appInfo=view.querySelector(".appInfo")).innerHTML=appInfoText,appInfo.classList.remove("hide"))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(View.prototype,_baseview.default.prototype),View.prototype.onResume=function(options){_baseview.default.prototype.onResume.apply(this,arguments),_loading.default.hide(),options.refresh&&renderSettings(this.view,this.params)};_exports.default=View});