"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.Table = Table;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _TableVirtual = require("./TableVirtual");
var _react2 = require("@wix/bex-core/react");
var _TableCompat = require("./TableCompat");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/Table/Table.tsx";
function Table(props) {
  const {
    rowHeight,
    estimatedRowHeight,
    isVirtual,
    ...tableProps
  } = props;
  const container = (0, _react2.useWixPatternsContainer)();
  const {
    internalExperiments
  } = container;
  const isVirtualExperiment = internalExperiments == null ? void 0 : internalExperiments.enabled('specs.Cairo.TableVirtualizationAsDefault');
  return isVirtualExperiment && isVirtual !== false && !props.rowDetails ? /*#__PURE__*/_react.default.createElement(_TableVirtual.TableVirtual, (0, _extends2.default)({}, tableProps, {
    rowHeight: rowHeight,
    estimatedRowHeight: estimatedRowHeight,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 44,
      columnNumber: 5
    }
  })) : /*#__PURE__*/_react.default.createElement(_TableCompat.TableCompat, (0, _extends2.default)({}, tableProps, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 50,
      columnNumber: 5
    }
  }));
}
//# sourceMappingURL=Table.js.map