import { ReactNode } from 'react';
import { DefaultValues, ErrorOption, FieldPath, FieldValues } from 'react-hook-form';
import { ErrorAdapter } from './typesErrorAdapter';
export interface PageFormProps<T extends object> {
    children?: ReactNode;
    submitText?: string;
    onSubmit: PageFormSubmitHandler<T>;
    cancelText?: string;
    onCancel?: () => void;
    defaultValue?: DefaultValues<T>;
    isVertical?: boolean;
    singleColumn?: boolean;
    disablePadding?: boolean;
    disableGrid?: boolean;
    autoComplete?: 'on' | 'off';
    footer?: ReactNode;
    errorAdapter?: ErrorAdapter;
    disableSubmitOnEnter?: boolean;
    isWizard?: boolean;
    additionalActions?: ReactNode;
}
export declare function useFormErrors<T extends object>(defaultValue: DefaultValues<T> | undefined, errorAdapter: ErrorAdapter, isWizard?: boolean): {
    form: import("react-hook-form").UseFormReturn<T, any, undefined>;
    handleSubmit: import("react-hook-form").UseFormHandleSubmit<T, undefined>;
    error: string | ReactNode[] | null;
    setError: import("react").Dispatch<import("react").SetStateAction<string | ReactNode[] | null>>;
    handleSubmitError: (err: unknown) => void;
    setFieldError: import("react-hook-form").UseFormSetError<T>;
};
export declare function PageForm<T extends object>(props: PageFormProps<T>): import("react/jsx-runtime").JSX.Element;
export type PageFormSubmitHandler<T extends FieldValues> = (data: T, setError: (error: string) => void, setFieldError: (fieldName: FieldPath<T>, error: ErrorOption) => void) => Promise<unknown>;
export declare function PageFormGrid(props: {
    children?: ReactNode;
    isVertical?: boolean;
    singleColumn?: boolean;
    className?: string;
}): import("react/jsx-runtime").JSX.Element;
