'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 _recompose = require('recompose');

var _LogoImage = require('./styles/LogoImage');

var _LogoImage2 = _interopRequireDefault(_LogoImage);

var _logo = require('./logo.png');

var _logo2 = _interopRequireDefault(_logo);

var _logoBlue = require('./logoBlue.png');

var _logoBlue2 = _interopRequireDefault(_logoBlue);

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

var variantLookup = {
  white: _logo2.default,
  blue: _logoBlue2.default
};

var Logo = function Logo(_ref) {
  var variant = _ref.variant,
      id = _ref.id,
      className = _ref.className,
      Image = _ref.Image;
  return _react2.default.createElement(Image, { src: variantLookup[variant], id: id, className: className });
};

Logo.propTypes = {
  /**
   * Adds a class name to the logo image.
   */
  className: _propTypes2.default.string,
  /**
   * Adds an id to the logo image.
   */
  id: _propTypes2.default.string,
  /**
   * Logo style variant
   */
  variant: _propTypes2.default.oneOf(['blue', 'white']),
  /**
   * An img element component to render the image itself
   */
  Image: _propTypes2.default.func
};

Logo.defaultProps = {
  className: null,
  id: null,
  Image: _LogoImage2.default,
  variant: 'white'
};

Logo.Small = (0, _recompose.withProps)({
  Image: _LogoImage2.default.Small
})(Logo);
Logo.Large = (0, _recompose.withProps)({
  Image: _LogoImage2.default.Large
})(Logo);

exports.default = Logo;