"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TableRow = void 0;
var react_1 = __importDefault(require("react"));
var TableCell_1 = require("../TableCell");
var TableCellWithDnd_1 = require("../TableCellWithDnd");
var TableHeadCell_1 = require("../TableHeadCell");
var TableRow = function (_a) {
    var rowData = _a.rowData, columnsData = _a.columnsData, index = _a.index, isMoveColumnEnabled = _a.isMoveColumnEnabled, setHoveredColumn = _a.setHoveredColumn, resetHoveredColumn = _a.resetHoveredColumn;
    var isFirstRow = index === 0;
    return (react_1.default.createElement("tr", { className: rowData.rowClassName },
        react_1.default.createElement(TableHeadCell_1.TableHeadCell, { rowData: rowData, isDraggable: false, columnsData: columnsData }),
        columnsData.map(function (columnValue, index) {
            var isDraggableColumn = columnValue.isDraggable;
            var shouldRenderDragIndicator = isFirstRow && isDraggableColumn;
            return isMoveColumnEnabled ? (react_1.default.createElement(TableCellWithDnd_1.TableCellWithDnd, { key: columnValue.id || index, columnValue: columnValue, rowData: rowData, index: index, shouldRenderDragIndicator: shouldRenderDragIndicator, setHoveredColumn: setHoveredColumn, resetHoveredColumn: resetHoveredColumn })) : (react_1.default.createElement(TableCell_1.TableCell, { key: columnValue.id || index, rowData: rowData, columnValue: columnValue, setHoveredColumn: setHoveredColumn, resetHoveredColumn: resetHoveredColumn }));
        })));
};
exports.TableRow = TableRow;
