import { Node as PMNode, Schema } from 'prosemirror-model';
import { NodeDiff } from './generic-diffing.js';
/**
 * Header/footer kind names used throughout the diff payload.
 */
export type HeaderFooterKind = 'header' | 'footer';
/**
 * Explicit slot variants supported by section properties.
 */
export type HeaderFooterVariant = 'default' | 'first' | 'even';
/**
 * Serialized header/footer part state captured from one editor.
 */
export interface HeaderFooterPartState {
    refId: string;
    kind: HeaderFooterKind;
    partPath: string;
    content: Record<string, unknown>;
}
/**
 * Serialized section slot state captured from one editor.
 */
export interface HeaderFooterSlotState {
    sectionId: string;
    titlePg: boolean;
    header: Record<HeaderFooterVariant, string | null>;
    footer: Record<HeaderFooterVariant, string | null>;
}
/**
 * Canonical header/footer state captured from one editor.
 */
export interface HeaderFooterState {
    parts: HeaderFooterPartState[];
    slots: HeaderFooterSlotState[];
}
/**
 * Content diff for one existing header/footer part.
 */
export interface ModifiedHeaderFooterPart {
    refId: string;
    kind: HeaderFooterKind;
    oldPartPath: string;
    partPath: string;
    docDiffs: NodeDiff[];
}
/**
 * Full header/footer diff payload.
 */
export interface HeaderFootersDiff {
    addedParts: HeaderFooterPartState[];
    removedParts: HeaderFooterPartState[];
    modifiedParts: ModifiedHeaderFooterPart[];
    slotChanges: HeaderFooterSlotState[];
}
type HeaderFooterEditor = {
    state: {
        doc: PMNode;
    };
    converter?: {
        headers?: Record<string, unknown>;
        footers?: Record<string, unknown>;
        convertedXml?: Record<string, unknown>;
    } | null;
};
export declare const SLOT_VARIANTS: HeaderFooterVariant[];
/**
 * Captures the header/footer state needed by snapshotting, diffing, and replay.
 *
 * @param editor Editor instance whose converter and section XML should be read.
 * @returns Canonical header/footer state for the editor.
 */
export declare function captureHeaderFooterState(editor: HeaderFooterEditor): HeaderFooterState;
/**
 * Computes the header/footer diff between two captured states.
 *
 * @param oldState Previous header/footer state.
 * @param newState Updated header/footer state.
 * @param schema Schema used to rebuild stored PM JSON.
 * @returns Header/footer diff, or `null` when no changes were detected.
 */
export declare function diffHeaderFooters(oldState: HeaderFooterState | null | undefined, newState: HeaderFooterState | null | undefined, schema: Schema): HeaderFootersDiff | null;
/**
 * Normalizes a relationship target into a `word/...` OOXML part path.
 *
 * @param target Raw relationship target string.
 * @returns Normalized OOXML part path.
 */
export declare function normalizePartPath(target: string): string;
export {};
//# sourceMappingURL=header-footer-diffing.d.ts.map