import { ElementType } from 'react'; import { FieldProps } from '../Field/Field'; import { ValidationFunction } from '../Validation/ValidationFunction'; export declare type FieldArrayProps = TForm[TProp] extends Array | undefined | null ? { /** Name of the field, used on submission. If using codegen this must be the provided dto. */ name: TProp; /** Label of the field. */ label?: string; /** Whether the field should be disabled. */ disabled?: boolean; /** Function to validate the value. */ validate?: ValidationFunction | ValidationFunction[]; children: (formBuilder: ArrayFormBuilderProp) => JSX.Element; } : never; export declare type ArrayFormBuilderProp | undefined | null> = TValue extends Array | undefined | null ? TForm extends object ? { Field: (props: FieldProps) => JSX.Element; FieldArray: (props: FieldArrayProps) => JSX.Element; } : never : never; /** * An array of fields that allows the user to add multiple instances of the same field. * * Includes "Add Item" and "Remove Item" buttons to allow the user to speicify the number of fields. */ export default function FieldArray({ name, label, validate, disabled, children, ...rest }: FieldArrayProps): JSX.Element;