"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 ClusterHostsTable_1 = tslib_1.__importDefault(require("../hosts/ClusterHostsTable"));
const InformationAndAlerts_1 = tslib_1.__importDefault(require("../clusterConfiguration/InformationAndAlerts"));
const common_1 = require("../../../common");
const Day2WizardContextProvider_1 = tslib_1.__importDefault(require("./day2Wizard/Day2WizardContextProvider"));
const Day2DiscoveryImageModalButton_1 = tslib_1.__importDefault(require("./day2Wizard/Day2DiscoveryImageModalButton"));
const Day2Wizard_1 = tslib_1.__importDefault(require("./day2Wizard/Day2Wizard"));
const InventoryAddHosts = ({ cluster }) => {
    if (!cluster) {
        return null;
    }
    const showArmOnlyAlert = cluster.cpuArchitecture === common_1.CpuArchitecture.ARM;
    return (react_1.default.createElement(react_core_1.Stack, { hasGutter: true },
        react_1.default.createElement(react_core_1.StackItem, null,
            react_1.default.createElement(Day2WizardContextProvider_1.default, null,
                react_1.default.createElement(react_core_1.Content, { component: "p" },
                    react_1.default.createElement(Day2DiscoveryImageModalButton_1.default, { cluster: cluster })),
                react_1.default.createElement(Day2Wizard_1.default, null))),
        react_1.default.createElement(react_core_1.StackItem, null,
            react_1.default.createElement(InformationAndAlerts_1.default, { cluster: cluster })),
        showArmOnlyAlert && (react_1.default.createElement(react_core_1.StackItem, null,
            react_1.default.createElement(react_core_1.Alert, { title: "Only hosts that have arm64 cpu architecture can be added to this cluster.", variant: react_core_1.AlertVariant.info, "data-testid": "arm-architecture-alert", isInline: true }))),
        react_1.default.createElement(react_core_1.StackItem, null,
            react_1.default.createElement(ClusterHostsTable_1.default, { cluster: cluster }))));
};
exports.default = InventoryAddHosts;
//# sourceMappingURL=InventoryAddHost.js.map