'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

require('./style.css');

var _stateseal = require('../../../../assets/images/stateseal.png');

var _stateseal2 = _interopRequireDefault(_stateseal);

var _Image = require('../Image');

var _Image2 = _interopRequireDefault(_Image);

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

var SiteLogo = function SiteLogo(siteLogo) {
  return _react2.default.createElement(
    'div',
    { className: 'ma__site-logo' },
    _react2.default.createElement(
      'a',
      { href: siteLogo.url.domain ? siteLogo.url.domain : '/', title: siteLogo.title },
      _react2.default.createElement(_Image2.default, siteLogo.image),
      _react2.default.createElement(
        'span',
        null,
        siteLogo.siteName
      )
    )
  );
};

SiteLogo.propTypes = process.env.NODE_ENV !== "production" ? {
  /** The URL for the site */
  url: _propTypes2.default.shape({
    /** The URL for the site root */
    domain: _propTypes2.default.string
  }),
  image: _propTypes2.default.shape(_propTypes2.default.Image),
  siteName: _propTypes2.default.string,
  title: _propTypes2.default.string
} : {};

SiteLogo.defaultProps = {
  url: {
    domain: '/'
  },
  image: {
    src: _stateseal2.default,
    alt: '',
    width: 45,
    height: 45
  },
  siteName: 'Mass.gov',
  title: 'Mass.gov homepage'
};

exports.default = SiteLogo;
module.exports = exports['default'];