import{D as c,E as u}from"./chunk-I7GW4F3B.js";import{be as f,ta as s,xa as n}from"./chunk-WL5U2YIT.js";import{e as d}from"./chunk-ADEKKGI2.js";var h,p=d(()=>{f();u();h=(()=>{let r=class r{constructor(t){this.currentUserService=t,this.selections=[],this.subscribeToCurrentUser()}getRepositoryLastSelection(t){return this.selections.find(e=>e.repositoryId===t)}removeRepositoryLastSelection(t){if(!t||!t.repositoryId)return;let e=this.selections.find(i=>i.repositoryId===t.repositoryId);e&&e.connectionId===t.connectionId&&(this.selections=this.selections.filter(i=>i.connectionId!==t.connectionId))}setRepositoryLastSelection(t){if(!t||!t.repositoryId)return;let e=this.selections.find(i=>i.repositoryId===t.repositoryId);e?e.connectionId=t.connectionId:this.selections.push(t)}subscribeToCurrentUser(){this.currentUserService.currentUserChanged.subscribe(()=>this.selections=[])}};r.\u0275fac=function(e){return new(e||r)(n(c))},r.\u0275prov=s({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})()});export{h as a,p as b};
