"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SessionExpired = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var i18n_1 = require("../api/i18n");
function reload(e) {
    e.preventDefault();
    //TODO: This is obviously the nuclear solution.
    //
    //The more graceful solution is to re-create the runtime map and interleave the response
    //into the current redux store and preserve the existing view and layer/group state and
    //we should be able to continue where we left off
    window.location.reload();
    return false;
}
/**
 * Displays the "session expired" error message with possible recovery actions
 * @param props
 */
var SessionExpired = function (props) {
    return React.createElement("div", { className: "component-session-expired" },
        React.createElement("p", null, (0, i18n_1.tr)("SESSION_EXPIRED_DETAILED", props.locale)),
        React.createElement("p", null,
            React.createElement("strong", null, (0, i18n_1.tr)("SESSION_EXPIRED_AVAILABLE_ACTIONS", props.locale))),
        React.createElement("ul", null,
            React.createElement("li", null,
                React.createElement("a", { href: "#", onClick: reload }, (0, i18n_1.tr)("SESSION_EXPIRED_RELOAD_VIEWER", props.locale)))));
};
exports.SessionExpired = SessionExpired;
//# sourceMappingURL=session-expired.js.map