import type { UmbIconDefinition } from '../types.js'; import { UmbControllerBase } from '../../../../libs/class-api/index.js'; import type { UmbControllerHost } from '../../../../libs/controller-api/index.js'; /** * Controller that searches a set of icons by name, keywords and groups using * word-boundary and fuzzy matching. Substring matches only count when they * begin at a token boundary (start of string or after whitespace/hyphen/dot), * so e.g. a query of "paper" does not match "newspaper". Pre-computes per-icon * lowercased tokens once per loaded icon set, and supports cancellation: a * newer call to {@link UmbIconSearchController.search} aborts any in-flight * search, and {@link UmbIconSearchController.destroy} aborts any in-flight * search. */ export declare class UmbIconSearchController extends UmbControllerBase { #private; constructor(host: UmbControllerHost); /** * Set the icons that subsequent {@link search} calls should operate on. * Precomputed searchable data is held lazily per-icon via a WeakMap, so * passing the same icon references across calls preserves the cache. * @param {Array} icons - The icons to search through. */ setIcons(icons: Array): void; /** * Search the configured icons for the given query. * * Aborts any in-flight search first. Rejects with an AbortError if the * returned promise is superseded by another search or by {@link destroy}. * @param {string} query - The search query string. * @returns {Promise>} Filtered and sorted icons, * ordered: exact/substring matches first, then fuzzy matches. */ search(query: string): Promise>; destroy(): void; }