/** * Headless option-based field controller (radio group / segmented). */ import type { MdyReactivity, MdySelectOption } from "@modyra/core"; import type { MdyWidgetController } from "../contract.js"; import type { MdyOptionFieldControllerOptions, MdyOptionFieldIntent, MdyOptionFieldState } from "./option-field-types.js"; export interface MdyOptionFieldController extends MdyWidgetController, MdyOptionFieldIntent> { /** Set the selected value programmatically without producing a command. */ setValue(value: TValue | null): void; /** Update the readonly state. */ setReadonly(readonly: boolean): void; /** * Replace the option list. * * A host whose options arrive later, or change, tells the controller rather than building a new * one: a fresh controller forgets which option the keyboard was on, so a list that reorders * beneath an open group would drop the roving focus. */ setOptions(options: readonly MdySelectOption[]): void; } export declare function createOptionFieldController(options: MdyOptionFieldControllerOptions, reactivity?: MdyReactivity): MdyOptionFieldController;