import { IFuseOptions } from 'fuse.js';
import { ArrayTransform, Keyed, Key, TermSearcher } from '@synnaxlabs/x';

/** Props for the {@link createFilterTransform} function. */
export interface CreateFilterTransformProps<K extends Key, E extends Keyed<K>> {
    term: string;
    searcher?: TermSearcher<string, K, E> | ((data: E[]) => TermSearcher<string, K, E>);
}
export declare const fuseFilter: (opts?: IFuseOptions<unknown>) => <K extends Key, E extends Keyed<K>>(data: E[]) => TermSearcher<string, K, E>;
/**
 * @returns a transform that can be used to filter an array of objects in memory
 * based on a search query.
 *
 * Can be used in conjunction with `useTransform` to add search functionality
 * alongside other transforms.
 *
 * Uses fuse.js under the hood.
 *
 * @param query - The query to search for.
 * @param opts - The options to pass to the Fuse.js search. See the Fuse.js
 * documentation for more information on these options.
 */
export declare const createFilterTransform: <K extends Key, E extends Keyed<K>>({ term, searcher, }: CreateFilterTransformProps<K, E>) => ArrayTransform<E>;
//# sourceMappingURL=useFilter.d.ts.map