import{b as g,c as p}from"./chunk-IQVEYGHC.js";import{a as v}from"./chunk-CFFHWVA5.js";import{b as i}from"./chunk-C7V3KKPV.js";import{A as S,i as c,y as b}from"./chunk-2YE7XEKS.js";import{$d as m,Wd as u,a as I,b as f,ba as r,ka as l,ke as h,pa as d,w as a}from"./chunk-UNHECMG2.js";var A=(()=>{class n extends v{constructor(){let t=d(c),e=d(S);super(t,e,p,"Subscriptions")}getSubscriptionIdsByEventAndStudents(t,e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.EventId":`=${t}`,"filter.PersonId":`;${e}`}}).pipe(r(i(h)),a(s=>s.map(o=>o.Id)))}getSubscriptionsByStudent(t){return this.http.get(`${this.baseUrl}/`,{params:{"filter.PersonId":`=${t}`,"filter.IsOkay":"=1"}}).pipe(r(i(p)))}getSubscriptionIdsByStudent(t){return this.http.get(`${this.baseUrl}/`,{params:{"filter.PersonId":`=${t}`,"filter.IsOkay":"=1"}}).pipe(r(i(m(b(p.props,["Id","EventId"])))))}getSubscriptionCountsByEvents(t){return this.http.get(`${this.baseUrl}/`,{params:{"filter.EventId":`;${t.join(";")}`,fields:["Id","EventId"].join(",")}}).pipe(r(i(m({Id:u,EventId:u}))),a(e=>e.reduce((s,o)=>(s[o.EventId]=s[o.EventId]?s[o.EventId]+1:1,s),{})))}getSubscriptionsByCourse(t,e){return this.http.get(`${this.baseUrl}/`,{params:f(I({"filter.EventId":`=${t}`},e),{fields:["Id","EventId","EventDesignation","PersonId","Status","StatusId","RegistrationDate"].join(",")})}).pipe(r(i(p)))}getSubscriptionDetailsById(t){return this.http.get(`${this.baseUrl}/${t}/SubscriptionDetails`).pipe(r(i(g)))}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=l({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();export{A as a};
