import{b as m}from"./chunk-YYVE3SN6.js";import{a as n}from"./chunk-ZTKV4AIV.js";import{h as c}from"./chunk-73IMXZSJ.js";import{A as u,aa as s,ca as i,ha as a,i as h,na as p,u as o}from"./chunk-FWZCAEAJ.js";var w=(()=>{let r=class r{constructor(){this.url="/config/printer",this.httpClient=p(c),this.selectedEventService=p(m),this.triggerGet$=new h(!0)}getAll$(){return this.triggerGet$.pipe(s(()=>this.selectedEventService.selectedIdNotNull$),s(t=>this.httpClient.get(this.url,{params:{eventId:t}})),o(t=>(t=t.map(e=>(e.fontScale=e.fontScale/10,e)),t.sort((e,$)=>e.name.trim().toLowerCase().localeCompare($.name.trim().toLowerCase())))))}getAllFonts$(){return this.httpClient.get(`${this.url}/fonts`)}getSingle$(t){return this.httpClient.get(`${this.url}/${n(t)}`).pipe(o(e=>(e.fontScale=e.fontScale/10,e)))}create$(t){return this.httpClient.post(this.url,t).pipe(i(()=>this.triggerGet$.next(!0)))}update$(t){return this.httpClient.put(this.url,t).pipe(i(()=>this.triggerGet$.next(!0)))}delete$(t){return this.httpClient.delete(`${this.url}/${n(t)}`).pipe(i(()=>this.triggerGet$.next(!0)))}deleteAll$(t){return u(t.map(e=>this.httpClient.delete(`${this.url}/${n(e)}`))).pipe(i(()=>this.triggerGet$.next(!0)))}};r.\u0275fac=function(e){return new(e||r)},r.\u0275prov=a({token:r,factory:r.\u0275fac,providedIn:"root"});let l=r;return l})();export{w as a};
