import{T as s,U as i,H as c}from"./index-C5GbdPxY.js";function m(t,e=!1){return s.get(`/v1/online-menus/${t}`,{params:{return_all_translations:e}})}function l(t,e){return s.put(`/v1/online-menus/${t}`,e)}function f(t){return s.post("/v1/online-menus",t)}function p(t){return s.get("/v1/online-menus/form/meta",{params:{branch_id:t}})}function d(t){return s.get(`/v1/online-menus/${t}/menu`)}function h(){const t=i(),{t:e}=c();return{getShowData:async(r,o=!1)=>{var a,u;try{return{status:200,data:(await m(r,o)).data.body}}catch(n){return((a=n==null?void 0:n.response)==null?void 0:a.status)!==404&&t.error(e("core::errors.an_unexpected_error_occurred")),{status:(u=n==null?void 0:n.response)==null?void 0:u.status}}},update:l,store:f,getFormMeta:p,getOnlineMenuData:d}}export{h as u};
