import { ReactNode } from 'react';
import { FilterOptionsState } from '@mui/material';

interface ContextualSearchBaseProps<T> {
    options: T[];
    isOptionEqualToValue: (option: T, value: T) => boolean;
    renderOption: (option: T) => ReactNode;
    label: string;
    required?: boolean;
    disabled?: boolean;
    loading?: boolean;
    fullWidth?: boolean;
    listBoxMaxHeight?: number | `${number}px`;
    onLastOptionInView: () => void;
    onInputChange: (event: React.SyntheticEvent<Element, Event>, value: string) => void;
    onAddNewEntry?: () => void;
    errorMessage?: string;
    getOptionKey: (option: T) => string | number;
    getOptionLabel: (option: T) => string;
    filterOptions?: (options: T[], state: FilterOptionsState<T>) => T[];
}
type ContextualSearchPropsByMultiple<T> = {
    multiple: false;
    value: T | null;
    onChange: (value: T | null) => void;
} | {
    multiple: true;
    value: T[];
    onChange: (value: T[]) => void;
};
type ContextualSearchPropsByType = {
    listboxType: 'default';
    listboxPortalId?: string;
} | {
    listboxType: 'list';
    listboxPortalId: string;
};
export type ContextualSearchProps<T> = ContextualSearchBaseProps<T> & ContextualSearchPropsByMultiple<T> & ContextualSearchPropsByType;
export declare function ContextualSearch<T>({ listboxType, ...props }: ContextualSearchProps<T>): import("react/jsx-runtime").JSX.Element;
export {};
