"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.GridSectionHeader = void 0;
var _react = _interopRequireDefault(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _CollectionSectionHeader = require("../CollectionSectionHeader");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/GridSections/GridSectionHeader.tsx";
function _GridSectionHeader(props) {
  const {
    sectionDescriptor,
    state
  } = props;
  const {
    gridBase: {
      layoutType
    }
  } = state;
  const {
    sectionId,
    sectionIndex,
    section,
    range
  } = sectionDescriptor;
  const sectionWithCount = {
    ...section,
    count: range.length,
    hasMore: state.isLast && !state.gridSections.collection.fetchedLastPage
  };
  return /*#__PURE__*/_react.default.createElement(_CollectionSectionHeader.CollectionSectionHeader, {
    dataHook: "grid-section-header",
    sectionId: sectionId,
    sectionIndex: sectionIndex,
    section: sectionWithCount,
    skin: layoutType === 'list' ? 'light' : 'neutral',
    biComponentType: "GridSections",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31,
      columnNumber: 5
    }
  });
}
const GridSectionHeader = exports.GridSectionHeader = (0, _mobxReactLite.observer)(_GridSectionHeader);
//# sourceMappingURL=GridSectionHeader.js.map