'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _reactRouterDom = require('react-router-dom');

var _reactIntl = require('react-intl');

var _Logo = require('../../../styles/cspace-ui/Logo.css');

var _Logo2 = _interopRequireDefault(_Logo);

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

var messages = (0, _reactIntl.defineMessages)({
  title: {
    'id': 'logo.title',
    'defaultMessage': 'CollectionSpace'
  }
});

var propTypes = {
  config: _propTypes2.default.object,
  intl: _reactIntl.intlShape
};

function Logo(props) {
  var config = props.config,
      intl = props.intl;


  var title = intl.formatMessage(messages.title);

  return _react2.default.createElement(
    'div',
    { className: _Logo2.default.common },
    _react2.default.createElement(
      _reactRouterDom.Link,
      { to: '/' },
      _react2.default.createElement('img', { alt: title, src: config.logo })
    )
  );
}

Logo.propTypes = propTypes;

exports.default = (0, _reactIntl.injectIntl)(Logo);