import DateTime from 'sentry/components/dateTime';
import Duration from 'sentry/components/duration';
import {BannerContainer, BannerSummary} from 'sentry/components/events/styles';
import {IconMute} from 'sentry/icons';
import {t} from 'sentry/locale';
import {ResolutionStatusDetails} from 'sentry/types';
type Props = {
statusDetails: ResolutionStatusDetails;
};
function MutedBox({statusDetails}: Props) {
function renderReason() {
const {ignoreUntil, ignoreCount, ignoreWindow, ignoreUserCount, ignoreUserWindow} =
statusDetails;
if (ignoreUntil) {
return t(
'This issue has been ignored until %s',
);
}
if (ignoreCount && ignoreWindow) {
return t(
'This issue has been ignored until it occurs %s time(s) in %s',
{ignoreCount.toLocaleString()},
);
}
if (ignoreCount) {
return t(
'This issue has been ignored until it occurs %s more time(s)',
{ignoreCount.toLocaleString()}
);
}
if (ignoreUserCount && ignoreUserWindow) {
return t(
'This issue has been ignored until it affects %s user(s) in %s',
{ignoreUserCount.toLocaleString()},
);
}
if (ignoreUserCount) {
return t(
'This issue has been ignored until it affects %s more user(s)',
{ignoreUserCount.toLocaleString()}
);
}
return t('This issue has been ignored');
}
return (
{renderReason()} —
{t(
'You will not be notified of any changes and it will not show up by default in feeds.'
)}
);
}
export default MutedBox;