import { Node as ProseMirrorNode } from 'prosemirror-model';
import { Editor } from '../../core/Editor.js';
import { TocEntryAddress, TocEntryDomain, DiscoveryItem, TocEntryInfo } from '../../../../../../document-api/src/index.js';
export interface ResolvedTcEntryNode {
    node: ProseMirrorNode;
    pos: number;
    /** Deterministic public node ID (FNV-1a hash of position + instruction). */
    nodeId: string;
    /** sdBlockId of the paragraph containing this TC field. */
    containingParagraphSdBlockId?: string;
}
/**
 * Finds all tableOfContentsEntry nodes in document order.
 *
 * Tracks the containing paragraph's sdBlockId for each TC field so that
 * callers can anchor page-number lookups to block-level IDs.
 */
export declare function findAllTcEntryNodes(doc: ProseMirrorNode): ResolvedTcEntryNode[];
/**
 * Resolves a TocEntryAddress to its ProseMirror node and position.
 *
 * @throws DocumentApiAdapterError with code TARGET_NOT_FOUND if not found.
 */
export declare function resolveTcEntryTarget(doc: ProseMirrorNode, target: TocEntryAddress): ResolvedTcEntryNode;
interface ResolvedParagraph {
    node: ProseMirrorNode;
    pos: number;
    sdBlockId: string;
}
/**
 * Finds a paragraph node by its sdBlockId.
 *
 * @throws DocumentApiAdapterError with code TARGET_NOT_FOUND if no paragraph matches.
 */
export declare function findParagraphBySdBlockId(doc: ProseMirrorNode, sdBlockId: string, editor?: Editor): ResolvedParagraph;
/**
 * Extracts full TC entry metadata from a resolved node.
 */
export declare function extractTcEntryInfo(resolved: ResolvedTcEntryNode): TocEntryInfo;
/**
 * Builds a discovery item for a single TC entry node.
 */
export declare function buildTcEntryDiscoveryItem(resolved: ResolvedTcEntryNode, evaluatedRevision: string): DiscoveryItem<TocEntryDomain>;
export {};
//# sourceMappingURL=toc-entry-resolver.d.ts.map