import type { FieldProps } from 'rc-field-form/lib/Field'; import * as React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import { FormLayout } from '..'; import { ListItemProps } from '../../list/ListItem'; import type { FormInstance } from '../Form'; import type { FormItemLabelProps } from '../FormItemLabel'; import useFormItemStatus from '../hooks/useFormItemStatus'; import { FormItemStyle, ValidateStatusStyle } from '../style/index'; 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 type FeedbackIcons = (itemStatus: { status: ValidateStatus; errors?: React.ReactNode[]; warnings?: React.ReactNode[]; }) => { [key in ValidateStatus]?: React.ReactNode; }; export interface FormItemProps extends Omit, ListItemProps, RcFieldProps { noStyle?: boolean; style?: StyleProp; styles?: Partial; wrapperStyle?: StyleProp; layout?: FormLayout; children?: ChildrenType; help?: React.ReactNode; hasFeedback?: boolean | { icons: FeedbackIcons; }; validateStatus?: ValidateStatus; required?: boolean; hidden?: boolean; initialValue?: any; messageVariables?: Record; } declare function InternalFormItem(props: FormItemProps): React.ReactElement; type InternalFormItemType = typeof InternalFormItem; type CompoundedComponent = InternalFormItemType & { useStatus: typeof useFormItemStatus; }; declare const FormItem: CompoundedComponent; export default FormItem;