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