import React from 'react';
import cx from 'classnames';
import { ReactSVG } from 'react-svg';
import { LinkTo } from '../LinkTo';
import { useDragonKitValue } from '../../context/DragonKitContext';

var Header = function Header(_ref) {
  var logo = _ref.logo,
      children = _ref.children;

  var _useDragonKitValue = useDragonKitValue(),
      dragonKit = _useDragonKitValue[0];

  var classes = cx('header', dragonKit.theme);
  return /*#__PURE__*/React.createElement("header", {
    className: classes
  }, /*#__PURE__*/React.createElement("div", {
    className: "inner"
  }, /*#__PURE__*/React.createElement(LinkTo, {
    type: "route",
    url: "/"
  }, /*#__PURE__*/React.createElement("h6", {
    className: "logo"
  }, /*#__PURE__*/React.createElement(ReactSVG, {
    src: logo
  }))), children));
};

Header.displayName = 'Header';
var HeaderDoc;

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line global-require
  HeaderDoc = require('./doc').doc(Header);
}

var HeaderWrapper = HeaderDoc || Header;
export { HeaderWrapper as Header };