import{b as a}from"./chunk-YYVE3SN6.js";import{a as h}from"./chunk-ZTKV4AIV.js";import{h as u}from"./chunk-73IMXZSJ.js";import{aa as n,ca as r,ha as c,i as o,na as p,u as l}from"./chunk-FWZCAEAJ.js";var S=(()=>{let e=class e{constructor(){this.url="/config/table/group",this.httpClient=p(u),this.selectedEventService=p(a),this.triggerGet$=new o(!0)}getAll$(){return this.triggerGet$.pipe(n(()=>this.selectedEventService.selectedIdNotNull$),n(t=>this.httpClient.get(this.url,{params:{eventId:t}})),l(t=>t.sort((s,g)=>(s.position??1e6)-(g.position??1e6))))}getSingle$(t){return this.httpClient.get(`${this.url}/${h(t)}`)}create$(t){return this.httpClient.post(this.url,t).pipe(r(()=>this.triggerGet$.next(!0)))}update$(t){return this.httpClient.put(this.url,t).pipe(r(()=>this.triggerGet$.next(!0)))}delete$(t){return this.httpClient.delete(`${this.url}/${h(t)}`).pipe(r(()=>this.triggerGet$.next(!0)))}order$(t){return this.httpClient.patch(`${this.url}/order`,t,{params:{eventId:this.selectedEventService.selectedId()}}).pipe(r(()=>this.triggerGet$.next(!0)))}};e.\u0275fac=function(s){return new(s||e)},e.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();export{S as a};
