import { type ReactNode } from 'react'; export interface Option { value: T; /** What this answer is, in a word or two. */ label: ReactNode; /** What is true about it — a spacing, a verdict from the registry, a price. */ note?: ReactNode; } /** * How the question is named, which is one of two ways and never neither. * * A group standing under its own heading points at the heading; a group with no * heading draws the words itself. Both are stated as one alternative rather than * two optional props, because the arrangement a pair of optionals also admits — * neither — is a `radiogroup` that a screen reader announces with no question * attached, and it draws nothing, so nobody looking at it sees what is missing. * Passing both is refused for the reason the second half of this exists: two * copies of a question are two questions waiting to disagree. */ export type Asked = { label: ReactNode; labelledBy?: never; } | { labelledBy: string; label?: never; }; /** Where an arrow key lands, or null for a key that is not ours. */ export declare function lands(key: string, at: number, of: number): number | null; export declare function Choice({ label, labelledBy, help, options, chosen, onChoose, columns, }: Asked & { /** What a person needs to know before answering. */ help?: ReactNode; options: readonly Option[]; /** Null until answered, which is the state this arrives in. */ chosen: T | null; onChoose: (value: T) => void; /** At most this many side by side, and fewer where there is no room. The * grid drops a column rather than letting one go under 180. */ columns?: number; }): import("react").JSX.Element; //# sourceMappingURL=choice.d.ts.map