import React from 'react';
import i18n from 'ui-i18n';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import { useMdmAction, useMdmHistoryEvent } from '../../../contexts/MdmModuleContext';
import { useStyles } from './styles';
export var ProfileBandHistory = function () {
    var styles = useStyles();
    var clearHistoryEvent = useMdmAction('clearHistoryEvent');
    var historyEvent = useMdmHistoryEvent();
    return historyEvent ? (React.createElement("div", { className: styles.root },
        React.createElement(Typography, { component: 'div' },
            i18n.text('You are viewing a historic slice:'),
            ' ',
            React.createElement("span", { className: styles.slice }, i18n.date(historyEvent.aStamp, 'llll'))),
        React.createElement(Button, { className: styles.cancelButton, variant: "contained", color: "primary", onClick: clearHistoryEvent }, i18n.text('Cancel')))) : null;
};
