"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = fetchSiteData;

var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));

var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));

function fetchSiteData(_x) {
  return _fetchSiteData.apply(this, arguments);
}

function _fetchSiteData() {
  _fetchSiteData = (0, _asyncToGenerator2.default)(
  /*#__PURE__*/
  _regenerator.default.mark(function _callee(state) {
    var siteData;
    return _regenerator.default.wrap(function _callee$(_context) {
      while (1) {
        switch (_context.prev = _context.next) {
          case 0:
            _context.next = 2;
            return state.config.getSiteData(state);

          case 2:
            siteData = _context.sent;
            return _context.abrupt("return", (0, _objectSpread2.default)({}, state, {
              siteData: siteData
            }));

          case 4:
          case "end":
            return _context.stop();
        }
      }
    }, _callee);
  }));
  return _fetchSiteData.apply(this, arguments);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdGF0aWMvZ2V0U2l0ZURhdGEuanMiXSwibmFtZXMiOlsiZmV0Y2hTaXRlRGF0YSIsInN0YXRlIiwiY29uZmlnIiwiZ2V0U2l0ZURhdGEiLCJzaXRlRGF0YSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7O1NBQThCQSxhOzs7Ozs7OzRCQUFmLGlCQUE2QkMsS0FBN0I7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSxtQkFDVUEsS0FBSyxDQUFDQyxNQUFOLENBQWFDLFdBQWIsQ0FBeUJGLEtBQXpCLENBRFY7O0FBQUE7QUFDUEcsWUFBQUEsUUFETztBQUFBLDZFQUdSSCxLQUhRO0FBSVhHLGNBQUFBLFFBQVEsRUFBUkE7QUFKVzs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQSxHIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgYXN5bmMgZnVuY3Rpb24gZmV0Y2hTaXRlRGF0YShzdGF0ZSkge1xuICBjb25zdCBzaXRlRGF0YSA9IGF3YWl0IHN0YXRlLmNvbmZpZy5nZXRTaXRlRGF0YShzdGF0ZSlcbiAgcmV0dXJuIHtcbiAgICAuLi5zdGF0ZSxcbiAgICBzaXRlRGF0YSxcbiAgfVxufVxuIl19