"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const ClusterProgress_1 = tslib_1.__importDefault(require("../../../common/components/clusterDetail/ClusterProgress"));
const ClusterProgressItems_1 = tslib_1.__importDefault(require("../../../common/components/clusterDetail/ClusterProgressItems"));
const toAssisted_1 = require("../helpers/toAssisted");
const react_core_1 = require("@patternfly/react-core");
const ClusterDeploymentProgress = ({ clusterDeployment, agentClusterInstall, agents, onFetchEvents, fallbackEventsURL, }) => {
    var _a, _b;
    const cluster = (0, toAssisted_1.getAICluster)({ clusterDeployment, agentClusterInstall, agents });
    return (react_1.default.createElement(react_core_1.Stack, { hasGutter: true },
        react_1.default.createElement(react_core_1.StackItem, null,
            react_1.default.createElement(ClusterProgress_1.default, { totalPercentage: ((_b = (_a = agentClusterInstall.status) === null || _a === void 0 ? void 0 : _a.progress) === null || _b === void 0 ? void 0 : _b.totalPercentage) || 0, cluster: cluster })),
        react_1.default.createElement(react_core_1.StackItem, null,
            react_1.default.createElement(ClusterProgressItems_1.default, { cluster: cluster, onFetchEvents: onFetchEvents, fallbackEventsURL: fallbackEventsURL }))));
};
exports.default = ClusterDeploymentProgress;
//# sourceMappingURL=ClusterDeploymentProgress.js.map