import { jsx } from 'react/jsx-runtime';
import React__default, { useRef } from 'react';
import TableCell from './TableCell.js';

const TableRow = React__default.memo(({ node, columnsData, columnMeta, selected, select, onRowClick, onToggleExpand, onCheckBoxChange, onAddConfirm, onAddCancel, handleEditFieldError, isExpanding, index, selectedNode, hideOnDisable, addModuleInputWidth, addModuleSelectWidth, disableEditLabelConfirmIcon, isEditable, setIsEditable, style, }) => {
    const treeRowRef = useRef(null);
    return (jsx("div", { "data-level": node.hierarchy, ref: treeRowRef, className: `ff-table-tree-fn-row show-tree ${selectedNode && selectedNode === node.key ? 'fn-selected-node' : ''}`, onClick: (e) => onRowClick(e, node), onKeyDown: (e) => {
            if (e.key === 'Enter' || e.key === ' ') {
                onRowClick(e, node);
            }
        }, role: "button", tabIndex: 0, id: index === 0 ? 'table-fn-first-row' : node.key, style: style, children: columnsData.map((col, colIndex) => (jsx(TableCell, { treeRowRef: treeRowRef, col: col, colIndex: colIndex, node: node, selected: selected, select: select, onCheckBoxChange: onCheckBoxChange, onToggleExpand: onToggleExpand, onAddConfirm: onAddConfirm, onAddCancel: onAddCancel, handleEditFieldError: handleEditFieldError, isExpanding: isExpanding, hideOnDisable: hideOnDisable, addModuleInputWidth: addModuleInputWidth, addModuleSelectWidth: addModuleSelectWidth, disableEditLabelConfirmIcon: disableEditLabelConfirmIcon, isEditable: isEditable, setIsEditable: setIsEditable, columnMeta: columnMeta?.[colIndex] }, col.name))) }));
});
TableRow.displayName = 'TableRow';

export { TableRow as default };
//# sourceMappingURL=TableRow.js.map
