"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var icons_1 = require("../icons");
var Button_1 = require("../Button");
var styledComponents_1 = require("./styledComponents");
exports.ErrorLoadingData = function (props) {
    return (React.createElement(React.Fragment, null,
        React.createElement(styledComponents_1.StyledErrorIconContainer, null,
            React.createElement(icons_1.OctopusErrorIcon, null)),
        React.createElement(styledComponents_1.StyledLargeModalText, null,
            React.createElement("b", null, "Oops."),
            " Looks like we're having trouble loading what you're looking for"),
        React.createElement(SuggestedAction, __assign({}, props))));
};
var SuggestedAction = function (props) {
    if (props.useGraphQL) {
        return (React.createElement(React.Fragment, null,
            React.createElement(styledComponents_1.StyledSmallModalText, null, "The Civil Registry uses a tool called GraphQL as a caching layer that can improve load times, but can sometimes cause loading errors like this. Turning off GraphQL can sometimes solve loading errors"),
            React.createElement(Button_1.Button, { size: Button_1.buttonSizes.SMALL, onClick: props.toggleGraphQL }, "Turn off GraphQL")));
    }
    return React.createElement(React.Fragment, null);
};
//# sourceMappingURL=ErrorLoadingData.js.map