define(["exports","./../modules/viewmanager/baseview.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,_loading,_servicelocator,_focusmanager,_embyButton,_embyScroller,_navdrawercontent,_layoutmanager){function renderSettings(instance,params){var apiClient=instance.getApiClient();apiClient.getUser(params.userId||apiClient.getCurrentUserId()).then(function(user){return apiClient.getCurrentUser().then(function(loggedInUser){return function(instance,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,search:!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"};return _navdrawercontent.default.getSettingsDrawerHtml(options).then(function(html){var routesElem=instance.view.querySelector(".dynamicRoutes");return mobileBorders&&routesElem.classList.add("padded-left","padded-right"),routesElem.innerHTML=html,_navdrawercontent.default.initItemsContainers(routesElem,options).then(function(){var serverElem,autoFocusElem=routesElem;"server"===instance.params.start&&(serverElem=routesElem.querySelector('div[data-section="server"]'))&&(autoFocusElem=serverElem),setTimeout(function(){_focusmanager.default.autoFocus(autoFocusElem,{skipIfNotEnabled:!0})},100)})})}(instance,apiClient,user,loggedInUser)})})}function View(view,params){_baseview.default.apply(this,arguments);var appInfoText=_servicelocator.appHost.appName()+" "+_servicelocator.appHost.appVersion();_layoutmanager.default.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"><svg class="settingsDescriptionContent-logo"\n   width="200mm"\n   height="200mm"\n   viewBox="0 0 200 200"\n   version="1.1"\n   enable-background="new"\n   xmlns="http://www.w3.org/2000/svg"\n   xmlns:svg="http://www.w3.org/2000/svg"\n   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n   xmlns:cc="http://creativecommons.org/ns#"\n   xmlns:dc="http://purl.org/dc/elements/1.1/">\n  <defs />\n  <metadata>\n    <rdf:RDF>\n      <cc:Work\n         rdf:about="">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type\n           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n      </cc:Work>\n    </rdf:RDF>\n  </metadata>\n  <g\n     style="display:inline;opacity:1"\n     transform="translate(0,-97)">\n    <path\n       d="M 91.599577 97.595313 L 39.096838 150.09753 L 47.497359 158.49806 L 0.59479574 205.40062 L 53.097534 257.90336 L 61.498055 249.50284 L 108.40062 296.4054 L 164.4034 240.4021 L 156.00288 232.00158 L 199.40488 188.59958 L 146.90266 136.09684 L 138.50162 144.49788 L 91.599577 97.595313 z M 76.911068 159.30782 L 109.77314 178.28083 L 142.63522 197.25383 L 109.77314 216.22683 L 76.911068 235.19983 L 76.911068 197.25383 L 76.911068 159.30782 z "\n       class="logo-shape" />\n  </g>\n  <g />\n</svg><div class="settingsDescriptionContent-description secondaryText" style="margin-top:1em;"></div></div></div>')}(view),view.querySelector(".settingsDescriptionContent-description").innerHTML=appInfoText)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!settings/settings.css"]),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,this.params)};_exports.default=View});