import{M as i,bd as c,pa as n,qf as s,sa as o}from"./chunk-JX7WA573.js";var h=(()=>{class e{constructor(t,r){this.httpClient=t,this.commonHttpErrorService=r}getAllCategories(){return this.httpClient.get("category")}delete(t){let r=`category/${t}`;return this.httpClient.delete(r)}update(t){let r=`category/${t.id}`;return this.httpClient.put(r,t)}add(t){return this.httpClient.post("category",t).pipe(i(this.commonHttpErrorService.handleError))}getSubCategories(t){let r=`category/${t}/subcategories`;return this.httpClient.get(r)}getAllCategoriesForDropDown(){return this.httpClient.get("category/dropdown")}static{this.\u0275fac=function(r){return new(r||e)(o(c),o(s))}}static{this.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{h as a};
