import { EditorState } from 'prosemirror-state';
/** §17.11.11 — per-section overrides for a note's numFmt / numStart / numRestart. */
export type SectionNoteConfig = {
    numFmt?: string;
    numStart?: number;
    numRestart?: 'continuous' | 'eachPage' | 'eachSect';
};
export type NoteNumberingResult = {
    numberById: Record<string, number>;
    /** Set only when at least one section overrides numFmt; consumers prefer this map per-id. */
    formatById?: Record<string, string>;
    order: string[];
};
export type NumberingOptions = {
    /** Initial counter (document-wide w:numStart, default 1). */
    startCounter: number;
    /** Document-wide w:numFmt (used as fallback when no section override). */
    defaultNumFmt?: string;
    /** Document-wide w:numRestart (default 'continuous'). */
    defaultRestart?: 'continuous' | 'eachPage' | 'eachSect';
    /** §17.11.11 — section-index → override config. Sections without overrides are absent. */
    sectionConfigs?: Map<number, SectionNoteConfig>;
    /**
     * §17.11.19 eachPage — per-ref page assignment from a prior layout pass.
     * When provided AND the active restart is `eachPage`, the counter resets at
     * each page boundary. Refs not in the map are treated as page 0 (initial).
     *
     * NOTE: callers in the SuperDoc layout pipeline do not yet thread this map.
     * Numbering runs BEFORE pagination, so per-page assignments are not
     * available; the orchestrator coerces `eachPage` → `continuous` in that
     * scenario. Implementing this properly requires a two-pass pagination
     * handshake (numbering after layout + a stable re-flow). Filed for
     * follow-up — do not advertise `eachPage` as supported until then.
     */
    refPageById?: Map<string, number>;
};
/**
 * Computes visible footnote/endnote numbering by first appearance in the document.
 *
 * Per §17.11.14: refs with `customMarkFollows="1"` shall not increment the counter.
 * Per §17.11.11: section-level w:footnotePr overrides numFmt / numStart / numRestart.
 * Per §17.11.19: numRestart=eachSect resets the counter to numStart at each section.
 */
export declare function computeNoteNumbering(editorState: EditorState | null | undefined, noteTypeName: 'footnoteReference' | 'endnoteReference', options: NumberingOptions): NoteNumberingResult;
/** OOXML on/off — accepts the same truthy forms as the inline ref converter. */
export declare function isCustomMarkFollows(value: unknown): boolean;
//# sourceMappingURL=computeNoteNumbering.d.ts.map