"use strict";

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

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

var _components = require("@patternplate/components");

var svg = _interopRequireWildcard(require("../utils/svg"));

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

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

const StyledLink = (0, _components.styled)(_components.Link).withConfig({
  displayName: "logo__StyledLink"
})(["display:block;margin:0 auto;&:link,&:visited{color:", ";}"], props => props.theme.active);

class Logo extends _react.default.Component {
  render() {
    const props = this.props;
    const child = typeof props.source === "string" ? svg.render(svg.sanitize(svg.purge([svg.parse(props.source)]))[0]) : _react.default.createElement(_components.Icon, {
      symbol: "patternplate",
      size: "l"
    });
    return _react.default.createElement("div", {
      className: props.className
    }, _react.default.createElement(StyledLink, {
      external: "base",
      href: "/",
      query: null,
      target: "_self"
    }, child));
  }

}

var _default = (0, _components.styled)(Logo).withConfig({
  displayName: "logo"
})(["box-sizing:border-box;display:flex;width:100%;fill:currentColor;stroke:currentColor;stroke-width:0;align-items:center;padding:10px;background:", ";"], props => props.theme.backgroundSecondary);

exports.default = _default;
//# sourceMappingURL=logo.js.map