import React from 'react';
import PropTypes from 'prop-types';
import './style.css';

import logo from '../../../../assets/images/stateseal.png';
import Image from '../Image';

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

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

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

export default SiteLogo;