"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const external_link_alt_icon_1 = require("@patternfly/react-icons/dist/js/icons/external-link-alt-icon");
const react_core_1 = require("@patternfly/react-core");
const AddHostsContext_1 = require("../AddHosts/AddHostsContext");
const config_1 = require("../../config");
const OcpConsoleNodesSectionLink = ({ id, title = 'OpenShift console' }) => {
    const { ocpConsoleUrl } = react_1.default.useContext(AddHostsContext_1.AddHostsContext) || {};
    if (!ocpConsoleUrl) {
        return null;
    }
    return (react_1.default.createElement(react_core_1.Button, { icon: react_1.default.createElement(external_link_alt_icon_1.ExternalLinkAltIcon, null), variant: react_core_1.ButtonVariant.link, onClick: () => window.open((0, config_1.getOcpConsoleNodesPage)(ocpConsoleUrl), '_blank', 'noopener noreferrer'), id: id }, title));
};
exports.default = OcpConsoleNodesSectionLink;
//# sourceMappingURL=OcpConsoleNodesSectionLink.js.map