"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = TableReact;
var _react = _interopRequireDefault(require("react"));
var _tableWrapper = require("./components/table-wrapper");
var _table = require("./components/table");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * 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
 */
function TableReact({
  tableContainerTestId,
  width: defaultWidth,
  state = {},
  handlers = {},
  settings = {},
  components = {},
  classes = {},
  ...props
}) {
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tableWrapper.TableWrapper, {
    className: classes.tableClassName,
    defaultWidth: defaultWidth,
    testId: tableContainerTestId,
    children: ({
      width
    }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_table.Table, {
      ...state,
      ...handlers,
      ...settings,
      ...components,
      ...classes,
      ...props,
      width: width
    })
  });
}