import type { FieldValues, UseFormReturn } from 'react-hook-form';
/**
 * Binds a react-hook-form to `sessionStorage` so the user's typed values
 * survive back-button navigation between auth steps.
 *
 * Behaviour:
 * - On first mount, hydrates the form from storage (overrides
 *   `useForm({ defaultValues })`).
 * - On every field change, mirrors the current values to storage via
 *   `methods.watch`.
 *
 * Cleared globally on successful auth — see `clearAllFormState()` in
 * `auth-provider.tsx`.
 *
 * @param key Stable identifier for this logical form. Different form
 *   modes (phone vs email, signup vs foreign signup) MUST use distinct
 *   keys so they don't clobber each other.
 * @param methods The `useForm()` return value to bind.
 */
export declare function useFormStatePersistence<T extends FieldValues>(key: string, methods: UseFormReturn<T>): void;
