"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.GridFoldersSectionsGroup = void 0;
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _useRenderItem = require("./useRenderItem");
var _renderFolderItem = require("./renderFolderItem");
var _GridFoldersFolderSection = require("./GridFoldersFolderSection");
var _GridFoldersItemsSection = require("./GridFoldersItemsSection");
var _GridFoldersLoadingSection = require("./GridFoldersLoadingSection");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/Grid/GridFoldersSectionsGroup.tsx";
function _GridFoldersSectionsGroup(props) {
  const {
    state,
    itemsSectionTitle,
    foldersSectionTitle
  } = props;
  const renderItem = (0, _useRenderItem.useRenderItem)({
    ...props,
    state: state.items
  });
  const renderFolderItem = (0, _renderFolderItem.useRenderFolderItem)({
    ...props,
    state: state.folders
  });
  const {
    showLoadingSection
  } = state;
  return showLoadingSection ? /*#__PURE__*/_react.default.createElement(_GridFoldersLoadingSection.GridFoldersLoadingSection, {
    state: state,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 66,
      columnNumber: 5
    }
  }) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, state.showFoldersSection && /*#__PURE__*/_react.default.createElement(_GridFoldersFolderSection.GridFoldersFolderSection, {
    state: state,
    sectionTitle: foldersSectionTitle,
    renderItem: renderFolderItem,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 70,
      columnNumber: 9
    }
  }), state.showItemsSection && /*#__PURE__*/_react.default.createElement(_GridFoldersItemsSection.GridFoldersItemsSection, {
    state: state,
    renderItem: renderItem,
    sectionTitle: itemsSectionTitle,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 77,
      columnNumber: 9
    }
  }));
}
const GridFoldersSectionsGroup = exports.GridFoldersSectionsGroup = (0, _mobxReactLite.observer)(_GridFoldersSectionsGroup);
//# sourceMappingURL=GridFoldersSectionsGroup.js.map