import { MutableRefObject } from 'react';
import { Editor } from '@tiptap/react';
import { FloatingLayoutInvalidationFlag } from './comment-floating-layout';
import { CommentFloatingCard } from './context/types';
import { AnchorRecord, FloatingCardRuntimeState } from './floating-comment-layout-utils';

interface SyncAnchorsArgs {
    currentCycle: number;
    currentDocVersion: number;
    editor: Editor;
    editorRoot: HTMLElement;
    editorWrapperNode: HTMLDivElement | null;
    floatingCards: CommentFloatingCard[];
    getFloatingCardRuntimeState: (floatingCardId: string) => FloatingCardRuntimeState;
    markFloatingCardInvalidated: (floatingCardId: string, flag: FloatingLayoutInvalidationFlag) => void;
    markFloatingCardOrderDirty: () => void;
    markRecomputeFromIndex: (recomputeFromIndex: number) => void;
    getOrderedFloatingCardIndex: (floatingCardId: string) => number | null;
}
interface SyncAnchorsResult {
    activeFloatingCards: CommentFloatingCard[];
    activeFloatingCardMap: Map<string, CommentFloatingCard>;
    floatingCardIdsToClose: Set<string>;
    shouldScheduleFollowUp: boolean;
}
export interface UseAnchorRegistryResult {
    anchorRegistryRef: MutableRefObject<Map<string, AnchorRecord>>;
    queueAnchorRefresh: (floatingCardId: string) => void;
    queueAnchorRefreshForCards: (floatingCards: CommentFloatingCard[]) => void;
    resetAnchorRegistry: () => void;
    syncAnchors: (args: SyncAnchorsArgs) => SyncAnchorsResult;
}
export declare const useAnchorRegistry: () => UseAnchorRegistryResult;
export {};
