import{aj as u,r as p,y as a,z as n}from"./index-Bb2UEb_P.js";const f=u("invoices",()=>{const o=p(null);async function i(e){let t={status:"error",data:null};const s=await a.post(n.InvoiceMake,{...e});return s.data?.Exception?(t.status="error",t.data=s.data.Exception.String):(t.status="success",t.data=s.data),t}async function r(e){let t="ERROR";return await a.post(n.InvoiceEdit,{...e}).then(s=>{s?.data?.Status==="Ok"&&(t="SUCCESS")}).catch(()=>{t="ERROR"}),t}async function c(e){return await a.get(n.invoices,{params:{ID:e}})}return{invoicesList:o,InvoiceMake:i,InvoiceEdit:r,fetchInvoice:c}});export{f as u};
