import { RefAttributes } from 'react'; import { BoxProps } from '../box'; import { BoxStyleProps, ComponentsAndVariants } from '../types'; interface SelectDef { /** Key of TRow to use as the option value */ valueKey: keyof TRow & (string | number); /** Key of TRow to display as option text (defaults to valueKey) */ displayKey?: keyof TRow; /** Custom render function for each option */ display?: (row: TRow) => React.ReactNode; /** Custom render function for the selected value display */ selectedDisplay?: (selectedRows: TRow[], isOpen: boolean) => React.ReactNode; /** Placeholder text when nothing is selected */ placeholder?: string; /** Text for "Select all" option in multiple mode */ selectAllText?: string; /** Text shown when search yields no results */ emptyText?: string; } interface Props extends Omit, 'ref' | 'tag'> { data: TRow[]; def: SelectDef; name?: string; defaultValue?: TVal | TVal[]; value?: TVal | TVal[]; multiple?: boolean; isSearchable?: boolean; searchPlaceholder?: string; hideIcon?: boolean; showCheckbox?: boolean; itemsProps?: BoxStyleProps; iconProps?: BoxStyleProps; onChange?: (value: TVal | undefined, values: TVal[]) => void; } interface SelectType { (props: Props & RefAttributes): React.ReactNode; } declare const Select: SelectType; export default Select;