import * as react_jsx_runtime from 'react/jsx-runtime';
import { ReactNode } from 'react';
import { ThemeTypings } from '@chakra-ui/react';
import { SubmitHandler, FieldValues, SubmitErrorHandler, ValidationMode } from 'react-hook-form';
import { CustomField } from './formTypes.js';
import { ButtonProps } from '../Button/Button.js';

interface FormButtonProps {
    text: string | ReactNode;
    label: string;
    colorScheme?: ThemeTypings['colorSchemes'];
    variant?: ButtonProps['variant'];
    spanFullWidth?: boolean;
}
interface FormProps {
    onValid: SubmitHandler<FieldValues>;
    onInvalid?: SubmitErrorHandler<FieldValues>;
    fields: CustomField[];
    button: FormButtonProps;
    autofocus?: boolean;
    mode?: keyof ValidationMode;
    developerView?: boolean;
    isDisabled?: boolean;
    isFetching?: boolean;
    actions?: ReactNode;
    onInvalidFormValidation?: () => unknown;
}
declare function Form({ onValid, onInvalid, fields, button, autofocus, mode, developerView, isDisabled, isFetching, actions, onInvalidFormValidation, }: FormProps): react_jsx_runtime.JSX.Element;

export { FormButtonProps, FormProps, Form as default };
