import { type ReactElement, type ReactNode } from 'react'; /** * Agent-readiness curated handle for FieldArray. Non-generic on purpose — the * adapter is typed `AgentAdapter` and never sees `T`, so the * handle exposes only the structural surface (row count + add/remove). */ export interface FieldArrayHandle { getCount: () => number; add: () => void; remove: (index: number) => void; } export interface FieldArrayProps { /** The current rows. The consumer owns this array. */ items: T[]; /** Renders one row's fields. Called once per item. */ renderItem: (item: T, index: number) => ReactNode; /** Append a new (consumer-shaped) row. */ onAdd: () => void; /** Remove the row at `index`. */ onRemove: (index: number) => void; /** Visible text on the add control. Consumer supplies localised text. */ addLabel: string; /** * Per-row accessible name for the remove control, e.g. * `(i) => \`Remove rule ${i + 1}\``. Defaults to the kit's localised * `Remove` string so the control always has an accessible name. */ removeItemLabel?: (index: number) => string; /** Group accessible name, rendered as a visible `` when provided. */ legend?: string; /** Minimum rows — remove is disabled once `items.length <= min`. */ min?: number; /** Maximum rows — add is disabled once `items.length >= max`. */ max?: number; /** Stable id, used to address this instance from the agent runtime. */ id?: string; className?: string; /** Accessible name used when no `legend` is supplied. */ 'aria-label'?: string; } export declare function FieldArray({ items, renderItem, onAdd, onRemove, addLabel, removeItemLabel, legend, min, max, id, className, 'aria-label': ariaLabel, }: FieldArrayProps): ReactElement; export declare namespace FieldArray { var displayName: string; } //# sourceMappingURL=field-array.d.ts.map