define(["exports","./../../modules/viewmanager/basesettingsview.js","./../../modules/loading/loading.js","./../../modules/formhelper.js"],function(_exports,_basesettingsview,_loading,_formhelper){function onSubmit(e){_loading.default.show();var view=this.closest(".view");return ApiClient.getServerConfiguration().then(function(config){config.OptimizeDatabaseOnShutdown=view.querySelector(".chkOptimizeOnShutdown").checked,config.VacuumDatabaseOnStartup=view.querySelector(".chkVacuum").checked,config.DatabaseCacheSizeMB=view.querySelector(".txtCacheSize").value,config.DatabaseAnalysisLimit=view.querySelector(".txtAnalysisLimit").value,ApiClient.updateServerConfiguration(config).then(_formhelper.default.handleConfigurationSavedResponse)}),e.preventDefault(),e.stopPropagation(),!1}function DatabaseView(view,params){_basesettingsview.default.apply(this,arguments),view.querySelector("form").addEventListener("submit",onSubmit)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(DatabaseView.prototype,_basesettingsview.default.prototype),DatabaseView.prototype.loadSettingsInternal=function(){return view=this.view,ApiClient.getServerConfiguration().then(function(config){view.querySelector(".chkOptimizeOnShutdown").checked=config.OptimizeDatabaseOnShutdown||!1,view.querySelector(".chkVacuum").checked=config.VacuumDatabaseOnStartup||!1,view.querySelector(".txtCacheSize").value=config.DatabaseCacheSizeMB||96,view.querySelector(".txtAnalysisLimit").value=config.DatabaseAnalysisLimit||400});var view},_exports.default=DatabaseView});