import type { AutocompleteProps as MuiAutocompleteProps } from '@material-ui/lab'; import type { ReactNode } from 'react'; import type { TextFieldProps } from '../TextField'; declare type Multiple = boolean | undefined; declare type DisableClearable = boolean | undefined; declare type FreeSolo = boolean | undefined; /** * @todo Consider typing T as string | string[] | null * and removing annotation from value and onChange props * @todo Consider extending AutocompleteXProps instead of MuiAutocompleteProps */ export declare type AutocompleteProps = Omit, 'renderInput'> & { /** * The text to be used as an error message. * If set, the select style changes to error status. */ error?: string; /** * The label content. */ label?: ReactNode; /** * The short hint displayed in the input before the user enters a value. */ placeholder?: string; /** * The value of the autocomplete. */ value?: string | string[] | null; /** * Callback fired when the value changes. * @todo Couldn't we just keep the same signature as the MUI Autocomplete's onChange? */ onChange?: (event: React.ChangeEvent, value: string | string[] | null) => void; /** * If true, the options will not be displayed until typing starts. */ disableOpenOnFocus?: boolean; /** * if true, * will be added to the label */ required?: boolean; /** * The variant to use. */ variant?: 'standard' | 'outlined' | 'filled'; /** * If true, the popper will always appear be underneath the input field. * If false, the popper will appear on top of the input field when there is not enough space underneath. * @default false */ flipPopperEnabled?: boolean; /** * non MUI prop to allow overwriting the default background color */ customBackgroundColor?: string; /** * non MUI prop to pass more props to the Textfield inside the autocomplete */ textfieldProps?: TextFieldProps; /** * non MUI prop to make the autocomplete readonly */ readOnly?: boolean; }; export {};