import { TextFieldProps as MuiTextFieldProps } from '@mui/material';
import { ReactNode, ChangeEvent } from 'react';
export interface SearchResultItem {
    id: string;
    label: string;
    description?: string;
    icon?: ReactNode;
}
export interface TrailingAction {
    icon: ReactNode;
    onClick?: () => void;
    disabled?: boolean;
    ariaLabel?: string;
}
export interface SearchBarProps extends Omit<MuiTextFieldProps, 'variant' | 'InputProps' | 'InputLabelProps' | 'onChange'> {
    testId?: string;
    startIcon?: ReactNode;
    endIcon?: ReactNode;
    onEndIconClick?: () => void;
    /** Array of trailing action buttons rendered inside the search bar */
    trailingActions?: TrailingAction[];
    placeholder?: string;
    value?: string;
    onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
    /** Callback fired after debounce completes or search button is clicked */
    onSearch?: (term: string) => void;
    /** Results to display in the dropdown */
    searchResults?: SearchResultItem[];
    /** Whether a search request is in progress */
    isSearching?: boolean;
    /** Debounce delay in milliseconds (default: 400) */
    debounceMs?: number;
    /** Callback when a result item is clicked */
    onResultClick?: (item: SearchResultItem) => void;
    /** Minimum characters before triggering search (default: 2) */
    minSearchLength?: number;
    /** Callback to clear the search value. When provided, shows a clear (X) icon when the field has text. */
    onClear?: () => void;
    /** When true, the input grows line by line as the user types. Enter submits; Shift+Enter adds a newline. */
    multiline?: boolean;
}
