import { FieldValues, ArrayPath } from 'react-hook-form'; import { default as IFieldArrayProps } from './IFieldArrayProps'; /** * FieldArray component for managing dynamic field lists. * Wraps react-hook-form's useFieldArray with user-friendly API. * Supports nested arrays and Zod validation. * * **Usage Modes:** * 1. Inside Form (Recommended) - Automatically uses FormProvider context * 2. Outside Form with explicit control * * @param props {@link IFieldArrayProps} - Props for the FieldArray component * @returns The FieldArray component * * @example * ```tsx * // Inside Form (Recommended) - No control prop needed *
* ``` * * @example * ```tsx * // Outside Form - Explicit control required *