import React from 'react';
import { TableCell } from '../TableCell';
import { TableCellWithDnd } from '../TableCellWithDnd';
import { TableHeadCell } from '../TableHeadCell';
export 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.createElement("tr", { className: rowData.rowClassName },
        React.createElement(TableHeadCell, { rowData: rowData, isDraggable: false, columnsData: columnsData }),
        columnsData.map(function (columnValue, index) {
            var isDraggableColumn = columnValue.isDraggable;
            var shouldRenderDragIndicator = isFirstRow && isDraggableColumn;
            return isMoveColumnEnabled ? (React.createElement(TableCellWithDnd, { key: columnValue.id || index, columnValue: columnValue, rowData: rowData, index: index, shouldRenderDragIndicator: shouldRenderDragIndicator, setHoveredColumn: setHoveredColumn, resetHoveredColumn: resetHoveredColumn })) : (React.createElement(TableCell, { key: columnValue.id || index, rowData: rowData, columnValue: columnValue, setHoveredColumn: setHoveredColumn, resetHoveredColumn: resetHoveredColumn }));
        })));
};
