import type { PropsWithChildren, ReactElement, Ref } from 'react'; import type { FormProps as AntdFormProps } from 'antd'; import { Form as AntdForm } from 'antd'; import type { FormItemProps } from './form-item'; import FormItem from './form-item'; import type { FormInstance } from './use-form'; import useForm from './use-form'; type FormStaticInterface = { displayName: string; useForm: typeof useForm; useFormInstance: typeof AntdForm.useFormInstance; useWatch: typeof AntdForm.useWatch; Item: typeof FormItem; List: typeof AntdForm.List; ErrorList: typeof AntdForm.ErrorList; Provider: typeof AntdForm.Provider; }; type InternalFormType = (props: PropsWithChildren, 'form'>> & { form: AntdFormProps['form']; ref?: Ref>; }) => ReactElement; type FormInterface = InternalFormType & FormStaticInterface; declare const Form: FormInterface; export { defaultValidateMessages, validateMessages } from './validator'; export { FormItem, useForm }; export type { FormInstance, FormItemProps }; export default Form;