import { ReactElement } from "react";
import { DeepPartial, UnpackNestedValue } from "react-hook-form";
import { ObjectSchema } from "yup";
declare enum RequestStatus {
    Fulfilled = "fulfilled",
    Rejected = "rejected"
}
interface Response {
    type: RequestStatus;
    message?: string;
    meta?: {
        requestStatus: RequestStatus;
    };
}
interface Props<DV, R> {
    /**
     * The default values for the form.
     */
    defaultValues: UnpackNestedValue<DeepPartial<DV>>;
    /**
     * Function called when submitting the form.
     */
    onSubmit: (values: UnpackNestedValue<DV>) => R & Response;
    /**
     * Optional function that is called if the form is submitted successfully.
     */
    onSuccess?: (response: R & Response) => void;
    /**
     * Children of the form e.g. Inputs / Buttons.
     */
    children: ReactElement[] | ReactElement;
    /**
     * Yup Validation Schema
     */
    validation: ObjectSchema;
    /**
     * Optionally show the devtools.
     */
    devtools?: boolean;
}
export declare const Form2: <DV, R>({ defaultValues, onSubmit, onSuccess, children, validation, devtools }: Props<DV, R>) => JSX.Element;
export {};
