import {J,c as tS,a7 as si,aa as ye,ac as Dr,ad as ce}from'./main-WUGO6e7n.js';var a$1,f=J(()=>{tS();si();a$1=(()=>{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)(ye(Dr))};}static{this.\u0275prov=ce({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();});export{a$1 as a,f};