define(["loading","appRouter","emby-checkbox","emby-button","emby-select","css!./wizard"],function(loading,appRouter){"use strict";function save(page){loading.show();var apiClient=ApiClient,config={};config.EnableAutomaticPortMapping=page.querySelector("#chkEnableUpnp").checked,apiClient.ajax({type:"POST",data:config,url:apiClient.getUrl("Startup/RemoteAccess")}).then(function(){loading.hide(),appRouter.show("wizard/wizardagreement.html")})}function onSubmit(e){return save(this),e.preventDefault(),!1}return function(view){view.querySelector(".wizardSettingsForm").addEventListener("submit",onSubmit)}});