/// <reference types="react" />
import type { InputProps } from '../Input';
import type { ChangeEvent } from '../_hooks/TextEntry';
export interface SearchHookConfig {
    /**
     * @since 10.19.0
     */
    initialValue?: string;
    /**
     * @deprecated
     *
     * The `onChange` prop has been deprecated and will be removed in a future version.
     *
     * A new component, `Typeahead`, has been introduced with specific UX for typeahead-like
     * behavior. Please use this component instead.
     *
     * **Before**
     *
     * <Search typeahead onChange={() => { ... }} />
     *
     * **After**
     *
     * <Typeahead onChange={() => { ... }} />
     *
     * @deprecatedSince 10.20.0
     *
     * @see https://core.procore.com/latest/web/components/typeahead/react/
     * @since 10.19.0
     */
    onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
    /**
     * @since 10.19.0
     */
    onClear?: () => void;
    /**
     * Input handler for search variant
     * ```
     * (value: string) => void
     * ```
     * @since 10.19.0
     */
    onSubmit?: (value: string) => void;
}
export interface SearchHook {
    /**
     * @since 10.19.0
     */
    domHandlers: {
        onChange: (e: ChangeEvent) => void;
        onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
    };
    /**
     * @since 10.19.0
     */
    clear: () => void;
    /**
     * @since 10.19.0
     */
    isEmpty: boolean;
    /**
     * @since 10.19.0
     */
    onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
    /**
     * @since 10.19.0
     */
    submit: () => void;
    /**
     * @since 10.19.0
     */
    value: string;
}
export interface SearchProps extends Omit<InputProps, 'onSubmit' | 'error'>, SearchHookConfig {
    /**
     * @since 10.19.0
     */
    autoFocus?: boolean;
    /**
     * @deprecatedSince 12.18.0
     * @deprecated No known system use cases. Please raise with design if this pattern would be applicable to you.
     * */
    error?: InputProps['error'];
    /**
     * @since 10.19.0
     */
    usingHook?: SearchHook;
    /**
     * Initial value string
     * @default ''
     * @since 10.19.0
     */
    value?: string;
}
