import{e as r}from"./index-Da-VPv7f.js";const a=r.injectEndpoints({endpoints:u=>({createPurchaseRequest:u.mutation({query:({payload:e})=>({url:"purchase-request",method:"POST",body:e})}),getPurchaseRequestById:u.query({query:({id:e})=>({url:`purchase-request/${e}`,method:"GET"})}),searchPurchaseRequests:u.mutation({query:({page:e,size:s,criteria:t})=>({url:`purchase-request/search-by-criteria?page=${e}&size=${s}`,method:"POST",body:t??{}})}),approvePurchaseRequest:u.mutation({query:({id:e,payload:s})=>({url:`purchase-request/${e}/approve`,method:"PUT",body:s})}),rejectPurchaseRequest:u.mutation({query:({id:e,payload:s})=>({url:`purchase-request/${e}/reject`,method:"PUT",body:s})}),issuePurchase:u.mutation({query:({payload:e})=>({url:"purchase-request/issue",method:"POST",body:e})}),returnPurchase:u.mutation({query:({payload:e})=>({url:"purchase-request/return",method:"POST",body:e})}),deletePurchaseRequest:u.mutation({query:({id:e})=>({url:`purchase-request/${e}`,method:"DELETE"})}),getPendingPurchaseAlerts:u.query({query:()=>({url:"purchase-request/pending-alerts",method:"GET"})})})}),{useCreatePurchaseRequestMutation:h,useLazyGetPurchaseRequestByIdQuery:o,useSearchPurchaseRequestsMutation:q,useApprovePurchaseRequestMutation:n,useRejectPurchaseRequestMutation:P,useIssuePurchaseMutation:p,useReturnPurchaseMutation:y,useDeletePurchaseRequestMutation:i,useGetPendingPurchaseAlertsQuery:m}=a;export{n as a,P as b,p as c,y as d,q as e,o as f,m as g,h as u};
