import{H as a}from"./index-DWFi48i_.js";const r=a.injectEndpoints({endpoints:t=>({createInvoice:t.mutation({query:e=>({url:"billing",method:"POST",body:e})}),updateInvoice:t.mutation({query:e=>({url:"billing",method:"PUT",body:e})}),getInvoiceById:t.query({query:e=>`billing/${e}`}),getAllInvoices:t.query({query:()=>"billing"}),getInvoicesByStatus:t.query({query:e=>`billing/by-status/${e}`}),deleteInvoice:t.mutation({query:e=>({url:`billing/${e}`,method:"DELETE"})}),searchInvoices:t.mutation({query:({page:e,size:o,searchValue:n})=>({url:`billing/search-by-criteria?page=${e}&size=${o}`,method:"POST",body:{searchValue:n||""}})}),searchInvoicesByStatus:t.mutation({query:({page:e,size:o,status:n,searchValue:i})=>({url:`billing/search-by-criteria?page=${e}&size=${o}&status=${n}`,method:"POST",body:{searchValue:i||""}})}),createInvoiceFromDelivery:t.mutation({query:({deliveryId:e,body:o})=>({url:`billing/from-delivery/${e}`,method:"POST",body:o||{}})}),createInvoiceFromSalesOrder:t.mutation({query:({soVersionId:e,body:o})=>({url:`billing/from-sales-order/${e}`,method:"POST",body:o||{}})}),createInvoiceFromQuotation:t.mutation({query:({quotationId:e,body:o})=>({url:`billing/from-quotation/${e}`,method:"POST",body:o||{}})}),confirmFromSource:t.mutation({query:e=>({url:"billing/confirm-from-source",method:"POST",body:e})}),createInvoiceFromScrapRequest:t.mutation({query:({scrapRequestId:e,body:o})=>({url:`billing/from-scrap-request/${e}`,method:"POST",body:o||{}})}),approveInvoice:t.mutation({query:e=>({url:`billing/${e}/approve`,method:"POST"})}),confirmInvoice:t.mutation({query:e=>({url:`billing/${e}/confirm`,method:"POST"})}),cancelInvoice:t.mutation({query:({id:e,reason:o})=>({url:`billing/${e}/cancel`,method:"POST",body:{reason:o}})}),submitForApproval:t.mutation({query:e=>({url:`billing/${e}/submit`,method:"POST"})}),rejectInvoice:t.mutation({query:({id:e,reason:o})=>({url:`billing/${e}/reject`,method:"POST",body:{reason:o}})}),generateEInvoice:t.mutation({query:e=>({url:`billing/${e}/generate-einvoice`,method:"POST"})}),cancelIrn:t.mutation({query:({id:e,reason:o})=>({url:`billing/${e}/cancel-irn`,method:"POST",body:{reason:o}})}),generateEWayBill:t.mutation({query:e=>({url:`billing/${e}/generate-ewaybill`,method:"POST"})}),cancelEWayBill:t.mutation({query:({id:e,reason:o})=>({url:`billing/${e}/cancel-ewaybill`,method:"POST",body:{reason:o}})}),extendEWayBill:t.mutation({query:e=>({url:`billing/${e}/extend-ewaybill`,method:"POST"})}),getApprovalHistory:t.query({query:e=>`billing/${e}/approval-history`}),resolveSourceByNumber:t.query({query:({type:e,series:o,number:n})=>`billing/resolve-source?type=${encodeURIComponent(e)}&series=${encodeURIComponent(o)}&number=${n}`,keepUnusedDataFor:0})})}),{useCreateInvoiceMutation:l,useUpdateInvoiceMutation:s,useGetInvoiceByIdQuery:c,useLazyGetInvoiceByIdQuery:y,useGetAllInvoicesQuery:m,useDeleteInvoiceMutation:v,useSearchInvoicesMutation:I,useCreateInvoiceFromDeliveryMutation:g,useCreateInvoiceFromSalesOrderMutation:p,useCreateInvoiceFromQuotationMutation:q,useCreateInvoiceFromScrapRequestMutation:S,useConfirmFromSourceMutation:h,useApproveInvoiceMutation:$,useConfirmInvoiceMutation:d,useCancelInvoiceMutation:b,useGetInvoicesByStatusQuery:M,useSearchInvoicesByStatusMutation:O,useSubmitForApprovalMutation:P,useRejectInvoiceMutation:T,useGenerateEInvoiceMutation:B,useCancelIrnMutation:f,useGenerateEWayBillMutation:E,useCancelEWayBillMutation:F,useExtendEWayBillMutation:C,useGetApprovalHistoryQuery:A,useLazyGetApprovalHistoryQuery:Q,useLazyResolveSourceByNumberQuery:G}=r;export{O as a,p as b,I as c,l as d,s as e,d as f,B as g,f as h,E as i,F as j,C as k,$ as l,T as m,v as n,g as o,q as p,S as q,y as u};
