"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _reactRouterDom = require("react-router-dom");
var _reactIntl = require("react-intl");
var _Logo = _interopRequireDefault(require("../../../styles/cspace-ui/Logo.css"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const messages = (0, _reactIntl.defineMessages)({
  title: {
    "id": "logo.title",
    "defaultMessage": "CollectionSpace"
  }
});
const propTypes = {
  config: _propTypes.default.shape({
    logo: _propTypes.default.string
  }),
  intl: _reactIntl.intlShape
};
function Logo(props) {
  const {
    config,
    intl
  } = props;
  const title = intl.formatMessage(messages.title);
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _Logo.default.common
  }, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Link, {
    to: "/"
  }, /*#__PURE__*/_react.default.createElement("img", {
    alt: title,
    src: config.logo
  })));
}
Logo.propTypes = propTypes;
var _default = (0, _reactIntl.injectIntl)(Logo);
exports.default = _default;