import{e as m,k as h,l as v}from"./chunk-6G52AAKU.js";import{a,b as L}from"./chunk-QQZCALHS.js";import{P as c,Q as d}from"./chunk-JE2X3YFA.js";import{q as n,v as U}from"./chunk-HW6LKGMV.js";import{Qf as l,Rf as R}from"./chunk-GDJMZZ4C.js";import{Rd as f,ma as V,q as o,sa as u,xa as i}from"./chunk-4HFZZ7HS.js";import{e as p}from"./chunk-SZAW6ZBW.js";var T,y=p(()=>{V();v();R();L();f();U();v();d();T=(()=>{class e{constructor(t,r,s){this.router=t,this.repositoryService=r,this.currentUserService=s,this.privateVaultURL="my-user-vault",this.oldPrivateVaultURL="private-vault",this.globalVaultURL="global-vault",this.infrastructureVaultURL="infrastructure-vault"}navigateToConnection(t,r){let s=this.getConnectionUrl(t,r);return o(this.router.navigateByUrl(s))}isPrivateVaultURL(t){let r=this.currentUserService.currentUserId;return t===this.privateVaultURL||t===this.oldPrivateVaultURL||t===r}isSystemVault(t){return t==="global-vault"}isInfrastructureVault(t){return t==="infrastructure-vault"}includesPrivateVaultInURL(t){return(t||"").includes(this.privateVaultURL)||(t||"").includes(this.oldPrivateVaultURL)}includesSystemVaultInURL(t){return(t||"").includes(this.globalVaultURL)}getRepositoryUrl(t){switch(t){case this.repositoryService.getPrivateVaultId():return`/connections/${this.privateVaultURL}`;case this.repositoryService.getSystemVaultId():return`/connections/${this.globalVaultURL}`;case a.pamSystemVaultID:return`/connections/${this.infrastructureVaultURL}`;default:return`/connections/${t||l.empty()}`}}getConnectionUrl(t,r){return this.getRepositoryUrl(t)+`/${r}`}vaultURLToVaultId(t){return this.isSystemVault(t)?m:this.isInfrastructureVault(t)?a.pamSystemVaultID:this.isPrivateVaultURL(t)?this.repositoryService.getPrivateVaultId():t}static{this.\u0275fac=function(r){return new(r||e)(i(n),i(h),i(c))}}static{this.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})()});export{T as a,y as b};
