import { ReactNode, FocusEventHandler } from 'react'; import { Theme } from '../../styles'; import { FormFieldProps } from '../../ElementsFactory'; export interface SelectOptionProps { label: string; value: T; } export interface StateProps { selected: boolean; index: number; disabled: boolean; } export interface SelectProps extends FormFieldProps { className?: string; name?: string; value?: T[] | SelectOptionProps; label?: string; error?: string; disabled?: boolean; placeholder?: string; fullWidth?: boolean; onChange?: (e: Event, newValues: T[]) => void; options: SelectOptionProps[]; multiselect?: boolean; loading?: boolean; getOptionLabel?: (option: SelectOptionProps) => string; renderOption?: (option: SelectOptionProps, state: StateProps) => ReactNode; open?: boolean; onOpen?: () => void; onClose?: () => void; onBlur?: FocusEventHandler; noOptionsText?: string; loadingText?: string; theme?: Theme; disableMenuPortalTarget?: boolean; }