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

const TableRow = /*#__PURE__*/React__default.memo(({
  node,
  columnsData,
  selected,
  select,
  onRowClick,
  onToggleExpand,
  onCheckBoxChange,
  onAddConfirm,
  onAddCancel,
  handleEditFieldError,
  isExpanding,
  index,
  selectedNode,
  hideOnDisable,
  scriptLengthTruncate,
  addModuleInputWidth,
  addModuleSelectWidth,
  disableEditLabelConfirmIcon
}) => {
  const treeRowRef = useRef(null);
  return jsx("tr", {
    "data-level": node.hierarchy,
    ref: treeRowRef,
    className: `ff-table-tree-row show ${selectedNode && selectedNode === node.key ? 'hover-selected' : ''}`,
    onClick: e => onRowClick(e, node),
    id: index === 0 ? 'table-first-row' : node.key,
    children: columnsData.map(col => jsx(TableCell, {
      treeRowRef: treeRowRef,
      col: col,
      node: node,
      selected: selected,
      select: select,
      onCheckBoxChange: onCheckBoxChange,
      onToggleExpand: onToggleExpand,
      onAddConfirm: onAddConfirm,
      onAddCancel: onAddCancel,
      handleEditFieldError: handleEditFieldError,
      isExpanding: isExpanding,
      hideOnDisable: hideOnDisable,
      scriptLengthTruncate: scriptLengthTruncate,
      addModuleInputWidth: addModuleInputWidth,
      addModuleSelectWidth: addModuleSelectWidth,
      disableEditLabelConfirmIcon: disableEditLabelConfirmIcon
    }, col.name))
  });
});

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