"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 common_1 = require("../../../common");
const utils_1 = require("../hosts/utils");
const utils_2 = require("../clusters/utils");
const HostRequirementsContent_1 = tslib_1.__importDefault(require("../hosts/HostRequirementsContent"));
const HostsDiscoveryTroubleshootingInfoLinkWithModal_1 = tslib_1.__importDefault(require("../hosts/HostsDiscoveryTroubleshootingInfoLinkWithModal"));
const VMRebootConfigurationLinkWithModal_1 = tslib_1.__importDefault(require("../hosts/VMRebootConfigurationLinkWithModal"));
const InfoLinkWithModal_1 = tslib_1.__importDefault(require("../ui/InfoLinkWithModal"));
const InformationAndAlerts = ({ cluster }) => {
    const isVM = react_1.default.useMemo(() => (0, utils_1.isAHostVM)(cluster.hosts || []), [cluster.hosts]);
    const isSNOCluster = (0, common_1.isSNO)(cluster);
    return (react_1.default.createElement(react_core_1.Alert, { title: 'Information & Troubleshooting', "data-testid": "alert-information-troubleshooting", variant: react_core_1.AlertVariant.info, isInline: true, actionLinks: react_1.default.createElement(react_1.default.Fragment, null,
            react_1.default.createElement(InfoLinkWithModal_1.default, { linkText: 'Minimum hardware requirements', modalTitle: 'Minimum hardware requirements', linkId: "alert-information-troubleshooting__link-hwrequirements", modalId: "alert-information-troubleshooting__modal-hwrequirements", isInline: true },
                react_1.default.createElement(HostRequirementsContent_1.default, { clusterId: cluster.id, isSingleNode: isSNOCluster, isAddingHosts: (0, utils_2.isAddHostsCluster)(cluster) })),
            react_1.default.createElement(HostsDiscoveryTroubleshootingInfoLinkWithModal_1.default, { isSingleNode: isSNOCluster, isInline: true }),
            isVM && react_1.default.createElement(VMRebootConfigurationLinkWithModal_1.default, null)) }));
};
exports.default = InformationAndAlerts;
//# sourceMappingURL=InformationAndAlerts.js.map