"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProfileBandHistory = void 0;
var react_1 = __importDefault(require("react"));
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var Button_1 = __importDefault(require("@mui/material/Button"));
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var MdmModuleContext_1 = require("../../../contexts/MdmModuleContext");
var styles_1 = require("./styles");
var ProfileBandHistory = function () {
    var styles = (0, styles_1.useStyles)();
    var clearHistoryEvent = (0, MdmModuleContext_1.useMdmAction)('clearHistoryEvent');
    var historyEvent = (0, MdmModuleContext_1.useMdmHistoryEvent)();
    return historyEvent ? (react_1.default.createElement("div", { className: styles.root },
        react_1.default.createElement(Typography_1.default, { component: 'div' },
            ui_i18n_1.default.text('You are viewing a historic slice:'),
            ' ',
            react_1.default.createElement("span", { className: styles.slice }, ui_i18n_1.default.date(historyEvent.aStamp, 'llll'))),
        react_1.default.createElement(Button_1.default, { className: styles.cancelButton, variant: "contained", color: "primary", onClick: clearHistoryEvent }, ui_i18n_1.default.text('Cancel')))) : null;
};
exports.ProfileBandHistory = ProfileBandHistory;
