import type { FormInstance } from '@amazebird/form'; import type { FieldProps } from '@amazebird/form'; import * as React from 'react'; import useFormItemStatus from '../hooks/useFormItemStatus'; import type { FormItemInputProps } from '../FormItemInput'; import type { FormItemLabelProps, LabelTooltipType } from '../FormItemLabel'; import type { FormLayout } from '../Form'; declare const ValidateStatuses: readonly ["success", "warning", "error", "validating", ""]; export type ValidateStatus = typeof ValidateStatuses[number]; type RenderChildren = (form: FormInstance) => React.ReactNode; type RcFieldProps = Omit, 'children'>; type ChildrenType = RenderChildren | React.ReactNode; export interface FormItemProps extends FormItemLabelProps, FormItemInputProps, RcFieldProps { /** 与 antd Form.Item 一致;默认继承自 Form 的 `layout` */ layout?: FormLayout; prefixCls?: string; noStyle?: boolean; style?: React.CSSProperties; className?: string; children?: ChildrenType; id?: string; hasFeedback?: boolean; validateStatus?: ValidateStatus; required?: boolean; hidden?: boolean; initialValue?: any; messageVariables?: Record; tooltip?: LabelTooltipType; /** @deprecated No need anymore */ fieldKey?: React.Key | React.Key[]; } declare function InternalFormItem(props: FormItemProps): React.ReactElement; type InternalFormItemType = typeof InternalFormItem; interface FormItemInterface extends InternalFormItemType { useStatus: typeof useFormItemStatus; } declare const FormItem: FormItemInterface; export default FormItem;