import * as React from "react"; import { AppConfig } from "../types/config"; export const ConfigContext = React.createContext(null); export function useConfig() { const context = React.useContext(ConfigContext); if (context === undefined) { throw new Error("useConfig must be used within a ConfigProvider"); } return context; }