import { IFormErrorMap, IFormInitialMapper, IFormMutationMapper, IFormOnFailure, IFormOnSuccess, IFormOnValuesChanged, IMutationHookCallback, IQueryParams, IToError } from "@leight-core/leight"; import { FormProps } from "antd"; import { PropsWithChildren } from "react"; export declare type IFormProps = PropsWithChildren> & { translation?: string; /** * What to do on form submit. */ useMutation?: IMutationHookCallback; mutationQuery?: TQuery; /** * Map form data to mutation data. */ toMutation?: IFormMutationMapper; /** * Map data to the initial state of the form (if any). */ toForm?: IFormInitialMapper; /** * Called when a form is successfully committed. */ onSuccess?: IFormOnSuccess; /** * Called when an error occurs. */ onFailure?: IFormOnFailure; /** * Map error from outside to a state in the form (like a general error or a field error). */ toError?: (error: IToError) => IFormErrorMap; closeDrawer?: boolean; onValuesChange?: IFormOnValuesChanged; }>; export declare function Form({ translation, ...props }: PropsWithChildren>): JSX.Element;