/*
Site header

@copyright (c) Copyright 2013-2017 Dorian Pula
@license AGPL-1.0
@author Dorian Pula [dorian.pula@amber-penguin-software.ca]
*/

import {h, Component} from 'preact';  /** @jsx h*/
import {Row, Col} from 'reactstrap';

import PropTypes from 'prop-types';


export class SiteHeader extends Component {
  static get propTypes() {
    return {
      siteName: PropTypes.string,
      logo: PropTypes.string,
      tagline: PropTypes.string
    }
  }

  render() {
    let headerLogoAltText = `${this.props.siteName} logo`;
    return (
      <Row className='justify-content-around'>
        <Col lg='11'>
          <Row className='sea-header justify-content-center align-items-center'>
            <Col lg='2'>
              <img className='header_logo' src={ this.props.logo } alt={ headerLogoAltText }/>
            </Col>
            <Col lg='4'>
              <h1 className='header_title'>{ this.props.siteName }</h1>

              <h2 className='header_tagline'>{ this.props.tagline }</h2>
            </Col>
          </Row>
        </Col>
      </Row>
    );
  }
}
