import React from 'react';
import SelectableTableRow from './selectable-table-row';
import { jsx as _jsx } from "react/jsx-runtime";
export default function withTableRowSelection(BaseTable) {
  function WithTableRowSelection({
    onRowClick,
    onRowDblClick,
    isRowEnabled,
    selectedItemId,
    trProps,
    TrComponent,
    rowIdAccessor,
    ...props
  }) {
    return /*#__PURE__*/_jsx(BaseTable, {
      ...props,
      TrComponent: SelectableTableRow,
      trProps: {
        ...trProps,
        onRowClick,
        onRowDblClick,
        isRowEnabled,
        selectedItemId,
        rowIdAccessor,
        TrComponent
      }
    });
  }
  return WithTableRowSelection;
}