"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReviewPlatformTable = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_table_1 = require("@patternfly/react-table");
const common_1 = require("../../../../common");
const constants_1 = require("../platformIntegration/constants");
const ReviewPlatformTable = ({ cluster }) => {
    var _a;
    const rows = react_1.default.useMemo(() => {
        var _a;
        return [
            {
                rowId: 'platform',
                cells: [
                    { title: 'Platform' },
                    {
                        title: constants_1.ExternalPlatformLabels[(_a = cluster.platform) === null || _a === void 0 ? void 0 : _a.type],
                        props: { 'data-testid': 'platform-type' },
                    },
                ],
            },
        ];
    }, [(_a = cluster.platform) === null || _a === void 0 ? void 0 : _a.type]);
    return (react_1.default.createElement(react_table_1.Table, { variant: react_table_1.TableVariant.compact, borders: false, "aria-label": 'Platform', className: "review-table" },
        react_1.default.createElement(react_table_1.Tbody, null, rows.map((row, i) => (react_1.default.createElement(react_table_1.Tr, { key: (0, common_1.genericTableRowKey)(row.rowId) }, row.cells.map((cell, j) => (react_1.default.createElement(react_table_1.Td, Object.assign({ key: `cell-${i}-${j}` }, cell.props), cell.title)))))))));
};
exports.ReviewPlatformTable = ReviewPlatformTable;
//# sourceMappingURL=ReviewPlatformTable.js.map