import {lazy, Suspense} from 'react';
import styled from '@emotion/styled';
import {generateIconName} from 'sentry/components/events/contextSummary/utils';
import LoadingMask from 'sentry/components/loadingMask';
import CountTooltipContent from 'sentry/components/replays/countTooltipContent';
import {Tooltip} from 'sentry/components/tooltip';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
type Props = {
name: string;
version: undefined | string;
className?: string;
showTooltip?: boolean;
showVersion?: boolean;
};
const LazyContextIcon = lazy(
() => import('sentry/components/events/contextSummary/contextIcon')
);
const ContextIcon = styled(
({className, name, version, showVersion, showTooltip}: Props) => {
const icon = generateIconName(name, version);
if (!showTooltip) {
return (
}>
);
}
const title = (
{t('Name:')}
{name}
{version ? {t('Version:')} : null}
{version ? {version} : null}
);
return (
}>
{showVersion ? (version ? version : null) : undefined}
);
}
)`
display: flex;
gap: ${space(1)};
font-variant-numeric: tabular-nums;
align-items: center;
`;
export default ContextIcon;