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<T>(item: SelectInputOptionItem<T>, existingValues: Set<T>, compareValues?: (a: T, b: T) => boolean): SelectInputOptionItem<T | undefined>;
/**
 * 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<T>(items: readonly SelectInputItem<T>[], compareValues?: (a: T, b: T) => boolean): SelectInputItem<T | undefined>[];
/**
 * Checks if a SelectInputOptionItem matches the search needle.
 */
export declare function selectInputOptionItemIncludesNeedle<T>(item: SelectInputOptionItem<T>, 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<T>(items: readonly SelectInputItem<T>[], predicate: (item: SelectInputOptionItem<T>) => boolean): SelectInputItem<T>[];
/**
 * 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<T>(items: readonly SelectInputItem<T | undefined>[], compareFn: (a: SelectInputOptionItem<NonNullable<T>>, b: SelectInputOptionItem<NonNullable<T>>, searchQuery: string) => number, searchQuery: string): SelectInputItem<NonNullable<T>>[];
/**
 * 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
 * <SelectInput
 *   filterable
 *   sortFilteredOptions={sortByRelevance((value) => value.name)}
 *   // ...
 * />
 * ```
 */
export declare function sortByRelevance<T>(getLabel?: (value: T) => string): (a: SelectInputOptionItem<T>, b: SelectInputOptionItem<T>, searchQuery: string) => number;
//# sourceMappingURL=SelectInput.utils.d.ts.map