import { KeyboardHandlerMap } from '../shared/index.js';

interface SearchBarProps {
    value?: string;
    onValueChange?: (value: string) => void;
    onSearch?: (value: string) => void;
    debounceMs?: number;
    placeholder?: string;
    loading?: boolean;
}
interface SearchBarAPI {
    /** Current state */
    state: {
        value: string;
        isSearching: boolean;
    };
    /** Props to spread on the input element */
    inputProps: {
        role: 'combobox';
        'aria-expanded': boolean;
        'aria-controls': string;
        'aria-autocomplete': 'list';
    };
    /** Props to spread on the results list element */
    listProps: {
        role: 'listbox';
        id: string;
    };
    /** Set the search value */
    setValue: (value: string) => void;
    /** Clear the search value */
    clear: () => void;
    /** Keyboard handler map */
    keyboardHandlers: KeyboardHandlerMap;
    /** Pre-built keyboard event handler */
    handleKeyDown: (event: KeyboardEvent) => void;
}
declare function createSearchBar(props?: SearchBarProps): SearchBarAPI;

declare const searchBarVariants: (props?: ({
    size?: "sm" | "md" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;
declare const searchResultVariants: (props?: ({
    size?: "sm" | "md" | "lg" | undefined;
} & {
    className?: string;
}) | undefined) => string;

export { type SearchBarAPI, type SearchBarProps, createSearchBar, searchBarVariants, searchResultVariants };
