"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReviewCustomManifestsTable = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_table_1 = require("@patternfly/react-table");
const react_core_1 = require("@patternfly/react-core");
const common_1 = require("../../../../common");
const ReviewCustomManifestsTable = ({ manifests }) => {
    const rows = manifests === null || manifests === void 0 ? void 0 : manifests.map((manifest) => ({
        rowId: manifest.folder && manifest.fileName
            ? `manifest-detail-${manifest.folder}-${manifest.fileName}`
            : 'manifest-detail',
        cells: [
            {
                title: manifest.folder && manifest.fileName ? `${manifest.folder}/${manifest.fileName}` : '',
                props: {
                    'data-testid': manifest.folder && manifest.fileName
                        ? `manifest-detail-${manifest.folder}-${manifest.fileName}`
                        : 'manifest-detail',
                },
            },
        ],
    }));
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(react_table_1.Table, { variant: react_table_1.TableVariant.compact, borders: false, className: "review-table", "aria-label": "Custom manifests 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)))))))),
        react_1.default.createElement(react_core_1.Alert, { isInline: true, variant: "info", title: 'The custom manifests might contain configurations which are conflicting with the above configurations and might cause installation failure.' })));
};
exports.ReviewCustomManifestsTable = ReviewCustomManifestsTable;
//# sourceMappingURL=ReviewCustomManifestsTable.js.map