import { ReactNode } from 'react'; import { IntlShape } from 'react-intl'; import { DropdownSharedProps } from '@synerise/ds-dropdown'; import { FormFieldCommonProps } from '@synerise/ds-form-field'; import { InformationCardTooltipProps } from '@synerise/ds-information-card'; import { ListItemProps } from '@synerise/ds-list-item'; import { ScrollbarAdditionalProps } from '@synerise/ds-scrollbar'; import { SearchBarProps } from '@synerise/ds-search-bar'; export type ItemPickerSize = 'small' | 'large'; export type ItemPickerProps = { dataSource: ItemType[]; intl?: IntlShape; onChange: (item: ItemType) => void; onClear?: () => void; placeholder: ReactNode; changeButtonLabel?: ReactNode; clear?: ReactNode; clearConfirmTitle?: string; closeOnBottomAction?: boolean; disabled?: boolean; dropdownBottomAction?: ReactNode; dropdownProps?: Partial>; dropdownRowHeight?: number; dropdownVisibleRows?: number; error?: boolean; errorMessage?: FormFieldCommonProps['errorText']; isObjectDeleted?: boolean; onBlur?: () => void; onFocus?: () => void; noResults?: string; noText?: string; placeholderIcon?: ReactNode; searchPlaceholder?: string; searchBarProps?: Partial; selectedItem?: ItemType | undefined; hideSearchBar?: boolean; size?: ItemPickerSize; informationCardTooltipProps?: Omit; withClearConfirmation?: boolean; yesText?: string; scrollbarProps?: ScrollbarAdditionalProps; } & Omit;