import{L as a}from"./index-ktJf6c6X.js";const o=a.injectEndpoints({endpoints:t=>({createIndent:t.mutation({query:e=>({url:"indent",method:"POST",body:e})}),updateIndent:t.mutation({query:e=>({url:"indent",method:"PUT",body:e})}),getIndentById:t.query({query:e=>`indent/${e}`}),getAllIndents:t.query({query:()=>"indent"}),deleteIndent:t.mutation({query:e=>({url:`indent/${e}`,method:"DELETE"})}),searchIndents:t.mutation({query:({page:e,size:n,searchValue:r})=>({url:"indent/search",method:"POST",params:{page:e,size:n,search:r||""}})}),createIndentFromQuotation:t.mutation({query:({quotationId:e,body:n})=>({url:`indent/from-quotation/${e}`,method:"POST",body:n||{}})}),createIndentFromSalesOrder:t.mutation({query:({soVersionId:e,body:n})=>({url:`indent/from-sales-order/${e}`,method:"POST",body:n||{}})}),createIndentFromDelivery:t.mutation({query:({deliveryId:e,body:n})=>({url:`indent/from-delivery/${e}`,method:"POST",body:n||{}})}),getEligibleItemsFromSalesOrder:t.query({query:e=>`indent/eligible-items/sales-order/${e}`}),getIndentsBySalesOrder:t.query({query:e=>`indent/by-sales-order/${e}`}),approveIndent:t.mutation({query:e=>({url:`indent/${e}/approve`,method:"POST"})}),releaseIndent:t.mutation({query:e=>({url:`indent/${e}/release`,method:"POST"})}),cancelIndent:t.mutation({query:({id:e,reason:n})=>({url:`indent/${e}/cancel`,method:"POST",body:{reason:n}})}),closeIndent:t.mutation({query:e=>({url:`indent/${e}/close`,method:"POST"})}),updatePickedQty:t.mutation({query:({indentId:e,itemId:n,pickedQty:r})=>({url:`indent/${e}/items/${n}/picked-qty`,method:"PUT",body:{pickedQty:r}})})})}),{useCreateIndentMutation:s,useUpdateIndentMutation:u,useGetIndentByIdQuery:i,useLazyGetIndentByIdQuery:y,useGetAllIndentsQuery:m,useDeleteIndentMutation:I,useSearchIndentsMutation:l,useCreateIndentFromQuotationMutation:c,useCreateIndentFromSalesOrderMutation:q,useCreateIndentFromDeliveryMutation:S,useGetEligibleItemsFromSalesOrderQuery:p,useLazyGetEligibleItemsFromSalesOrderQuery:h,useGetIndentsBySalesOrderQuery:O,useLazyGetIndentsBySalesOrderQuery:P,useApproveIndentMutation:$,useReleaseIndentMutation:M,useCancelIndentMutation:T,useCloseIndentMutation:Q,useUpdatePickedQtyMutation:g}=o;export{I as a,s as b,u as c,i as d,$ as e,M as f,T as g,Q as h,y as i,c as j,q as k,S as l,l as u};
