export interface ChoiceOption { label: string; value: string; subtext?: string; /** Rendered only when every option in the complete list supplies an icon. */ icon?: string; isInactive?: boolean; /** Optional contextual action shown at the trailing edge of this option. */ action?: ChoiceOptionAction; /** Optional compact actions rendered as supporting content beneath the option label. */ subtextActions?: ChoiceOptionSubtextAction[]; } export interface ChoiceOptionSubtextAction { label: string; value: string; tone?: 'action' | 'negative'; } export interface ChoiceOptionAction { /** Accessible name for the fixed ellipsis action. */ label: string; /** ID of the popup controlled by the action. */ controls?: string; /** Keep the action visible and expose its controlled popup state. */ expanded?: boolean; } export interface ChoiceSection { header?: string; options: ChoiceOption[]; divider?: boolean; } export type ChoiceBackground = 'faint' | 'medium' | 'bold' | 'strong' | 'translucent' | 'inverted' | 'media' | 'always-dark'; export declare function resolveChoiceSections(options: ChoiceOption[], sections: ChoiceSection[]): ChoiceSection[]; export declare function flattenChoiceSections(sections: ChoiceSection[]): ChoiceOption[]; /** A choice list has one stable row layout: every option has an icon, or none do. */ export declare function choiceListUsesIcons(options: ChoiceOption[]): boolean; /** Descriptive subtext gives the complete list one stable two-line row layout. */ export declare function choiceListUsesSubtext(options: ChoiceOption[]): boolean; export declare function filterChoiceSections(sections: ChoiceSection[], searchTerm: string): ChoiceSection[]; export declare function enabledChoiceIndexes(options: ChoiceOption[]): number[]; export declare function moveChoiceIndex(options: ChoiceOption[], currentIndex: number, direction: 1 | -1): number; export declare function findChoiceTypeaheadMatch(options: ChoiceOption[], query: string, currentIndex: number): number; export declare function choiceBackgroundClassMap(background: ChoiceBackground | undefined): Record;