import{P as n,Q as u}from"./chunk-JE2X3YFA.js";import{Rd as d,sa as o,xa as s}from"./chunk-4HFZZ7HS.js";import{e as c}from"./chunk-SZAW6ZBW.js";var a,f=c(()=>{d();u();a=(()=>{class r{constructor(e){this.currentUserService=e,this.selections=[],this.subscribeToCurrentUser()}getRepositoryLastSelection(e){return this.selections.find(t=>t.repositoryId===e)}removeRepositoryLastSelection(e){if(!e||!e.repositoryId)return;let t=this.selections.find(i=>i.repositoryId===e.repositoryId);t&&t.connectionId===e.connectionId&&(this.selections=this.selections.filter(i=>i.connectionId!==e.connectionId))}setRepositoryLastSelection(e){if(!e||!e.repositoryId)return;let t=this.selections.find(i=>i.repositoryId===e.repositoryId);t?t.connectionId=e.connectionId:this.selections.push(e)}subscribeToCurrentUser(){this.currentUserService.currentUserChanged.subscribe(()=>this.selections=[])}static{this.\u0275fac=function(t){return new(t||r)(s(n))}}static{this.\u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});export{a,f as b};
