"use strict";

exports.__esModule = true;
exports.usePageHeader = usePageHeader;
var _react = require("react");
var _CollectionPageHeaderNew = require("../components/CollectionPageHeaderNew");
function usePageHeader(childrenArr) {
  var _header$props;
  const header = (0, _react.useMemo)(() => childrenArr.find(child => /*#__PURE__*/(0, _react.isValidElement)(child) && child.type === _CollectionPageHeaderNew.CollectionPageHeader), [childrenArr]);
  const {
    text: title,
    hideTotal
  } = (header == null || (_header$props = header.props) == null ? void 0 : _header$props.title) || {};
  return {
    header,
    title,
    hideTotal
  };
}
//# sourceMappingURL=usePageHeaderNew.js.map