"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.TableGridSwitch = void 0;
exports._TableGridSwitch = _TableGridSwitch;
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _LayoutSwitch = require("../LayoutSwitch");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/TableGridSwitch/TableGridSwitch.tsx";
function _TableGridSwitch(props) {
  const {
    state,
    dragAndDrop,
    sections,
    ...restProps
  } = props;
  const tableSections = sections ? {
    TableSections: sections.TableSections,
    groupBy: sections.groupBy,
    renderSection: sections.renderSection,
    collapsible: sections.collapsible,
    events: sections.events
  } : undefined;
  const gridSections = sections ? {
    GridSections: sections.GridSections,
    groupBy: sections.groupBy,
    renderSection: sections.renderSection
  } : undefined;
  return /*#__PURE__*/_react.default.createElement(_LayoutSwitch.LayoutSwitch, {
    state: state,
    tableProps: {
      ...restProps,
      state: state.tableState,
      dragAndDrop: dragAndDrop == null ? void 0 : dragAndDrop.table,
      sections: tableSections,
      sticky: true
    },
    gridProps: {
      ...restProps,
      state: state.gridState,
      dragAndDrop: dragAndDrop == null ? void 0 : dragAndDrop.grid,
      sections: gridSections
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 82,
      columnNumber: 5
    }
  });
}
const TableGridSwitch = exports.TableGridSwitch = (0, _mobxReactLite.observer)(_TableGridSwitch);
//# sourceMappingURL=TableGridSwitch.js.map