import{b as f}from"./chunk-FVVYD7H6.js";import{a as $}from"./chunk-ZTKV4AIV.js";import{h as m}from"./chunk-73IMXZSJ.js";import{K as c,Z as u,aa as s,ca as r,ha as g,i as p,m as h,na as o,u as l,v as a}from"./chunk-FWZCAEAJ.js";var j=(()=>{let e=class e{constructor(){this.url="/config/event",this.httpClient=o(m),this.selectedOrganisationService=o(f),this.triggerGet$=new p(!0)}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}/${$(t)}`).pipe(r(()=>this.triggerGet$.next(!0)))}getAll$(){return a([this.triggerGet$,this.selectedOrganisationService.selectedIdNotNull$]).pipe(s(([,t])=>this.httpClient.get(this.url,{params:{organisationId:t}})),l(t=>t.sort((n,d)=>n.name.trim().toLowerCase().localeCompare(d.name.trim().toLowerCase()))),u(1),c(()=>h))}getSingle$(t){return this.triggerGet$.pipe(s(()=>this.httpClient.get(`${this.url}/${t}`)))}clone$(t){return this.httpClient.put(`${this.url}/${t}/clone`,void 0).pipe(r(()=>this.triggerGet$.next(!0)))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();export{j as a};
