import {J,a5 as fh,ec as ND,c as tS,H as ul,b3 as w,ag as lp,aZ as Dt,ei as I4,aJ as hf,ah as ot,aa as ye,N as Sr,bd as K,am as Dh,b6 as Yi,ad as ce}from'./main-WUGO6e7n.js';var E,T=J(()=>{fh();ND();tS();ul();w();lp();Dt();E=(()=>{class i extends I4{constructor(e,t,s,d){super(e,t),this.assetService=s,this.messageService=d;}generateApiKey(){return this.assetService.GenerateApiKey().pipe(hf(e=>this.handleGetApiResult(e)),hf(e=>this.executeBasedOnResult(e,()=>this.showToast("success","lblSuccess","YourApiKeyWasGenerated"),()=>this.showToast("error","lblError","AnUnexpectedErrorOccuredContactYourAdmin"))),ot(e=>this.returnWhenSuccessful(e,()=>e.data)))}deleteApiKey(e){return this.assetService.DeleteApiKey(e).pipe(hf(t=>this.handleGetApiResult(t)),hf(t=>this.executeBasedOnResult(t,()=>this.showToast("success","lblSuccess","YourApiKeyWasDeleted"),()=>this.showToast("error","lblError","AnUnexpectedErrorOccuredContactYourAdmin"))),ot(t=>this.returnWhenSuccessful(t,()=>!0)))}updateApiKey(e,t){return this.assetService.UpdateApiKey(e,t).pipe(hf(s=>this.handleGetApiResult(s)),ot(s=>this.returnWhenSuccessful(s,()=>s)))}listApiKeys(){return this.assetService.ListApiKeys().pipe(hf(e=>this.handleGetApiResult(e)),ot(e=>this.returnWhenSuccessful(e,()=>e.data)))}showToast(e,t,s){this.messageService.add({key:"globalToast",severity:e,summary:this.translatorService.translate(t),detail:this.translatorService.translate(s)});}static{this.\u0275fac=function(t){return new(t||i)(ye(Sr),ye(K),ye(Dh),ye(Yi))};}static{this.\u0275prov=ce({token:i,factory:i.\u0275fac,providedIn:"root"});}}return i})();});export{E,T};