import {J as J$1,a5 as fh,At as Zc,ec as ND,ae as x,Av as Yc,c as tS,ag as lp,aZ as Dt,H as ul,b3 as w,ei as I4,aJ as hf,ah as ot,Aw as Va,Au as va,ai as o$1,aa as ye,am as Dh,b6 as Yi,N as Sr,bd as K,ad as ce}from'./main-WUGO6e7n.js';var H,J=J$1(()=>{fh();Zc();ND();x();Yc();tS();lp();Dt();ul();w();H=(()=>{class i extends I4{constructor(e,s,o,t){super(o,t),this.assetsService=e,this.messageService=s;}backupNow(){return this.assetsService.BackupNow().pipe(hf(e=>this.handleApiResult(e,"BackupFailed")),hf(e=>this.sendBackupToastOnSuccess(e)),ot(e=>this.isSuccessful(e)))}saveBackupConfig(e){return this.assetsService.SaveBackupJob(e).pipe(hf(s=>this.sendToastOnSuccess(s)),ot(s=>this.handleSaveApiResult(s)))}getBackupJob(){return this.assetsService.GetBackupJob().pipe(hf(e=>this.handleGetApiResult(e)),ot(e=>this.returnWhenSuccessful(e,()=>new Va(e.data))))}getDatabaseBackupsLogs(e,s,o){return this.assetsService.GetDatabaseBackupLogs(e,s,o).pipe(hf(t=>this.handleGetApiResult(t)),ot(t=>this.returnWhenSuccessful(t,()=>(t.data||[]).map(f=>new va(f)))))}sendToastOnSuccess(e){e.result===o$1.Success&&this.messageService.add({key:"globalToast",severity:"success",summary:this.translatorService.translate("lblSavedSuccessfully"),detail:this.translatorService.translate("TheDataHasBeenSuccessfullySaved")});}sendBackupToastOnSuccess(e){e.result===o$1.Success&&this.messageService.add({key:"globalToast",severity:"success",summary:this.translatorService.translate("Success"),detail:this.translatorService.translate("BackupCreated")});}static{this.\u0275fac=function(s){return new(s||i)(ye(Dh),ye(Yi),ye(Sr),ye(K))};}static{this.\u0275prov=ce({token:i,factory:i.\u0275fac,providedIn:"root"});}}return i})();});export{H,J};