import{a as v,c as T}from"./chunk-F2AVZVRZ.js";import{a as h,b as g,c as u,d as C}from"./chunk-2PCDIQD3.js";import{$ as I,Qa as l,Ra as A,_ as o}from"./chunk-5H6QA4VB.js";import{P as c,Q as P}from"./chunk-DCSOZT4N.js";import{Gd as d,O as p,ma as S,na as O,r as m,sa as n,x as i,xa as s}from"./chunk-JSJB5BKT.js";import{e as f}from"./chunk-SZAW6ZBW.js";var y,_=f(()=>{S();O();C();I();T();d();g();A();P();y=(()=>{class r extends u{constructor(e,t,a){super(),this.errorService=e,this.pamAssetServices=t,this.cachingItem=new v(a)}create(e){return new o(e)}get(e){return this.pamAssetServices.PamOtp_GetPamOtpTemplate(e)}save(e){return e.id?this.update(e).pipe(i(t=>t?.id)):this.createTemplate(e).pipe(i(t=>t?.id))}delete(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamOtp_DeleteOtpTemplate(e).pipe(i(()=>!0))}getCredentialOtpCombineInfo(e){return this.pamAssetServices.PamOtp_GetCredentialOtpCombineInfo(e)}getList(e=!1,t=!0){return this.pamAssetServices.PamOtp_GetPamOtpTemplates(e,t)}getListAsSelectItems(e=!1){return this.cachingItem.getCache(e,this.getListAsSelectItemsInternal())}resolvePamCredentialOtp(e,t=!0){return t?this.handleError(this.pamAssetServices.PamOtp_ResolveCredentialOtp(e,!1)):this.pamAssetServices.PamOtp_ResolveCredentialOtp(e,!1)}resolvePamOtpTemplate(e){return this.pamAssetServices.PamOtp_ResolveOtp(e)}getListAsSelectItemsInternal(){return this.getList(!0,!1).pipe(i(e=>this.toSelectItems(e)))}toSelectItems(e){return e?e.map(t=>this.toSelectItem(t)):null}toSelectItem(e){return{label:e.name,value:e.id,otpTemplate:e}}createTemplate(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamOtp_PostPamOtpTemplate(e)}update(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamOtp_PutPamOtpTemplates(e.id,e)}handleError(e,t=null){return e.pipe(p(a=>(this.errorService.handleError(a),m(t))))}static{this.\u0275fac=function(t){return new(t||r)(s(h),s(l),s(c))}}static{this.\u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});export{y as a,_ as b};
