"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_core_1 = require("@patternfly/react-core");
const react_1 = tslib_1.__importDefault(require("react"));
const MinimalHWRequirements_1 = require("../Agent/MinimalHWRequirements");
const use_translation_wrapper_1 = require("../../../common/hooks/use-translation-wrapper");
const DiscoveryTroubleshootingModal_1 = require("../../../common/components/clusterConfiguration/DiscoveryTroubleshootingModal");
const InfoAndTroubleshootingNotification = ({ isSNO = false, assistedServiceConfigMap, }) => {
    const { t } = (0, use_translation_wrapper_1.useTranslation)();
    const [isDiscoveryHintModalOpen, setIsDiscoveryHintModalOpen] = react_1.default.useState(false);
    const [isMinimalHWRequirementsModalOpen, setIsMinimalHWRequirementsModalOpen] = react_1.default.useState(false);
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(react_core_1.Alert, { variant: react_core_1.AlertVariant.info, title: t('ai:Information & Troubleshooting'), actionLinks: react_1.default.createElement(react_1.default.Fragment, null,
                react_1.default.createElement(react_core_1.AlertActionLink, { onClick: () => setIsMinimalHWRequirementsModalOpen(true) }, t('ai:Minimum hardware requirements')),
                react_1.default.createElement(react_core_1.AlertActionLink, { onClick: () => setIsDiscoveryHintModalOpen(true) }, t('ai:Host not showing up?', { count: +isSNO }))), isInline: true }),
        isDiscoveryHintModalOpen && (react_1.default.createElement(DiscoveryTroubleshootingModal_1.DiscoveryTroubleshootingModal, { isOpen: isDiscoveryHintModalOpen, setDiscoveryHintModalOpen: setIsDiscoveryHintModalOpen })),
        isMinimalHWRequirementsModalOpen && (react_1.default.createElement(MinimalHWRequirements_1.MinimalHWRequirementsModal, { isSNOCluster: isSNO, aiConfigMap: assistedServiceConfigMap, isOpen: isMinimalHWRequirementsModalOpen, onClose: () => setIsMinimalHWRequirementsModalOpen(false) }))));
};
exports.default = InfoAndTroubleshootingNotification;
//# sourceMappingURL=InfoAndTroubleshootingNotification.js.map