import type { Ref } from 'vue';
import type { DerivedQuiescence } from './derived.js';
import type { FormState } from './state.js';
/**
 * Deep clone over the form-state value space — primitives, `null`, arrays,
 * plain objects, and `Date` (constructor preserved, so a `Date` subclass
 * stays an instance of itself). `File`/`Blob` are immutable and shared by
 * reference rather than copied.
 *
 * Used to snapshot form state into the undo history: `setAt` mutates nested
 * objects in place, so a stored snapshot must be a structural copy or a
 * later edit would reach back and corrupt history.
 */
export declare function deepClone<T>(value: T): T;
export type FormHistory = {
    undo: () => void;
    redo: () => void;
    /**
     * Restore the form to its initial (post-seed, post-first-derivation)
     * baseline — the same state `undo` can never rewind past. Written through
     * the normal commit path (not the navigate suppression), so the reset is
     * itself recorded as a history entry and can be undone to recover the
     * discarded edits. A no-op until that baseline has been established.
     */
    reset: () => void;
    canUndo: Ref<boolean>;
    canRedo: Ref<boolean>;
};
/**
 * Whole-form undo/redo. One snapshot is recorded per user-initiated change —
 * a field commit plus the derivation cascade it triggers — taken once that
 * cascade settles, so an undo step always lands on a coherent derived state.
 *
 * `useManualRefHistory` is deliberate over `useRefHistory`: snapshots are
 * driven by commit boundaries, not by every `state` mutation (which would
 * record per-keystroke and per-derivation-write churn). It tracks a private
 * `{ state, dirty }` composite ref; undo/redo restore both back into the
 * live `state` / `dirty` refs.
 */
export declare function useFormHistory(state: Ref<FormState>, options: {
    quiescence: DerivedQuiescence;
    seeded: Promise<void>;
    dirty: Ref<Set<string>>;
}): FormHistory;
