import{a as d,b as j}from"./chunk-DJLFA677.js";import{a as u,b as J}from"./chunk-NEKDTWKR.js";import{a as l,c as E}from"./chunk-YVVVIZWY.js";import{$a as T,Ya as c,Za as C,_a as h}from"./chunk-THQOQSZV.js";import{D as o,E as g}from"./chunk-I7GW4F3B.js";import{b as p,c as P}from"./chunk-YBNTOQCK.js";import{O as n,Sa as I,be as A,ta as m,x as i,xa as s}from"./chunk-WL5U2YIT.js";import{e as f}from"./chunk-ADEKKGI2.js";var M,B=f(()=>{C();E();I();j();A();T();J();P();g();M=(()=>{let r=class r extends d{constructor(e,t,S,v){super(),this.pamAssetServices=e,this.pamErrorService=t,this.translator=S,this.cachingItem=new l(v)}create(e){return new c(e)}getAll(e=!0){return this.cachingItem.getCache(e,this.getAllInternal())}getAllInternal(){return this.pamAssetServices.PamSshJitTemplates_GetAll().pipe(i(e=>e.map(t=>(this.setBuiltInComputedProperties(t),t))),n(e=>this.pamErrorService.handleError(e)))}get(e){return this.pamAssetServices.PamSshJitTemplates_Get(e).pipe(i(t=>(this.setBuiltInComputedProperties(t),t)))}save(e){return e.id?this.update(e).pipe(i(t=>t?.id)):this.createSshJitTemplate(e).pipe(i(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(n(t=>this.pamErrorService.handleError(t)))}delete(e){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Delete(e)}setBuiltInComputedProperties(e){e?.id===c.builtInDefaultTemplateId&&(e.name=this.translator.translate("lblBuiltIn"),e.isBuiltIn=!0)}};r.\u0275fac=function(t){return new(t||r)(s(h),s(u),s(p),s(o))},r.\u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"});let a=r;return a})()});export{M as a,B as b};
