import { BaseSyntheticEvent } from 'react';
import { Mode, UseFormReset, UseFormStateReturn } from 'react-hook-form';
import { FieldWrapperProps } from '@parlor/components/select-v4';
type OnSubmitOptions<T> = {
    reset: UseFormReset<T>;
};
export type FormProps<T extends Record<string, any>> = {
    [x: string]: any;
    /**
     * Auto submit With Delay
     */
    autoSubmitWithDelay?: number | never;
    /**
     * awaitFieldsValidation: if this is provided - the validation `trigger` will be executed without `await` by default, and `await trigger` will be executed
     * for field names in array. Without this array, the `await trigger` is default behavior.
     */
    awaitFieldsValidation?: string[];
    /**
     * Field child element.
     */
    children: JSX.Element | JSX.Element[];
    /**
     * Class name for form.
     */
    className?: string;
    /**
     * clearErrors clearing errors if shouldReset
     */
    clearErrors?: boolean;
    /**
     * Form default styles.
     */
    defaultStyles?: boolean;
    /**
     * Set value by Form initialization.
     */
    defaultValues?: T;
    /**
     * @description `FormField` components `variation`. If `FormField` component has his own `variation` his `variation` will be used instead
     * @default ```undefined```
     */
    formVariation?: FieldWrapperProps['variation'];
    /**
     * a flag to show/hide dev tools
     */
    isDevToolsVisible?: boolean;
    /**
     * This option allows you to configure the validation strategy before user submit the form (onSubmit event).
     */
    mode?: Mode;
    /**
     * @description
     * @param {{ reset: UseFormReturn<T>['reset'] }} api
     * @param {T} veryFirstDefaultValues be cautions this will return the values form received while initializing
     * if you need to reset unsaved changes consider tracking last updated state inside a component then manually reset
     * it
     */
    onReset?(api: {
        reset: UseFormReset<T>;
    }, veryFirstDefaultValues?: T): void;
    /**
     * A function that handles the submit.
     */
    onSubmit?: (values: T, e: BaseSyntheticEvent, options: OnSubmitOptions<T>) => void;
    /**
     * A function that handles the value change.
     */
    onValuesChange?: (values: T, name?: string, formState?: UseFormStateReturn<T>) => void;
    /**
     * should reset defaultValues after first render
     */
    shouldReset?: boolean;
    /**
     * should unregister hidden fields
     */
    shouldUnregister?: boolean;
};
export {};
