import styled from '@emotion/styled';
import {Hovercard} from 'sentry/components/hovercard';
import {FullQueryDescription} from 'sentry/views/starfish/components/fullQueryDescription';
import {SpanDescriptionLink} from 'sentry/views/starfish/components/spanDescriptionLink';
import {ModuleName} from 'sentry/views/starfish/types';
import {SQLishFormatter} from 'sentry/views/starfish/utils/sqlish/SQLishFormatter';
const formatter = new SQLishFormatter();
interface Props {
moduleName: ModuleName;
projectId: number;
description?: string;
endpoint?: string;
endpointMethod?: string;
group?: string;
}
export function SpanDescriptionCell({
description,
group,
moduleName,
endpoint,
endpointMethod,
projectId,
}: Props) {
if (!description) {
return NULL_DESCRIPTION;
}
const descriptionLink = (
);
return ModuleName.DB ? (
}
>
{descriptionLink}
) : (
descriptionLink
);
}
const NULL_DESCRIPTION = <null>;
const WiderHovercard = styled(
({
children,
className,
containerClassName,
...props
}: React.ComponentProps) => (
{children}
)
)`
&.wider {
width: auto;
max-width: 550px;
}
`;
const DescriptionWrapper = styled('div')`
.inline-flex {
display: inline-flex;
}
`;