"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var enums_1 = require("@monstrosity/enums");
var themed_components_1 = __importDefault(require("@monstrosity/utilities/themed-components"));
var illustrations_1 = require("@monstrosity/enums/illustrations");
var bar_button_1 = require("../Button/bar-button");
var cover_1 = require("../Cover/cover");
var typeography_1 = require("../../primitives/Typeography/typeography");
var ErrorRoot = themed_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-around;\n    align-items: center;\n\theight: 100%;\n\tpadding: 10% 1rem;\n\ttext-align: center;\n\tbackground: ", ";\n"], ["\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-around;\n    align-items: center;\n\theight: 100%;\n\tpadding: 10% 1rem;\n\ttext-align: center;\n\tbackground: ", ";\n"])), function (_a) {
    var theme = _a.theme;
    return theme.style.colour.background;
});
var BodyContainer = themed_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\tpadding: 1.5rem 0;\n"], ["\n\tpadding: 1.5rem 0;\n"])));
exports.Error = function (_a) {
    var onClick = _a.onClick, errorCode = _a.errorCode;
    return (react_1.default.createElement(ErrorRoot, null,
        react_1.default.createElement(cover_1.Cover, { illustration: illustrations_1.IllustrationName.OneWorldTradeCenter }),
        react_1.default.createElement(BodyContainer, null,
            react_1.default.createElement(typeography_1.Section, null, "Oops! Something went Wrong"),
            react_1.default.createElement("br", null),
            react_1.default.createElement(typeography_1.Body, null,
                "Error Code: ",
                errorCode)),
        react_1.default.createElement(bar_button_1.BarButton, { onClick: onClick, label: "Try Again", buttonStyle: enums_1.ButtonStyle.Primary })));
};
var templateObject_1, templateObject_2;
