"use client"; import { createContext, useContext, ReactNode } from "react"; import { _getStaticHelpContent } from "../../../core/registry/helpStore"; import type { HelpContentConfig } from "../interfaces/help-content-config.interface"; const HelpContext = createContext(null); export function HelpProvider({ children }: { children: ReactNode }) { const cfg = _getStaticHelpContent(); if (!cfg) { throw new Error( "Help content not configured — call configureJsonApi({ helpContent: {...} }) before importing help components.", ); } return {children}; } export function useHelp(): HelpContentConfig { const ctx = useContext(HelpContext); if (!ctx) { throw new Error("useHelp() called outside . Wrap your help route group with ."); } return ctx; }