import { createContext, useContext } from "react"; import type { FootnoteInfo } from "./usePageFootnotes"; type FootnoteContextValue = { pageID: string; footnotes: FootnoteInfo[]; indexMap: Record; }; export const FootnoteContext = createContext({ pageID: "", footnotes: [], indexMap: {}, }); export function useFootnoteContext() { return useContext(FootnoteContext); }