import { ComponentProps, HTMLProps, MutableRefObject, ReactElement, ReactNode } from 'react';
import Button from '../Button';
export declare type FormInstanceHandles = {
    submit: () => void;
};
export declare type FormValues = Record<string, any>;
export declare type FormErrors = Record<string, any>;
export declare type FormProps<FV extends FormValues> = {
    /**
     * Required mark.
     * @since 0.0.54
     */
    requiredMark?: ReactNode;
    /**
     * Hide required legend.
     * @ignore
     * @deprecated
     */
    hideRequiredLegend?: boolean;
    /**
     * Form values.
     * @since 0.0.57
     */
    values?: FV;
    /**
     * Form errors.
     * @since 0.0.57
     */
    errors?: FormErrors;
    /**
     * Current active state
     * @since 0.0.59
     */
    state?: 'submit' | 'apply' | 'cancel';
    /**
     * Content of the `Form`.
     * @since 0.0.54
     */
    children?: ReactNode;
    /**
     * Submit button visibility or custom configuration
     * @since 0.0.58
     */
    submitButton?: boolean | ComponentProps<typeof Button>;
    /**
     * Apply button visibility or custom configuration
     * @since 0.0.58
     */
    applyButton?: boolean | ComponentProps<typeof Button>;
    /**
     * Cancel button visibility or custom configuration
     * @since 0.0.58
     */
    cancelButton?: boolean | ComponentProps<typeof Button>;
    /**
     * Additional buttons
     * @since 0.0.58
     */
    additionalButtons?: ReactNode[];
    /**
     * A callback function, can be executed when some field value is changing.
     * @since 3.1.0
     */
    onFieldChange?: (name: string, value: any) => void;
    /**
     * Submit handler
     * @since 0.0.54
     */
    onSubmit?: (values: FV, isApply?: boolean) => void;
    /**
     * Additional class name for the buttons container.
     * @since 0.0.66
     */
    footerClassName?: string;
    /**
     * Form responsive view will be switched automatically.
     * Specify this parameter explicitly if you want disable this behaviour and choice vertical or horizontal form view.
     * @since 0.4.1
     */
    vertical?: boolean;
    /**
     * @ignore
     */
    className?: string;
    /**
     * @ignore
     */
    baseClassName?: string;
    /**
     * @ignore
     */
    render?: (params: {
        renderForm: (params: {
            actionButtons?: ReactNode;
        }) => ReactElement;
        renderActionButtons: () => ReactElement;
    }) => ReactNode;
    /**
     * @ignore
     */
    innerRef?: MutableRefObject<null | HTMLFormElement>;
} & Omit<HTMLProps<HTMLFormElement>, 'onSubmit' | 'ref'>;
export declare type FormState<FV> = {
    values?: FV;
    vertical: boolean;
    requiredFields: string[];
    formContext: FormContextProps;
    prevValues?: FV;
    prevErrors?: FormErrors;
    prevRequiredMark?: ReactNode;
};
export declare type FormContextProps = {
    getValues: () => Readonly<FormValues> | undefined;
    getValue: (name: string, def?: any) => any;
    setValue: (name: string, value: any) => void;
    getErrors: (name: string) => {
        [key: string]: any;
    };
    setRequiredField: (name: string, required: boolean) => void;
    registerField: (name: string, field: {
        focus: () => void;
    }) => void;
    unregisterField: (name: string) => void;
    getRequiredMark: () => ReactNode;
};
