import{K as n}from"./index-CYy8zBsj.js";const r="stock-transfer-receive",o=e=>{const t=new URLSearchParams;return t.append("page",String(e.page??0)),t.append("size",String(e.size??20)),e.transferId&&t.append("transferId",String(e.transferId)),e.searchText&&t.append("searchText",e.searchText),e.dateFrom&&t.append("dateFrom",e.dateFrom),e.dateTo&&t.append("dateTo",e.dateTo),e.status&&t.append("status",e.status),e.sort&&t.append("sort",e.sort),t.toString()},c=n.injectEndpoints({endpoints:e=>({listStockTransferReceives:e.query({query:t=>({url:`${r}?${o(t)}`,method:"GET"})}),listStockTransferReceivesByTransfer:e.query({query:t=>({url:`${r}/by-transfer/${t}`,method:"GET"})}),getStockTransferReceiveById:e.query({query:t=>({url:`${r}/${t}`,method:"GET"})}),getStockTransferReceiveSeed:e.query({query:t=>({url:`${r}/seed/transfer/${t}`,method:"GET"})}),getReceivableTransfers:e.query({query:()=>({url:`${r}/receivable-transfers`,method:"GET"})}),getNextReceiveNo:e.query({query:()=>({url:`${r}/next-receive-no`,method:"GET"})}),createStockTransferReceive:e.mutation({query:({body:t,idempotencyKey:s})=>({url:r,method:"POST",body:t,headers:s?{"Idempotency-Key":s}:void 0})}),updateStockTransferReceive:e.mutation({query:({body:t})=>({url:r,method:"PUT",body:t})}),cancelStockTransferReceive:e.mutation({query:({id:t,body:s})=>({url:`${r}/${t}/cancel`,method:"POST",body:s})}),deleteStockTransferReceive:e.mutation({query:t=>({url:`${r}/${t}`,method:"DELETE"})})}),overrideExisting:!1}),{useListStockTransferReceivesQuery:i,useListStockTransferReceivesByTransferQuery:u,useGetStockTransferReceiveByIdQuery:T,useGetStockTransferReceiveSeedQuery:f,useLazyGetStockTransferReceiveSeedQuery:d,useGetReceivableTransfersQuery:y,useGetNextReceiveNoQuery:S,useCreateStockTransferReceiveMutation:v,useUpdateStockTransferReceiveMutation:R,useCancelStockTransferReceiveMutation:k,useDeleteStockTransferReceiveMutation:q}=c;export{T as a,k as b,y as c,d,v as e,i as u};
