import { AsyncTermSearcher, Key, Keyed } from '@synnaxlabs/x';
import { ReactElement } from 'react';
import { Input } from '../input';
import { RenderProp } from '../util/renderProp';
export interface UseSearchProps<K extends Key = Key, E extends Keyed<K> = Keyed<K>> extends Input.OptionalControl<string> {
    searcher?: AsyncTermSearcher<string, K, E>;
    debounce?: number;
    pageSize?: number;
    filter?: (items: E[]) => E[];
}
export interface SearchProps<K extends Key = Key, E extends Keyed<K> = Keyed<K>> extends UseSearchProps<K, E> {
    children?: RenderProp<Input.Control<string>>;
}
export interface UseSearchReturn extends Input.Control<string> {
}
export declare const useSearch: <K extends Key = Key, E extends Keyed<K> = Keyed<K>>({ debounce, searcher, value, onChange, pageSize, filter, }: UseSearchProps<K, E>) => UseSearchReturn;
export declare const Search: <K extends Key = Key, E extends Keyed<K> = Keyed<K>>({ children, ...props }: SearchProps<K, E>) => ReactElement | null;
//# sourceMappingURL=Search.d.ts.map