import { Dispatch, SetStateAction } from 'react'; import { QuestionnaireState } from 'types/QuestionnaireState'; import { hydrateStep } from '../hydrateStep'; import { DescriptorState } from '../types'; type BaseStep = ReturnType; /** * Sync form state with the hydrated step on every render of a new * descriptor state: clear fields that are now hidden, reset stale option * values, and seed defaults on fields that just became visible. The * summary step is one-shot — its sync runs once on arrival to avoid * cascading clears as fields hide each other. * * Returns the step key whose sync has run, which the caller uses to gate * Submit so it can't fire with pre-sync fields (e.g. before summary * defaults like signature are seeded). */ export declare const useFieldSync: (descriptorState: DescriptorState, baseStep: BaseStep, setFields: Dispatch>) => string | null; export {};