define(["exports","./../modules/viewmanager/baseview.js","./../modules/loading/loading.js","./../modules/approuter.js","./../modules/common/globalize.js","./../modules/emby-elements/emby-input/emby-input.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"],function(_exports,_baseview,_loading,_approuter,_globalize,_embyInput,_embyButton,_embyCheckbox,_embySelect,_embyScroller){function onUpdateUserComplete(result){_loading.default.hide(),_approuter.default.show("wizard/wizardlibrary.html")}function onSubmit(e){var options;return this.querySelector(".txtPassword").value!==this.querySelector(".txtPasswordConfirm").value?(options=_globalize.default.translate("PasswordMatchError"),Emby.importModule("./modules/common/dialogs/alert.js").then(function(alert){return alert(options)})):function(form){_loading.default.show();var apiClient=ApiClient;apiClient.ajax({type:"POST",data:{Name:form.querySelector(".txtUsername").value,Password:form.querySelector(".txtPassword").value},url:apiClient.getUrl("Startup/User"),dataType:"json"}).then(onUpdateUserComplete)}(this),e.preventDefault(),!1}function View(view,params){_baseview.default.apply(this,arguments),view.querySelector(".wizardUserForm").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;apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user){page.querySelector(".txtUsername").value=user.Name||"",_loading.default.hide()})};_exports.default=View});