import { TemplateResult } from 'lit'; /** One option given as data (`items`) instead of a `` child. */ export interface DapDSOptionData { /** The option value; becomes the select / combobox value. */ value: string; /** Plain text of the option: shown by default, and used for filtering, typeahead and the selected text. */ label: string; /** Whether the option is disabled. */ disabled?: boolean; /** Any extra fields are passed through to `renderOption`. */ [extra: string]: unknown; } /** State passed to `renderOption` next to the item. */ export interface DapDSOptionRenderState { index: number; selected: boolean; active: boolean; disabled: boolean; } /** Renders the content of one data option. A string is shown as text, never parsed as HTML. */ export type DapDSOptionRenderer = (item: DapDSOptionData, state: DapDSOptionRenderState) => TemplateResult | Node | string; /** * Normalizes an `items` value: an array is used as is, a JSON string is * parsed (attributes, and frameworks such as React 19 that assign a string * to the property), anything else means "no items". */ export declare function toOptionItems(value: unknown): DapDSOptionData[] | undefined; /** Reads `items` from a JSON attribute; anything that is not an array is ignored. */ export declare const optionItemsConverter: { fromAttribute: (value: string | null) => DapDSOptionData[] | undefined; }; export declare function optionElementFor(item: DapDSOptionData): E; export declare function optionElementsFor(items: DapDSOptionData[]): E[]; /** The data item behind an option element, if it came from `items`. */ export declare function optionDataOf(el: Element | null | undefined): DapDSOptionData | undefined;