/** * @fileoverview Main search engine that orchestrates search operations. * Provides a unified interface for all filter modes. */ import type { IndexedItem, SearchResult, SearchOptions, FilterMode } from './types'; /** * Main search function that applies the appropriate strategy based on filter mode. * * @param {IndexedItem[]} indexedItems - Array of pre-indexed items * @param {SearchOptions} options - Search options including query, filterMode, maxResults * @returns {SearchResult} Search result with matching IDs, total count, and truncation flag * * @example * const result = search(indexedItems, { * query: 'System Grid', * filterMode: 'smart', * maxResults: 100 * }); * // { ids: ['1', '2', '3'], total: 3, truncated: false } */ export declare function search(indexedItems: IndexedItem[], options: SearchOptions): SearchResult; /** * Determines if filtering should be offloaded to a Web Worker. * * @param {number} itemCount - Number of items to search * @param {FilterMode} filterMode - Current filter mode * @param {number} workerThreshold - Threshold for offloading to worker * @returns {boolean} True if filtering should use Web Worker */ export declare function shouldUseWorker(itemCount: number, filterMode: FilterMode, workerThreshold: number): boolean; /** * Checks if Web Workers are supported in the current environment. * * @returns {boolean} True if Web Workers are supported */ export declare function isWorkerSupported(): boolean; /** * Gets the effective filter mode, falling back if necessary. * If fuzzy mode is requested but Workers aren't supported, falls back to smart. * * @param {FilterMode} requestedMode - The requested filter mode * @returns {FilterMode} The effective filter mode to use */ export declare function getEffectiveFilterMode(requestedMode: FilterMode): FilterMode;