import {DiamondStatus} from 'sentry/components/diamondStatus'; import { IconCheckmark, IconExclamation, IconFire, IconPause, IconTimer, } from 'sentry/icons'; import {SVGIconProps} from 'sentry/icons/svgIcon'; import {ObjectStatus} from 'sentry/types'; import {ColorOrAlias} from 'sentry/utils/theme'; import {MonitorStatus} from '../types'; interface MonitorBadgeProps { status: MonitorStatus | ObjectStatus; } interface StatusData { Icon: React.ComponentType; color: ColorOrAlias; } function MonitorBadge({status}: MonitorBadgeProps) { const {Icon, color} = statusMap[status] ?? statusMap.ok; return ; } // TODO(ts): Use satisfies const statusMap: Record = { ok: { Icon: IconCheckmark, color: 'successText', }, error: { Icon: IconFire, color: 'errorText', }, timeout: { Icon: IconFire, color: 'errorText', }, missed_checkin: { Icon: IconExclamation, color: 'warningText', }, active: { Icon: IconTimer, color: 'subText', }, disabled: { Icon: (p: SVGIconProps) => , color: 'subText', }, }; export {MonitorBadge};