/**
 * AnnotationUndoManager — tracks annotation edits and provides undo/redo.
 *
 * Uses per-page annotation array snapshots. Since the reducer produces new array
 * references on every change, snapshots are cheap (shared Annotation objects).
 *
 * The manager subscribes to the store's effect phase. When it detects that
 * `pageAnnotations` changed for a page that is newly dirty, it captures an
 * undo entry. During its own undo/redo replays, capturing is suppressed.
 *
 * Rapid successive changes to the same page (e.g. dragging to move) are
 * coalesced into a single undo entry using a time threshold.
 */
import type { Store } from "../../framework/store";
import type { ViewerState } from "../state";
import type { Action } from "../actions";
export interface AnnotationUndoManager {
    undo(): void;
    redo(): void;
    canUndo(): boolean;
    canRedo(): boolean;
    /** Subscribe to changes in canUndo/canRedo state. Returns unsubscribe function. */
    subscribe(fn: () => void): () => void;
    /** Clear both stacks (e.g. on document switch). */
    clear(): void;
    destroy(): void;
}
export declare function createAnnotationUndoManager(store: Store<ViewerState, Action>): AnnotationUndoManager;
//# sourceMappingURL=AnnotationUndoManager.d.ts.map