import{e as h,k as p,l as V}from"./chunk-YKFXM3J7.js";import{a as u,b as y}from"./chunk-4ERZBM5I.js";import{D as m,E as L}from"./chunk-I7GW4F3B.js";import{qg as c,rg as d}from"./chunk-BPZQKZKD.js";import{D as l,I as R}from"./chunk-HTXYTVN4.js";import{be as U,na as f,q as o,ta as n,xa as i}from"./chunk-WL5U2YIT.js";import{e as v}from"./chunk-ADEKKGI2.js";var D,I=v(()=>{f();V();d();y();U();R();V();L();D=(()=>{let e=class e{constructor(t,r,a){this.router=t,this.repositoryService=r,this.currentUserService=a,this.privateVaultURL="my-user-vault",this.oldPrivateVaultURL="private-vault",this.globalVaultURL="global-vault",this.infrastructureVaultURL="infrastructure-vault"}navigateToConnection(t,r){let a=this.getConnectionUrl(t,r);return o(this.router.navigateByUrl(a))}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 u.pamSystemVaultID:return`/connections/${this.infrastructureVaultURL}`;default:return`/connections/${t||c.empty()}`}}getConnectionUrl(t,r){return this.getRepositoryUrl(t)+`/${r}`}vaultURLToVaultId(t){return this.isSystemVault(t)?h:this.isInfrastructureVault(t)?u.pamSystemVaultID:this.isPrivateVaultURL(t)?this.repositoryService.getPrivateVaultId():t}};e.\u0275fac=function(r){return new(r||e)(i(l),i(p),i(m))},e.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"});let s=e;return s})()});export{D as a,I as b};
