import { default as React, ChangeEvent, FormEvent, RefObject } from 'react';
import { TextFieldProps } from '../../text-field/src/text-field';
export declare const searchFieldVariants: readonly ["button-attached", "no-button"];
type Variant = (typeof searchFieldVariants)[number];
type DefaultProps = {
    ["data-testid"]?: string;
    /**
     * An accessible label for the clear button.
     * */
    clearButtonAriaLabel: string;
    /**
     * Disables both the input field and submit button if `true`.
     * */
    disabled?: boolean;
    /**
     * Will display only a search icon in the search button if `true`.
     * */
    iconOnlySearchButton?: boolean;
    /**
     * Event handler called when the value of the search field changes.
     * */
    onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
    /**
     * Event handler called when the clear button is clicked.
     * */
    onClear: () => void;
    /**
     * Event handler called when the search form is submitted.
     * */
    onSearch?: (e: FormEvent<HTMLFormElement>) => void;
    /**
     * The label text (or `aria-label` if `iconOnlySearchButton` is `true`) of the search button.
     * */
    searchButtonLabel?: string;
    variant: Variant;
    formRef?: RefObject<HTMLFormElement>;
};
type TextSearchButton = {
    iconOnlySearchButton?: false;
    searchButtonLabel: string;
    variant: "button-attached";
};
type IconOnlySearchButton = {
    iconOnlySearchButton: true;
    searchButtonLabel: string;
    variant: "button-attached";
};
type NoButton = {
    searchButtonLabel?: never;
    variant: "no-button";
};
export type SearchFieldProps = DefaultProps & (TextSearchButton | IconOnlySearchButton | NoButton) & Omit<TextFieldProps, "startAdornment" | "endAdornment" | "afterField" | "onChange">;
export declare const SearchField: React.ForwardRefExoticComponent<(Omit<DefaultProps & TextSearchButton & Omit<TextFieldProps, "onChange" | "afterField" | "endAdornment" | "startAdornment">, "ref"> | Omit<DefaultProps & IconOnlySearchButton & Omit<TextFieldProps, "onChange" | "afterField" | "endAdornment" | "startAdornment">, "ref"> | Omit<DefaultProps & NoButton & Omit<TextFieldProps, "onChange" | "afterField" | "endAdornment" | "startAdornment">, "ref">) & React.RefAttributes<HTMLInputElement>>;
export {};
//# sourceMappingURL=search-field.d.ts.map