import React from 'react';
import { TableWrapper } from './components/table-wrapper';
import { Table } from './components/table';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * New configurable table that uses [@tanstack/react-table](https://tanstack.com/table) under the hood.
 * Also check the full page table demo [Here](/Controlled Table)
 * @midnight-gray-supported
 * @alpine-light-supported
 */
export default function TableReact({
  tableContainerTestId,
  width: defaultWidth,
  state = {},
  handlers = {},
  settings = {},
  components = {},
  classes = {},
  ...props
}) {
  return /*#__PURE__*/_jsx(TableWrapper, {
    className: classes.tableClassName,
    defaultWidth: defaultWidth,
    testId: tableContainerTestId,
    children: ({
      width
    }) => /*#__PURE__*/_jsx(Table, {
      ...state,
      ...handlers,
      ...settings,
      ...components,
      ...classes,
      ...props,
      width: width
    })
  });
}