function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from 'react';
import cx from 'classnames';
import { DragonKitProvider, defaultState } from '../../context/DragonKitContext';
import '../../assets/styles/main.scss';

var DragonKit = function DragonKit(_ref) {
  var theme = _ref.theme,
      layout = _ref.layout,
      Link = _ref.Link,
      children = _ref.children;

  var initialDragonKitState = _extends({}, defaultState, {}, {
    theme: theme,
    Link: Link
  });

  var classes = cx('all', layout);
  return /*#__PURE__*/React.createElement(DragonKitProvider, {
    initialState: initialDragonKitState
  }, /*#__PURE__*/React.createElement("div", {
    className: classes
  }, /*#__PURE__*/React.createElement("div", {
    className: "inner"
  }, children)));
};

DragonKit.displayName = 'DragonKit'; // let DragonKitDoc;
// if (process.env.NODE_ENV !== 'production') {
//   // eslint-disable-next-line global-require
//   DragonKitDoc = require('./doc').doc(DragonKit);
// }
// const DragonKitWrapper = DragonKitDoc || DragonKit;

export { DragonKit };