'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = initComponent;
exports.getBizConfig = getBizConfig;
exports.getExclusivePath = getExclusivePath;
exports.getGlobalConfig = getGlobalConfig;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _reactDom2 = _interopRequireDefault(_reactDom);

var _fastclick = require('fastclick');

var _fastclick2 = _interopRequireDefault(_fastclick);

var _setup = require('./entrance/setup');

var _setup2 = _interopRequireDefault(_setup);

require('./utils/smoothscroll');

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

var bizConfig = {};
var exclusivePath = {};
var globalConfig = {};

function initComponent(props) {
  var homePage = props.homePage,
      biz_config = props.biz_config,
      exclusive_path = props.exclusive_path,
      config = props.config;

  bizConfig = biz_config;
  exclusivePath = exclusive_path;
  globalConfig = config;
  var AppContainer = (0, _setup2.default)(props);
  _reactDom2.default.render(_react2.default.createElement(AppContainer, null), // eslint-disable-line
  document.getElementById('root'));
  // Eliminates the 300ms delay between a physical tap
  // and the firing of a click event on mobile browsers
  // https://github.com/ftlabs/fastclick
  _fastclick2.default.attach(document.body);

  if (module.hot) {
    module.hot.accept();
  }
}

function getBizConfig() {
  return bizConfig;
}

function getExclusivePath() {
  return exclusivePath;
}

// eslint-disable-line import/imports-first
function getGlobalConfig() {
  return globalConfig;
}
//# sourceMappingURL=index.js.map