"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.CollectionPageHeader = void 0;
exports._CollectionPageHeader = _CollectionPageHeader;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _designSystem = require("@wix/design-system");
var _mobxReactLite = require("mobx-react-lite");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/CollectionPageHeader/CollectionPageHeader.tsx";
function _CollectionPageHeader(props) {
  const {
    state,
    children,
    ...rest
  } = props;
  const {
    initTask,
    result: {
      total
    }
  } = state;
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, (0, _extends2.default)({
    direction: "horizontal"
  }, rest, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 22,
      columnNumber: 5
    }
  }), /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    paddingRight: "9px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 23,
      columnNumber: 7
    }
  }, children), initTask.status.isSuccess && /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
    dataHook: "page-header-total-count",
    color: "D40",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 25,
      columnNumber: 9
    }
  }, total));
}
const CollectionPageHeader = exports.CollectionPageHeader = (0, _mobxReactLite.observer)(_CollectionPageHeader);
//# sourceMappingURL=CollectionPageHeader.js.map