import{l as s,m as e}from"./index-Cc987VYg.js";const A={getApprovalRequests:async a=>{const{data:t}=await s.get(e.APPROVAL_REQUESTS,{params:a});return t},getPendingApprovals:async a=>{const{data:t}=await s.get(e.APPROVAL_REQUESTS_PENDING,{params:a});return t},getApprovalRequest:async a=>{const{data:t}=await s.get(`${e.APPROVAL_REQUESTS}${a}/`);return t.data||t},approveRequest:async(a,t)=>{const{data:n}=await s.post(e.APPROVAL_APPROVE(a),t);return n.data},rejectRequest:async(a,t)=>{const{data:n}=await s.post(e.APPROVAL_REJECT(a),t);return n.data},delegateRequest:async(a,t)=>{const{data:n}=await s.post(e.APPROVAL_DELEGATE(a),t);return n.data},getApprovalHistory:async a=>{const{data:t}=await s.get(e.APPROVAL_HISTORY(a));return t.data},getApprovalActions:async a=>{const{data:t}=await s.get(`${e.APPROVAL_REQUESTS}actions/`,{params:a});return t},getApprovalStatistics:async()=>{const{data:a}=await s.get(`${e.APPROVAL_REQUESTS}statistics/`);return a.data},cancelRequest:async a=>{await s.post(`${e.APPROVAL_REQUESTS}${a}/cancel/`)}};export{A as a};
