"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_core_1 = require("@patternfly/react-core");
const defaultTitle = 'Unable to fetch the latest data';
const defaultContent = "There was an error fetching the latest data from the API. We'll try again, but if the data does not update in a few minutes, try refreshing the page.";
const ClusterPollingErrorModal = ({ title = defaultTitle, content = defaultContent, }) => {
    return (react_1.default.createElement(react_core_1.Modal, { isOpen: true, variant: react_core_1.ModalVariant.small, onClose: undefined },
        react_1.default.createElement(react_core_1.ModalHeader, { title: title, titleIconVariant: "danger" }),
        react_1.default.createElement(react_core_1.ModalBody, null, content),
        react_1.default.createElement(react_core_1.ModalFooter, null,
            react_1.default.createElement(react_core_1.Button, { key: "refresh", variant: react_core_1.ButtonVariant.primary, onClick: () => window.location.reload() }, "Refresh page"))));
};
exports.default = ClusterPollingErrorModal;
//# sourceMappingURL=ClusterPollingErrorModal.js.map