import type {ReactNode} from 'react';
import {ClassNames} from '@emotion/react';
import styled from '@emotion/styled';
import {Button, LinkButton} from 'sentry/components/button';
import {Hovercard} from 'sentry/components/hovercard';
import {IconOpen, IconQuestion} from 'sentry/icons';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import {trackAnalytics} from 'sentry/utils/analytics';
import useOrganization from 'sentry/utils/useOrganization';
function Resource({
title,
subtitle,
link,
}: {
link: string;
subtitle: ReactNode;
title: string;
}) {
const organization = useOrganization();
return (
}
borderless
external
href={link}
onClick={() => {
trackAnalytics('replay.details-resource-docs-clicked', {
organization,
title,
});
}}
>
{title}
{subtitle}
);
}
function ResourceButtons() {
return (
}
)}
link="https://docs.sentry.io/platforms/javascript/session-replay/#canvas-recording"
/>
);
}
export default function ConfigureReplayCard() {
return (
{({css}) => (
}
bodyClassName={css`
padding: ${space(1)};
`}
position="top-end"
>
}
aria-label={t('replay configure resources')}
>
{t('Configure Replay')}
)}
);
}
const ButtonContainer = styled('div')`
display: flex;
flex-direction: column;
gap: ${space(1)};
align-items: flex-start;
`;
const ButtonContent = styled('div')`
display: flex;
flex-direction: column;
text-align: left;
white-space: pre-line;
gap: ${space(0.25)};
`;
const ButtonTitle = styled('div')`
font-weight: normal;
`;
const ButtonSubtitle = styled('div')`
color: ${p => p.theme.gray300};
font-weight: normal;
font-size: ${p => p.theme.fontSizeSmall};
`;
const StyledLinkButton = styled(LinkButton)`
padding: ${space(1)};
height: auto;
`;