import { SelectInputItem, SelectInputOptionItem } from './SelectInput.types'; export declare const MAX_ITEMS_WITHOUT_VIRTUALIZATION = 50; /** * Converts a string to a normalized, searchable format by: * - Trimming whitespace * - Normalizing whitespace (convert multiple spaces to single space) * - Converting to NFD normalization form to handle diacritics * - Removing combining diacritical marks * - Converting to lowercase */ export declare function searchableString(value: string): string; /** * Extracts searchable strings from a value. * - If the value is a string, returns a normalized version. * - If the value is an object, extracts all string values and normalizes them. * - Otherwise returns an empty array. */ export declare function inferSearchableStrings(value: unknown): string[]; /** * Sets the value of a duplicate option item to undefined, effectively hiding it when rendered. */ export declare function dedupeSelectInputOptionItem(item: SelectInputOptionItem, existingValues: Set, compareValues?: (a: T, b: T) => boolean): SelectInputOptionItem; /** * Sets the `value` of duplicate option items to `undefined`, hiding them when * rendered. Indexes are kept intact within groups to preserve the active item * between filter changes when possible. */ export declare function dedupeSelectInputItems(items: readonly SelectInputItem[], compareValues?: (a: T, b: T) => boolean): SelectInputItem[]; /** * Checks if a SelectInputOptionItem matches the search needle. */ export declare function selectInputOptionItemIncludesNeedle(item: SelectInputOptionItem, needle: string): boolean; /** * Filters SelectInputItems based on the provided predicate function. * For group items, it checks if any of their options match the predicate. */ export declare function filterSelectInputItems(items: readonly SelectInputItem[], predicate: (item: SelectInputOptionItem) => boolean): SelectInputItem[]; /** * Flattens and sorts filtered options using the provided comparator. * Extracts all options from groups, filters out undefined values (deduplicated items), * sorts them, and returns as a flat list of option items. */ export declare function sortSelectInputItems(items: readonly SelectInputItem[], compareFn: (a: SelectInputOptionItem>, b: SelectInputOptionItem>, searchQuery: string) => number, searchQuery: string): SelectInputItem>[]; /** * A prebuilt sort function for `sortFilteredOptions` that sorts options by relevance to the search query. * Prioritizes: exact matches > starts with > contains > alphabetical. * * @param getLabel - Function to extract the label string from the option value. Defaults to using `title` property. * * @example * ```tsx * value.name)} * // ... * /> * ``` */ export declare function sortByRelevance(getLabel?: (value: T) => string): (a: SelectInputOptionItem, b: SelectInputOptionItem, searchQuery: string) => number; //# sourceMappingURL=SelectInput.utils.d.ts.map