import{a}from"./chunk-MBEC6LK4.js";import{H as o,Hc as n,M as l}from"./chunk-TVKQFRWX.js";var s=class r{http=l(n);baseUrl=`${a.apiUrl}/homepage-slides`;getPublic(){return this.http.get(`${this.baseUrl}/public`)}getAll(){return this.http.get(this.baseUrl)}create(e,t){return this.http.post(this.baseUrl,this.formData(e,t))}update(e,t){return this.http.put(`${this.baseUrl}/${e.id}`,this.formData(e,t))}delete(e){return this.http.delete(`${this.baseUrl}/${e}`)}imageUrl(e){return e?/^(data:|https?:\/\/|assets\/)/i.test(e)?e:`${a.FileUrl}${e.startsWith("/")?"":"/"}${e}`:""}formData(e,t){let i=new FormData;return i.append("slide",new Blob([JSON.stringify(e)],{type:"application/json"})),t&&i.append("image",t),i}static \u0275fac=function(t){return new(t||r)};static \u0275prov=o({token:r,factory:r.\u0275fac,providedIn:"root"})};export{s as a};