import type { ComboboxItems } from '../components/Combobox.js'; import { type ChoiceItem } from './utils/fieldItems.js'; export type { ChoiceItem }; /** * A field that picks one of `items`: its value, and the choice the person makes, which also sets the * fields its `secondaryField` names from the item's `secondaryValue`. * * With `autoselect`, the first enabled item is picked whenever the items change; unset, an only item * is. A value the form already holds stays on the first pass. The items change when their values or * which are enabled do, so a field may rebuild them every render. */ export declare function useChoiceField({ name, items, autoselect, secondaryField, onChange, }: { name: string; items: ComboboxItems; autoselect?: boolean | undefined; secondaryField?: string | string[] | undefined; onChange?: ((value: unknown) => void) | undefined; }): [unknown, (value: unknown) => void];