"use client"; import { createContext, useContext } from "react"; /** * The two ambient facts an activity card needs from the screen around it: * * - the deck's own notes text, so the feedback panel can show the passage an * answer came from (NotesSource). Absent on screens with no notes (the * homework guide's checkpoints); * - whether reveals are off (exam mode), which hides the hints *and* that * passage — both give the answer away. * * Its own module (not shared.tsx) because NotesSource needs these hooks while * shared.tsx renders NotesSource; a cycle there would be fragile. */ const NotesTextContext = createContext(undefined); export function NotesTextProvider({ value, children }: { value?: string; children: React.ReactNode }) { return {children}; } export function useNotesText(): string | undefined { return useContext(NotesTextContext); } const NoHintsContext = createContext(false); export function NoHintsProvider({ value, children }: { value: boolean; children: React.ReactNode }) { return {children}; } export function useNoHints(): boolean { return useContext(NoHintsContext); }