import {p,l}from'./chunk-CIbFTbhP.js';import {S,R}from'./chunk-DgjB3m1L.js';import {j as j$1,h}from'./chunk-Blf_arF2.js';import {J,n2 as xn,a5 as fh,c as tS,eO as Es,H as ul,a7 as si,n3 as ye,ah as ot,ak as Jd,aa as ye$1,eR as mh,N as Sr,ac as Dr,ad as ce}from'./main-WUGO6e7n.js';var F,j=J(()=>{xn();j$1();fh();p();tS();Es();S();ul();si();F=(()=>{class r extends l{constructor(e,t,S,d){super(),this.pamAssetServices=e,this.pamErrorService=t,this.translator=S,this.cachingItem=new h(d);}create(e){return new ye(e)}getAll(e=!0){return this.cachingItem.getCache(e,this.getAllInternal())}getAllInternal(){return this.pamAssetServices.PamSshJitTemplates_GetAll().pipe(ot(e=>e.map(t=>(this.setBuiltInComputedProperties(t),t))),Jd(e=>this.pamErrorService.handleError(e)))}get(e){return this.pamAssetServices.PamSshJitTemplates_Get(e).pipe(ot(t=>(this.setBuiltInComputedProperties(t),t)))}save(e){return e.id?this.update(e).pipe(ot(t=>t?.id)):this.createSshJitTemplate(e).pipe(ot(t=>t?.id))}createSshJitTemplate(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Post(e)}update(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Put(e).pipe(Jd(t=>this.pamErrorService.handleError(t)))}delete(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Delete(e)}setBuiltInComputedProperties(e){e?.id===ye.builtInDefaultTemplateId&&(e.name=this.translator.translate("lblBuiltIn"),e.isBuiltIn=!0);}static{this.\u0275fac=function(t){return new(t||r)(ye$1(mh),ye$1(R),ye$1(Sr),ye$1(Dr))};}static{this.\u0275prov=ce({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();});export{F,j};