import { FormexController } from "./types"; export declare function useCreateFormex({ initialValues, initialModifiedValues, initialErrors, initialDirty, initialTouched, validation, validateOnChange, validateOnInitialRender, onSubmit, onReset, onValuesChangeDeferred, debugId }: { /** * The **baseline**: what the values are stored as. Everything the form * calls "dirty" is a difference from this, so it has to be the stored * record and nothing else. To open a form already carrying an edit, pass * that edit as {@link initialModifiedValues} — folding it into * `initialValues` instead makes the baseline agree with the edit, and then * nothing can tell that the edit is unsaved. */ initialValues: T; /** * What the form should *show* on its first render, when that is not the * baseline — an edit handed over from somewhere else, a draft restored * from a cache. Dirty is computed from the difference. */ initialModifiedValues?: T; initialErrors?: Record; /** * Force the starting dirty state. Only for callers that know the form * opens modified but cannot supply the modified values; prefer * {@link initialModifiedValues}, which lets it be derived. */ initialDirty?: boolean; initialTouched?: Record; validateOnChange?: boolean; validateOnInitialRender?: boolean; validation?: (values: T) => Record | Promise> | undefined | void; onValuesChangeDeferred?: (values: T, controller: FormexController) => void; onSubmit?: (values: T, controller: FormexController) => void | Promise; onReset?: (controller: FormexController) => void | Promise; debugId?: string; }): FormexController;