import{C as l,Cc as u,N as s,V as m,Y as f,Yc as h,gd as v,h as p,hd as g,l as n,p as a,pd as c,r as o}from"./chunk-JVZYLTZ6.js";var y=(()=>{class r{constructor(i,t){this.linkService=i,this.indexService=t,this.stangIndexSubject=new p(null),this.stangIndexSubject$=this.stangIndexSubject.asObservable(),this.utfardadeBevisNotifieringar$=this.indexService.exIndex$.pipe(c(),o(e=>this.hamtaUtfardatBevisNotifieringar(e)),s(1)),this.utfardadeBevisNotifieringarPaStartsidaMedDoljNotifiering$=this.utfardadeBevisNotifieringar$.pipe(c(),a(e=>u(e)),l(this.stangIndexSubject$),o(([e,d])=>(d!==null&&e.splice(d,1),n(e))),s(1))}stangNotifiering(i){this.stangIndexSubject.next(i)}hamtaUtfardatBevisNotifieringar(i){let t=this.linkService.findByRel(i,h.examen.utfardatbevisnotiser_for_student,"GET");return console.log("Notifieringar",i,t),t?this.linkService.foljLank(t).pipe(a(e=>e.UtfardatBevisNotifieringTillStudent)):n([])}static{this.\u0275fac=function(t){return new(t||r)(f(v),f(g))}}static{this.\u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{y as a};