import{l as e,n as i}from"./index-C9vqJYWU.js";import{t as o}from"./api-utils-SNhvzubv.js";import{a as c}from"./payer.enum-CwobLV1D.js";const s="/ar/claim-validation-rules",n="/ar/claim-validation-results",g={getAll:async a=>{const{data:t}=await e.get(`${s}/`,{params:o(a)});return t},getById:async a=>{const{data:t}=await e.get(`${s}/${a}/`);return t.data||t},create:async a=>{const{data:t}=await e.post(`${s}/`,a);return t.data},update:async(a,t)=>{const{data:r}=await e.put(`${s}/${a}/`,t);return r.data},delete:async a=>{await e.delete(`${s}/${a}/`)},getByCategory:async a=>{const t=a?{category:a}:{},{data:r}=await e.get(`${s}/by_category/`,{params:t});return r.data},getActiveRules:async()=>{const{data:a}=await e.get(`${s}/active_rules/`);return a.data}},m={getAll:async a=>{const{data:t}=await e.get(`${n}/`,{params:o(a)});return t},getById:async a=>{const{data:t}=await e.get(`${n}/${a}/`);return t.data},validateClaim:async a=>{const{data:t}=await e.post(`${n}/validate/`,{claim_id:a});return t.data},resolve:async(a,t)=>{const{data:r}=await e.post(`${n}/${a}/resolve/`,{resolution_notes:t});return r.data},getByClaim:async a=>{const{data:t}=await e.get(`${n}/by_claim/`,{params:{claim_id:a}});return t.data},getRequiresAttention:async()=>{const{data:a}=await e.get(`${n}/requires_attention/`);return a.data},getFailedValidations:async()=>{const{data:a}=await e.get(`${n}/failed_validations/`);return a.data}},d={denialCategories:["denial-categories"],denialCategory:a=>["denial-categories",a]},$=()=>i({queryKey:d.denialCategories,queryFn:()=>c.getAll(),staleTime:300*1e3}),p=a=>i({queryKey:d.denialCategory(a),queryFn:()=>c.getById(a),enabled:!!a});export{g as a,p as b,m as c,$ as u};
