'use strict';

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

var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');

var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _Logo = require('../Logo');

var _Logo2 = _interopRequireDefault(_Logo);

var _NavigationLogoPairWrapper = require('./styles/NavigationLogoPairWrapper');

var _NavigationLogoPairWrapper2 = _interopRequireDefault(_NavigationLogoPairWrapper);

var _NavigationHeading = require('./styles/NavigationHeading');

var _NavigationHeading2 = _interopRequireDefault(_NavigationHeading);

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

var LogoHeader = function (_React$Component) {
  (0, _inherits3.default)(LogoHeader, _React$Component);

  function LogoHeader() {
    (0, _classCallCheck3.default)(this, LogoHeader);
    return (0, _possibleConstructorReturn3.default)(this, (LogoHeader.__proto__ || (0, _getPrototypeOf2.default)(LogoHeader)).apply(this, arguments));
  }

  (0, _createClass3.default)(LogoHeader, [{
    key: 'render',
    value: function render() {
      var _props = this.props,
          children = _props.children,
          id = _props.id,
          className = _props.className,
          LogoPairWrapper = _props.LogoPairWrapper,
          Logo = _props.Logo,
          Heading = _props.Heading;


      return _react2.default.createElement(
        LogoPairWrapper,
        { id: id, className: className },
        _react2.default.createElement(Logo, null),
        _react2.default.createElement(
          Heading,
          null,
          children
        )
      );
    }
  }]);
  return LogoHeader;
}(_react2.default.Component);

LogoHeader.propTypes = {
  /**
   * The title to render inside the header.
   */
  children: _propTypes2.default.string,
  /**
   * Adds a class name to the whole containing header element.
   */
  className: _propTypes2.default.string,
  /**
   * Adds an id to the whole containing header element.
   */
  id: _propTypes2.default.string,
  /**
   * A component to wrap the logo and heading text
   */
  LogoPairWrapper: _propTypes2.default.func,
  /**
   * A component to render the logo
   */
  Logo: _propTypes2.default.func,
  /**
   * A component to render the heading text
   */
  Heading: _propTypes2.default.func
};
LogoHeader.defaultProps = {
  children: 'Bandwidth',
  className: null,
  id: null,
  LogoPairWrapper: _NavigationLogoPairWrapper2.default,
  Logo: _Logo2.default,
  Heading: _NavigationHeading2.default
};
exports.default = LogoHeader;