import { type FocusEvent, type MutableRefObject, type PropsWithChildren, type Ref, type RefObject, type ReactNode, type ReactElement, type SetStateAction, type Dispatch } from 'react'; import { type GroupBase } from 'react-select'; import { type DataTestId, type MaskingProps, type StylingProps, type AriaLabelingProps, type DOMProps } from '@dynatrace/strato-components/core'; import { SelectV2Content } from './SelectContent.js'; import { SelectV2CustomTrigger } from './SelectCustomTrigger.js'; import { SelectV2DisplayValue } from './SelectDisplayValue.js'; import { SelectV2EmptyState, type SelectV2EmptyStateProps } from './SelectEmptyState.js'; import { SelectV2Filter, type SelectV2FilterProps } from './SelectFilter.js'; import { SelectV2Group, SelectV2GroupLabel } from './SelectGroup.js'; import { SelectV2Option } from './SelectOption.js'; import { SelectV2Prefix, type SelectV2PrefixProps } from './SelectPrefix.js'; import { SelectV2Suffix } from './SelectSuffix.js'; import { SelectV2Trigger } from './SelectTrigger.js'; import type { BaseOption, SelectContentWidthOptionsType, SelectTriggerWidthOptionsType, SelectV2MultiValue, SelectV2SingleValue } from './types.js'; import type { FormControlProps } from '../../core/types/form-control-props.js'; import type { FormControlState, FormControlStateProps } from '../../core/types/form-control-state.js'; import type { FormControlRef, FormControlWithOverlayRef } from '../shared-types.js'; declare module 'react-select/dist/declarations/src/Select' { interface Props> { /** Custom placeholder text */ placeholderText?: ReactNode; /** The trigger width set by the dev. */ triggerWidth?: SelectTriggerWidthOptionsType; /** Custom select trigger */ customTrigger?: ReactElement<{ [key: string]: any; } | null | undefined>; /** Custom display value. */ displayValue?: ReactNode[]; /** Prefix for the select trigger */ prefix?: ReactElement; triggerRef: HTMLElement | null; setTriggerRef: Dispatch>; /** Defines if the space for the prefix icons should be reserved in all options rendered */ optionsHavePrefix: boolean; /** Select.Filter component specified by dev */ customFilter?: ReactElement; /** Custom empty state provided by dev */ emptyState?: ReactElement; /** Form control state for errors and hints */ controlState?: FormControlState; loading?: boolean; clearable?: boolean; isRequired?: boolean; /** array of all select options (including those in groups) */ allOptions?: BaseOption