import{j as I}from"./vendor-mui-CBBEb17G.js";import{a as t}from"./vendor-react-BBazpZul.js";import{cy as v,aI as G}from"./index-DdWwwZXu.js";const s=t.createContext(void 0),H=({children:o})=>{const{GetReceptionByReceptionIdAsync:r}=G(),{getGeneralHealthInfoAttribute:c}=v(),[i,e]=t.useState(!1),[l,u]=t.useState(null),[f,n]=t.useState(null),[p,x]=t.useState([]),y=async a=>{try{e(!0);const{data:m}=await r({receptionId:a});n(m)}finally{e(!1)}},d=async()=>{try{e(!0);const{data:a}=await c({});a&&x(a)}finally{e(!1)}};t.useEffect(()=>{d()},[]);const h={loading:i,patient:l,reception:f,attributes:p,setPatient:u,setReception:n,fetchReception:y};return I.jsx(s.Provider,{value:h,children:o})},R=()=>t.useContext(s);export{H as G,R as u};
