import { type AnyKitForm } from '../runtime/formRuntime.js';
/**
 * Ask before the reader leaves a form with unsaved changes, and tell your router the same.
 *
 * @remarks
 * `useUnsavedChanges(form)` adds a `beforeunload` prompt while the form differs from its baseline,
 * so closing or reloading the tab asks first. It returns whether the form is dirty, so your
 * router's own navigation blocker can use the same answer.
 *
 * @privateRemarks
 * Guards against leaving with unsaved changes: a `beforeunload` prompt while the form differs
 * from its baseline. Returns `isDirty` so router blockers can use it too.
 */
export declare function useUnsavedChanges(form: AnyKitForm, opts?: {
    when?: boolean;
}): boolean;
