import { TextStyle } from '../../designSystem/zeniConstants'; export interface Props { pickerValues: T[]; backgroundColor?: string; /** Style overrides applied to the react-select control element on hover. */ controlHoverStyle?: React.CSSProperties; /** Style overrides applied to the react-select control element. */ controlStyle?: React.CSSProperties; downChevronVisible?: boolean; /** When true, control/container use `var(--zeni-select-document-picker-surface)` so a parent can sync the row surface (e.g. SelectDocumentField). */ inheritRowSurfaceBackground?: boolean; isDisabled?: boolean; isSearchable?: boolean; menuIsOpen?: boolean; /** When set, caps menu width and truncates option labels with ellipsis. */ menuMaxWidth?: number; menuPlacement?: "auto" | "top" | "bottom"; menuPosition?: "left" | "right"; name?: string; optionBackgroundColor?: string; optionTextStyle?: TextStyle; outlined?: boolean; outlinedHeight?: string; placeholder?: string; placeholderColor?: string; placeholderTextStyle?: TextStyle; selectedOptionBackgroundColor?: string; selectedOptionColor?: string; selectedValue?: T; showOnlyDownChevronNotSelectedValue?: boolean; title?: string; titleColor?: string; titleTextAlignment?: "flex-start" | "flex-end" | "center"; titleTextStyle?: TextStyle; valueOpacity?: number; zIndex?: number; onPickerSelectionChanged: (selectedValue?: T, label?: string) => void; valueToLabel: (value: T) => string; filterOption?: (option: OptionType, searchText: string) => boolean; /** When true for a value, that option stays visible but cannot be selected. */ isOptionDisabled?: (value: T) => boolean; /** Handle the menu opening */ onMenuOpen?: () => void; } interface OptionTypeBase { [key: string]: any; } interface OptionType extends OptionTypeBase { label: string; value: string; } export default function Picker({ pickerValues, placeholder, selectedValue, backgroundColor, optionBackgroundColor, selectedOptionBackgroundColor, selectedOptionColor, optionTextStyle, title, titleTextStyle, placeholderTextStyle, titleTextAlignment, titleColor, placeholderColor, inheritRowSurfaceBackground, valueOpacity, outlined, outlinedHeight, isDisabled, isSearchable, isOptionDisabled, menuPosition, menuPlacement, menuMaxWidth, name, zIndex, menuIsOpen, downChevronVisible, showOnlyDownChevronNotSelectedValue, filterOption, onMenuOpen, controlStyle, controlHoverStyle, valueToLabel, onPickerSelectionChanged, }: Readonly>): import("react/jsx-runtime").JSX.Element; export { Picker };