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