/** * Reactive dynamic field arrays for repeating form groups. * * @module bquery/forms */ import type { FieldArrayConfig, FormFieldArray } from './types'; /** * Create a reactive array of fields with mutation helpers. * * Useful for "list of items" UIs such as invoice line items or contact lists. * Each item is wrapped in a {@link FormField} via the supplied `factory`. * * @example * ```ts * import { createFieldArray, useFormField, required } from '@bquery/bquery/forms'; * * const tags = createFieldArray({ * initial: ['react', 'forms'], * factory: (value) => useFormField(value, { validators: [required()] }), * }); * * tags.add('reactive'); * tags.remove(0); * tags.move(0, 1); * console.log(tags.getValues()); * ``` */ export declare const createFieldArray: (config: FieldArrayConfig) => FormFieldArray; //# sourceMappingURL=field-array.d.ts.map