import{L as y}from"./index-DlNZgIG9.js";const a=y.injectEndpoints({endpoints:t=>({createDelivery:t.mutation({query:e=>({url:"delivery",method:"POST",body:e})}),updateDelivery:t.mutation({query:e=>({url:"delivery",method:"PUT",body:e})}),getDeliveryById:t.query({query:e=>`delivery/${e}`}),getAllDeliveries:t.query({query:()=>"delivery"}),deleteDelivery:t.mutation({query:e=>({url:`delivery/${e}`,method:"DELETE"})}),createDeliveryFromSO:t.mutation({query:e=>({url:"delivery/from-so",method:"POST",body:e})}),addDeliveryItem:t.mutation({query:({id:e,body:r})=>({url:`delivery/${e}/items`,method:"POST",body:r})}),updateDeliveryItem:t.mutation({query:({id:e,itemId:r,body:i})=>({url:`delivery/${e}/items/${r}`,method:"PUT",body:i})}),deleteDeliveryItem:t.mutation({query:({id:e,itemId:r})=>({url:`delivery/${e}/items/${r}`,method:"DELETE"})}),addDeliveryCharge:t.mutation({query:({id:e,body:r})=>({url:`delivery/${e}/charges`,method:"POST",body:r})}),updateDeliveryCharge:t.mutation({query:({id:e,chargeId:r,body:i})=>({url:`delivery/${e}/charges/${r}`,method:"PUT",body:i})}),deleteDeliveryCharge:t.mutation({query:({id:e,chargeId:r})=>({url:`delivery/${e}/charges/${r}`,method:"DELETE"})}),submitDeliveryForApproval:t.mutation({query:e=>({url:`delivery/${e}/submit-approval`,method:"POST"})}),approveDelivery:t.mutation({query:e=>({url:`delivery/${e}/approve`,method:"POST"})}),rejectDelivery:t.mutation({query:({id:e,reason:r})=>({url:`delivery/${e}/reject`,method:"POST",body:{reason:r}})}),confirmDelivery:t.mutation({query:e=>({url:`delivery/${e}/confirm`,method:"POST"})}),dispatchDelivery:t.mutation({query:e=>({url:`delivery/${e}/dispatch`,method:"POST"})}),cancelDelivery:t.mutation({query:({id:e,reason:r})=>({url:`delivery/${e}/cancel`,method:"POST",body:{reason:r}})}),closeDelivery:t.mutation({query:e=>({url:`delivery/${e}/close`,method:"POST"})}),searchDeliveries:t.mutation({query:({page:e,size:r,...i})=>({url:`delivery/search-by-criteria?page=${e}&size=${r}`,method:"POST",body:i})}),getDeliveriesBySalesOrder:t.query({query:e=>`delivery/by-so/${e}`})})}),{useSearchDeliveriesMutation:l,useCreateDeliveryMutation:o,useUpdateDeliveryMutation:v,useGetDeliveryByIdQuery:s,useLazyGetDeliveryByIdQuery:m,useGetAllDeliveriesQuery:D,useDeleteDeliveryMutation:d,useCreateDeliveryFromSOMutation:n,useAddDeliveryItemMutation:h,useUpdateDeliveryItemMutation:c,useDeleteDeliveryItemMutation:p,useAddDeliveryChargeMutation:q,useUpdateDeliveryChargeMutation:$,useDeleteDeliveryChargeMutation:S,useSubmitDeliveryForApprovalMutation:M,useApproveDeliveryMutation:T,useRejectDeliveryMutation:O,useConfirmDeliveryMutation:P,useDispatchDeliveryMutation:g,useCancelDeliveryMutation:C,useCloseDeliveryMutation:E,useGetDeliveriesBySalesOrderQuery:I,useLazyGetDeliveriesBySalesOrderQuery:A}=a;export{v as a,M as b,T as c,O as d,P as e,g as f,C as g,E as h,l as i,m as j,d as k,n as l,o as u};
