define(["exports","./../modules/viewmanager/baseview.js","./../modules/loading/loading.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-checkbox/emby-checkbox.js","./../modules/emby-elements/emby-select/emby-select.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/approuter.js"],function(_exports,_baseview,_loading,_embyButton,_embyCheckbox,_embySelect,_embyScroller,_approuter){function onSubmit(e){var page,apiClient;return page=this.closest(".page"),_loading.default.show(),(apiClient=ApiClient).getJSON(apiClient.getUrl("Startup/Configuration")).then(function(config){config.UICulture=page.querySelector("#selectLocalizationLanguage").value,apiClient.ajax({type:"POST",data:config,url:apiClient.getUrl("Startup/Configuration")}).then(function(){_approuter.default.show("wizard/wizarduser.html")})}),e.preventDefault(),e.stopPropagation(),!1}function View(view,params){_baseview.default.apply(this,arguments),view.querySelector(".wizardStartForm").addEventListener("submit",onSubmit)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!wizard/wizard.css"]),Object.assign(View.prototype,_baseview.default.prototype),View.prototype.onResume=function(options){_baseview.default.prototype.onResume.apply(this,arguments),_loading.default.show();var page=this.view,apiClient=ApiClient,promise1=apiClient.getJSON(apiClient.getUrl("Startup/Configuration")),apiClient=apiClient.getJSON(apiClient.getUrl("Localization/Options"));Promise.all([promise1,apiClient]).then(function(responses){!function(page,config,languageOptions){(page=page.querySelector("#selectLocalizationLanguage")).innerHTML=languageOptions.map(function(l){return'<option value="'+l.Value+'">'+l.Name+"</option>"}),page.value=config.UICulture,_loading.default.hide()}(page,responses[0],responses[1])})},_exports.default=View});