import {Fragment} from 'react';
import styled from '@emotion/styled';
import ActorAvatar from 'sentry/components/avatar/actorAvatar';
import {SectionHeading} from 'sentry/components/charts/styles';
import {KeyValueTable, KeyValueTableRow} from 'sentry/components/keyValueTable';
import ExternalLink from 'sentry/components/links/externalLink';
import QuestionTooltip from 'sentry/components/questionTooltip';
import Text from 'sentry/components/text';
import TimeSince from 'sentry/components/timeSince';
import {Tooltip} from 'sentry/components/tooltip';
import {IconCopy} from 'sentry/icons';
import {t, tct, tn} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import {getFormattedDate} from 'sentry/utils/dates';
import useCopyToClipboard from 'sentry/utils/useCopyToClipboard';
import {
DEFAULT_CHECKIN_MARGIN,
DEFAULT_MAX_RUNTIME,
} from 'sentry/views/monitors/components/monitorForm';
import {MonitorIndicator} from 'sentry/views/monitors/components/monitorIndicator';
import type {Monitor, MonitorEnvironment} from 'sentry/views/monitors/types';
import {CheckInStatus, ScheduleType} from 'sentry/views/monitors/types';
import {scheduleAsText} from 'sentry/views/monitors/utils/scheduleAsText';
interface Props {
monitor: Monitor;
monitorEnv?: MonitorEnvironment;
/**
* Include the UNKNOWN status in the check-in type legend
*/
showUnknownLegend?: boolean;
}
export default function DetailsSidebar({monitorEnv, monitor, showUnknownLegend}: Props) {
const {checkin_margin, schedule, schedule_type, max_runtime, timezone} = monitor.config;
const {onClick, label} = useCopyToClipboard({text: monitor.slug});
const slug = (
{monitor.slug}
);
return (
{t('Last Check-In')}{t('Next Check-In')}