import {ClassNames} from '@emotion/react'; import styled from '@emotion/styled'; import partition from 'lodash/partition'; import DropdownAutoComplete from 'sentry/components/dropdownAutoComplete'; import DropdownButton from 'sentry/components/dropdownButton'; import {t} from 'sentry/locale'; import {Event, ExceptionType, Thread} from 'sentry/types'; import theme from 'sentry/utils/theme'; import filterThreadInfo from './filterThreadInfo'; import Header from './header'; import Option from './option'; import SelectedOption from './selectedOption'; type Props = { activeThread: Thread; event: Event; threads: Array; exception?: Required; fullWidth?: boolean; onChange?: (thread: Thread) => void; }; const DROPDOWN_MAX_HEIGHT = 400; const ThreadSelector = ({ threads, event, exception, activeThread, onChange, fullWidth = false, }: Props) => { const getDropDownItem = (thread: Thread) => { const {label, filename, crashedInfo} = filterThreadInfo(event, thread, exception); const threadInfo = {label, filename}; return { value: `#${thread.id}: ${thread.name} ${label} ${filename}`, threadInfo, thread, label: (