"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PageError = void 0;
var react_1 = __importStar(require("react"));
var AnimationInOut_1 = require("../AnimationInOut");
var AppContext_1 = __importDefault(require("../AppProvider/AppContext"));
var Button_1 = require("../Button");
var PageError_style_1 = __importDefault(require("./PageError.style"));
var PageErrorImage_1 = require("./PageErrorImage");
var PageError = function (_a) {
    var image = _a.image, _b = _a.fullscreen, fullscreen = _b === void 0 ? false : _b, retry = _a.retry;
    var imagePageError = (0, react_1.useContext)(AppContext_1.default).imagePageError;
    return (react_1.default.createElement(PageError_style_1.default, { "data-testid": "error-load", fullscreen: fullscreen },
        react_1.default.createElement(AnimationInOut_1.AnimationInOut, null,
            react_1.default.createElement("div", { className: "connection-lost", "data-key": "error-load" },
                react_1.default.createElement("div", { className: "content" },
                    react_1.default.createElement("img", { src: image !== null && image !== void 0 ? image : imagePageError }),
                    react_1.default.createElement("div", { className: "icon pb-3" },
                        !image && !imagePageError && (0, PageErrorImage_1.PageErrorImage)(),
                        (!!image || !!imagePageError) && react_1.default.createElement("img", { src: image !== null && image !== void 0 ? image : imagePageError, width: "150px" })),
                    react_1.default.createElement("h1", null, "Ops..."),
                    react_1.default.createElement("h4", null,
                        "Houve um erro ao conectar com o ",
                        react_1.default.createElement("b", null, "Servidor"),
                        ".",
                        react_1.default.createElement("br", null),
                        "Verifique sua internet e tente novamente."),
                    react_1.default.createElement("br", null),
                    react_1.default.createElement(Button_1.Button, { "data-testid": "retry-btn", onClick: retry, type: "button" }, "Tentar novamente"))))));
};
exports.PageError = PageError;
//# sourceMappingURL=PageError.js.map