import{c as m,g as h,h as v}from"./chunk-QX4MTOR7.js";import{a,b as L}from"./chunk-QQZCALHS.js";import{P as c,Q as d}from"./chunk-ANSWGJBN.js";import{Kb as l,Lb as R}from"./chunk-XBRJZCAD.js";import{j as n,o as U}from"./chunk-HO2J6YLX.js";import{Gd as f,ma as V,q as o,sa as u,xa as i}from"./chunk-JSJB5BKT.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};
