"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _reactDom = require("react-dom");

var _reactRouter = require("@marionebl/react-router");

var _reactRedux = require("react-redux");

var _reactRouterRedux = require("react-router-redux");

var _routes = _interopRequireDefault(require("./routes"));

var _store = _interopRequireDefault(require("./store"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _default(data, el) {
  const store = (0, _store.default)(_reactRouter.browserHistory, data);
  window.store = store;
  const history = (0, _reactRouterRedux.syncHistoryWithStore)(_reactRouter.browserHistory, store);

  const router = _react.default.createElement(_reactRedux.Provider, {
    store: store
  }, _react.default.createElement(_reactRouter.Router, {
    history: history
  }, (0, _routes.default)(store)));

  return (0, _reactDom.hydrate)(router, el);
}
//# sourceMappingURL=client.js.map