import { default as React } from 'react'; import { RegisterOptions } from 'react-hook-form'; import { StylesConfig } from 'react-select'; import { FontWeight, TextStyle } from '../../../designSystem/zeniConstants'; import { DisableMode } from '../common/common'; interface OptionTypeBase { [key: string]: any; } export interface OptionType extends OptionTypeBase { label: string | JSX.Element; value: string; isDisabled?: boolean; isRecommended?: boolean; type?: "button"; onClick?: (event: React.ChangeEvent) => void; } export interface SingleSelectPickerFieldValue { allOptions: OptionType[]; selectedOption?: string; } export interface SingleSelectPickerFieldProps { defaultValue: SingleSelectPickerFieldValue; name: string; appendSublabel?: boolean; capitalizeOptions?: boolean; controlProperty?: { controlHeight?: number; fieldWidth?: number; fontWeight?: FontWeight; highlightOnHover?: boolean; leftRightMargin?: boolean; }; customPlaceholder?: { color?: string; weight?: number; }; customStyleConfig?: StylesConfig; isClearable?: boolean; isDisabled?: DisableMode; isOptionRemovable?: boolean; isSearchable?: boolean; maxMenuHeight?: number; menuIsOpen?: boolean; menuPortalTarget?: HTMLElement | null; optionHeight?: number; optionTextStyle?: TextStyle; placeholder?: string; registerOptions?: RegisterOptions; rotateChevronOnOpen?: boolean; showCreateOption?: boolean; showDownChevronIcon?: boolean; showEmptyState?: boolean; showLoadingIcon?: boolean; showLogoInSingleValue?: boolean; showSubLabelsInSingleValue?: boolean; showTickIcon?: boolean; /** Overrides padding on the selected-value row (StyledCustomSingleValue; default vertical sp2). */ singleValuePadding?: string; singleValueTextStyle?: TextStyle; style?: React.CSSProperties; textAlignment?: "left" | "right"; /** Overrides horizontal/vertical padding on `.select-value-container` (default token spacing). */ valueContainerPadding?: string; withBorder?: boolean; onClickCreateOption?: () => void; onMenuClose?: () => void; valueToInfo?: (value: string) => string; valueToLabel?: (value: string) => JSX.Element | string; valueToLogo?: (value: string, isOptionSelected: boolean) => JSX.Element | null; valueToSubLabels?: (value: string, isOptionSelected: boolean) => JSX.Element | null; } export declare const SingleSelectPickerField: React.ForwardRefExoticComponent>; export {};