import { createContext, useContext } from "react"; /** Whether the home's bill read lets it say nothing is owed: still reading, or failed or incomplete. */ export type PatientBillsCheck = { loading: boolean; failed: boolean }; // Kept apart from the reader so a surface that never reads bills is not held up by them. export const PatientBillsCheckContext = createContext({ loading: false, failed: false }); export const usePatientBillsCheck = (): PatientBillsCheck => useContext(PatientBillsCheckContext);