import type { FunctionComponent, KeyboardEventHandler } from 'react';
import type { BaseProps, ForwardProps, NoChildrenProp, OmitStrict } from '../../types';
import type { FormControlProps } from '../FormControl';
import type { MenuItemProps } from '../Menu';
import type { LinkProps } from '../Link';
export type SearchResult = Pick<MenuItemProps, 'id' | 'primary' | 'secondary' | 'href' | 'onClick'>;
export type RecentSearch = Pick<MenuItemProps, 'id' | 'primary' | 'href' | 'onClick'>;
export type SearchFilter = {
    /** A list of user selectable scopes to filter search with. */
    filters: string[];
    /** The default filter for uncontrolled use. */
    defaultFilter?: string;
    currentFilter?: never;
} | {
    /** A list of user selectable scopes to filter search with. */
    filters: string[];
    defaultFilter?: never;
    /** The current filter for controlled use. */
    currentFilter?: string;
} | {
    filters?: never;
    defaultFilter?: never;
    currentFilter?: never;
};
export type SearchInputProps = NoChildrenProp & BaseProps & {
    placeholder?: FormControlProps['placeholder'];
    /**
     * Creates a controlled input and sets the value. Requires an onChange handler to update value.
     * value + onChange is the recommended method per React team.
     */
    value?: FormControlProps['value'];
    /** Called when the SearchInput value changes. */
    onSearchChange?: (value: string) => void;
    /**
     * Called when the SearchButton is clicked or when the Enter key is pressed while SearchInput is in focus.
     * NOTE: this does not trigger an actual form submit event. It simply represents an explicit action by the user to search as opposed to onSearchChange.
     */
    onSearchSubmit?: (value: string) => void;
    /** Called when user changes scope filter. */
    onFilterChange?: (value: string) => void;
    /** Called when user presses a key. */
    onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
    /** A list of matching results presented in the input's dropdown menu. */
    searchResults?: SearchResult[];
    /** A list of recent searches presented in the input's dropdown menu. */
    recentSearches?: RecentSearch[];
    /** Places the menu into an indeterminate loading state. */
    loading?: boolean;
    /** Prop passed to the advanced search page link. */
    advancedSearchLink?: OmitStrict<LinkProps, 'children'>;
    /** Aria label for search input, used by screen readers. */
    searchInputAriaLabel?: string;
    /**
     * Boolean for determining for whether the search results will render in a popover.
     * @default true
     */
    resultsPopover?: boolean;
} & SearchFilter;
declare const SearchInput: FunctionComponent<SearchInputProps & ForwardProps>;
export default SearchInput;
//# sourceMappingURL=SearchInput.d.ts.map