"use strict";

exports.__esModule = true;
exports.DragonKit = void 0;

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

var _classnames = _interopRequireDefault(require("classnames"));

var _DragonKitContext = require("../../context/DragonKitContext");

require("../../assets/styles/main.scss");

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

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); }

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

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

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

exports.DragonKit = DragonKit;
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;