import{l as s,m as n}from"./index-C-gKvEDq.js";const r={getClaims:async t=>{const{data:a}=await s.get(n.CLAIMS,{params:t});return a?.data?.results?{results:a.data.results,count:a.data.count||a.data.results.length,next:a.data.next||null,previous:a.data.previous||null}:a},getClaim:async t=>{const{data:a}=await s.get(n.CLAIM_DETAIL(String(t)));return a.data||a},getClaimLines:async t=>(await r.getClaim(t)).lines||[],createClaim:async t=>{const{data:a}=await s.post(n.CLAIMS,t);return a.data||a},updateClaim:async(t,a)=>{const{data:e}=await s.put(n.CLAIM_DETAIL(String(t)),a);return e.data||e},deleteClaim:async t=>{await s.delete(n.CLAIM_DETAIL(String(t)))},submitClaim:async t=>{const{data:a}=await s.post(n.CLAIM_SUBMIT(String(t)),{});return a.data||a},batchSubmitClaims:async t=>{const{data:a}=await s.post(n.CLAIMS_BATCH_SUBMIT,t);return a.data||a},checkClaimStatus:async t=>{const{data:a}=await s.post(n.CLAIM_STATUS(String(t)),{});return a.data||a},denyClaim:async t=>{const{data:a}=await s.post(`${n.CLAIMS}${t}/deny/`,{});return a.data||a},getPendingClaims:async t=>{const{data:a}=await s.get(`${n.CLAIMS}pending/`,{params:t});return a?.data?.results?{results:a.data.results,count:a.data.count||a.data.results.length,next:a.data.next||null,previous:a.data.previous||null}:a},getDeniedClaims:async t=>{const{data:a}=await s.get(`${n.CLAIMS}denied/`,{params:t});return a?.data?.results?{results:a.data.results,count:a.data.count||a.data.results.length,next:a.data.next||null,previous:a.data.previous||null}:a},scrubClaim:async t=>{try{const{data:a}=await s.post(n.CLAIM_SCRUB,{claim_id:t});return a}catch{return{is_valid:!0,errors:[]}}}};export{r as c};
