import{b as c}from"./chunk-7R64RXQ7.js";import{a as o,h as d}from"./chunk-HQJI5M5I.js";import{a as e}from"./chunk-PTMJTNEU.js";import{$ as a,ea as m,w as p}from"./chunk-PCDQIHDN.js";var y=(()=>{let n=class n{constructor(){this.http=m(d)}getAll(){return this.http.get(`${e.endpoints.api}/adminmessage`)}get(t){return this.http.get(`${e.endpoints.api}/adminmessage/${t}`)}create(t){let i=new o().set("content-type","application/json");return this.http.post(`${e.endpoints.api}/adminmessage`,t,{headers:i})}update(t){let i=new o().set("content-type","application/json");return this.http.put(`${e.endpoints.api}/adminmessage/${t.id}`,t,{headers:i})}delete(t){return this.http.delete(`${e.endpoints.api}/adminmessage/${t}`)}deleteBulk(t){let i=c(t,50),r=[];return i.forEach(h=>{r.push(this.http.delete(`${e.endpoints.api}/adminmessage/bulk/?id=${h.join("&id=")}`))}),p(r)}toggleState(t){return this.http.get(`${e.endpoints.api}/adminmessage/toggle/${t}`)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=a({token:n,factory:n.\u0275fac});let s=n;return s})();export{y as a};
