import { SelectComponent as CoreSelectComponent } from '../../types'; declare const Select: any; interface ChoiceItem { label: string; active: boolean; rank: number; id: string | number; choiceEl?: HTMLElement; [key: string]: unknown; } interface SearchResult { item: ChoiceItem; score: number; rank: number; } interface ChoicesInstance { _isSearching: boolean; _currentValue: string; _store: { choices: ChoiceItem[]; dispatch(action: { type: string; active?: boolean; results?: SearchResult[]; }): void; }; _searchChoices?: (needle: string) => number | null; _clearNotice?: () => void; _stopSearch?: () => void; setChoices?: (choices: unknown[], value: string, label: string, replaceChoices?: boolean, clearSearchFlag?: boolean) => unknown; input?: { element?: HTMLInputElement; }; } interface ReferenceItem { id?: string | number; label?: string; [key: string]: unknown; } type SelectValue = ReferenceItem | string | number | null | undefined; export default class GDSSelect extends Select { component: CoreSelectComponent; protected _gdsSearchPatchedChoices?: ChoicesInstance; protected _gdsFilterKey?: string; protected _gdsClientSideSearch?: boolean; protected _gdsAllItems?: unknown[]; protected _gdsSearchIndex?: string[]; protected _gdsWindowReplaced?: boolean; constructor(component?: any, options?: any, data?: any); normalizeSingleValue(value: any): any; init(): any; protected _patchChoicesSearch(): void; protected _gdsWindowSizes(): { idle: number; search: number; }; protected _gdsWindowItems(items: unknown[]): unknown[]; protected _gdsRestoreWindow(choices: ChoicesInstance): void; /** * Searches the full /users/emails list by email text and shows the best matches, * prefix matches first. Relies on private Choices.js members (checked against 11.2.4). */ protected _gdsWindowedSearch(choices: ChoicesInstance, needle: string): number | null; protected get _gdsHasDynamicFilter(): boolean; protected _gdsCurrentFilterKey(): string; setItems(items: unknown, fromSearch?: boolean): void; attach(element: HTMLElement): Promise; checkComponentConditions(data: any, flags: any, row: any): boolean; updateItems(searchInput: unknown, forceUpdate: boolean): any; /** * Escapes item values with `_.escape()` before interpolation, replacing the * slow DOMPurify pass in the base class. * * Safe for text-content templates only. It does not protect values placed in * attributes or URLs (e.g. `href`), so revisit this if a schema does that. */ getOptionTemplate(data: ReferenceItem, value: SelectValue, index?: number): string; /** * Skips the outer `sanitize()` for object data with a template, as * `getOptionTemplate` already escapes values. Other cases use `super`. */ itemTemplate(data: ReferenceItem | string | number | unknown[], value: SelectValue, index?: number): any; choicesOptions(): Record; } export {}; //# sourceMappingURL=GDSSelect.d.ts.map