import{a as v,b as J}from"./chunk-SN34CLEC.js";import{a as f,b as T}from"./chunk-NMBI62AY.js";import{a as d,c as C}from"./chunk-4MUEJ55U.js";import{Ua as c,Va as P,Wa as u,Xa as j}from"./chunk-SS6ERTE2.js";import{V as l,W as A}from"./chunk-INYFUTXB.js";import{b as h,c as g}from"./chunk-IBUDDWQO.js";import{O as o,Sd as p,oa as I,ta as a,x as i,ya as s}from"./chunk-XJKQ67XR.js";import{e as m}from"./chunk-SZAW6ZBW.js";var G,E=m(()=>{P();C();I();J();p();j();T();g();A();G=(()=>{class r extends v{constructor(t,e,n,S){super(),this.pamAssetServices=t,this.pamErrorService=e,this.translator=n,this.cachingItem=new d(S)}create(t){return new c(t)}getAll(t=!0){return this.cachingItem.getCache(t,this.getAllInternal())}getAllInternal(){return this.pamAssetServices.PamSshJitTemplates_GetAll().pipe(i(t=>t.map(e=>(this.setBuiltInComputedProperties(e),e))),o(t=>this.pamErrorService.handleError(t)))}get(t){return this.pamAssetServices.PamSshJitTemplates_Get(t).pipe(i(e=>(this.setBuiltInComputedProperties(e),e)))}save(t){return t.id?this.update(t).pipe(i(e=>e?.id)):this.createSshJitTemplate(t).pipe(i(e=>e?.id))}createSshJitTemplate(t){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Post(t)}update(t){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Put(t).pipe(o(e=>this.pamErrorService.handleError(e)))}delete(t){return this.cachingItem.invalidateCache(),this.pamAssetServices.PamSshJitTemplates_Delete(t)}setBuiltInComputedProperties(t){t?.id===c.builtInDefaultTemplateId&&(t.name=this.translator.translate("lblBuiltIn"),t.isBuiltIn=!0)}static{this.\u0275fac=function(e){return new(e||r)(s(u),s(f),s(h),s(l))}}static{this.\u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});var M,B=m(()=>{p();M=(()=>{class r{generatePreview(t){let e=t.commands?.join(", ")||"ALL",n=t.tags?.length>0?t.tags.join(": ")+": ":"";return`${t.hostList}=${t.runasSpec} ${n}${e}`}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});export{G as a,E as b,M as c,B as d};
