/** * Options for the choice controls (select and radio-group): authored * `options`, or `optionsFrom`, the distinct values of one field of the * filter-bar's target. Inside a filter-bar the compiler adds an "All" choice * with the empty value, which means "no filter on this field". */ import type { IrNode } from '../../ir.js'; import type { CheckContext } from '../../registry/block-module.js'; import type { PropSchema } from '../../registry/prop-schema.js'; import { type ControlPlacement } from './control-shared.js'; export interface ChoiceOption { value: string; label: string; } /** The "no filter" choice a filter-bar adds in front of the authored options. */ export declare const ANY_OPTION: ChoiceOption; export declare function choiceProps(maxOptions: number): Record; /** Authored options, or the target's distinct field values; no "All" choice. */ export declare function resolveOptions(node: IrNode, placement: ControlPlacement): ChoiceOption[]; /** The value the control starts on: the initial value when it is a choice, else the first. */ export declare function selectedValue(options: readonly ChoiceOption[], initial: unknown): string | undefined; /** Choice-specific checks: one source of options, unique non-empty values, a valid start. */ export declare function checkChoices(node: IrNode, maxOptions: number, context: CheckContext): void; //# sourceMappingURL=choice-options.d.ts.map