import{L as r}from"./index-ktJf6c6X.js";const a=r.injectEndpoints({endpoints:t=>({createSalesReturn:t.mutation({query:e=>({url:"sales-return",method:"POST",body:e})}),updateSalesReturn:t.mutation({query:e=>({url:"sales-return",method:"PUT",body:e})}),getSalesReturnById:t.query({query:e=>`sales-return/${e}`}),getAllSalesReturns:t.query({query:()=>"sales-return"}),deleteSalesReturn:t.mutation({query:e=>({url:`sales-return/${e}`,method:"DELETE"})}),searchSalesReturns:t.mutation({query:({page:e,size:s,searchValue:u})=>({url:`sales-return/search-by-criteria?page=${e}&size=${s}`,method:"POST",body:{searchValue:u||""}})}),createSalesReturnFromInvoice:t.mutation({query:({invoiceId:e,body:s})=>({url:`sales-return/from-invoice/${e}`,method:"POST",body:s||{}})}),getSalesReturnsByInvoice:t.query({query:e=>`sales-return/by-invoice/${e}`}),approveSalesReturn:t.mutation({query:e=>({url:`sales-return/${e}/approve`,method:"POST"})}),receiveSalesReturn:t.mutation({query:e=>({url:`sales-return/${e}/receive`,method:"POST"})}),completeQc:t.mutation({query:({id:e,items:s})=>({url:`sales-return/${e}/complete-qc`,method:"POST",body:s})}),closeSalesReturn:t.mutation({query:e=>({url:`sales-return/${e}/close`,method:"POST"})}),cancelSalesReturn:t.mutation({query:({id:e,reason:s})=>({url:`sales-return/${e}/cancel`,method:"POST",body:{reason:s}})})})}),{useCreateSalesReturnMutation:o,useUpdateSalesReturnMutation:l,useGetSalesReturnByIdQuery:S,useLazyGetSalesReturnByIdQuery:c,useGetAllSalesReturnsQuery:y,useDeleteSalesReturnMutation:i,useSearchSalesReturnsMutation:m,useCreateSalesReturnFromInvoiceMutation:R,useGetSalesReturnsByInvoiceQuery:p,useApproveSalesReturnMutation:q,useReceiveSalesReturnMutation:h,useCompleteQcMutation:v,useCloseSalesReturnMutation:d,useCancelSalesReturnMutation:$}=a;export{l as a,q as b,h as c,v as d,d as e,$ as f,m as g,c as h,i,y as j,o as u};
