'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 _themeGet = require('../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

var _recompose = require('recompose');

var _irisTheme = require('../../theme/irisTheme');

var _irisTheme2 = _interopRequireDefault(_irisTheme);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

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

var LogoSvg = function LogoSvg(props) {
  return _react2.default.createElement(
    'svg',
    props,
    _react2.default.createElement(
      'title',
      null,
      'bandwidth-logo'
    ),
    _react2.default.createElement('path', {
      xmlns: 'http://www.w3.org/2000/svg',
      className: 'logo-mark',
      d: 'M43.68 16.18c-2.23-.47-2.5.69-1.54 2.82 5.07 11.18.56 22.1-4.28 24.81a5.93 5.93 0 0 1-.13-1.1c-.57-5.31-2.59-9.92-4-9.92-1.08 0-.4 4.54-.7 8.56-1.79-1.06-2.89-1.8-4.8-1.47-2.75.48-6.38 6.27-6.52 5.44-1.09-6.71 1.52-17 5.14-18.13.56-.22 1.54.63 3.74 1.46 1.72.64 1.5-1.06.71-1.69a8.29 8.29 0 0 0-8.83-.62C17.09 29 14.62 41.05 17.55 46A7.72 7.72 0 0 0 23 49.75c3.65.42 4.76-.34 7.71-3.94a3.42 3.42 0 0 0 1.39.67c-2.4 7.45-11.38 13.73-13.32 12.65-9.4-6.4-6.78-26.83-.15-44.8 1.08-2.92 2.86-8.09 3.24-10 1-4.85-5.14-5.78-9.33-2.23-3 2.57-6 8.59-8.35 15.57-7.6 22.18-4.37 40.93 9.24 45 15.66 4.67 23.11-5.07 24.27-14.86a21 21 0 0 0 2.88.15c4.85-.1 11.73-2.6 13.78-13.18 1.56-7.96-3.58-17.25-10.68-18.6z',
      fillRule: 'evenodd'
    })
  );
};

LogoSvg.defaultProps = {
  xmlns: 'http://www.w3.org/2000/svg',
  viewBox: '0 0 54.47 63.91',
  preserveAspectRatio: 'xMidYMin meet'
};


// const Logo = ({ width, height, color, style, ...rest }) => (
//   <LogoSvg style={{ width, height, fill: color, ...style }} {...rest} />
// );
//
var Logo = (0, _styledComponents2.default)(LogoSvg).withConfig({
  displayName: 'Logo'
})(['width:', ';fill:', ';height:', ';'], function (_ref) {
  var width = _ref.width;
  return width;
}, function (_ref2) {
  var color = _ref2.color;
  return color ? color : (0, _themeGet2.default)('colors.text.inverted');
}, function (_ref3) {
  var height = _ref3.height;
  return height ? height : (0, _themeGet2.default)('spacing.large');
});

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,
  /**
   * Sets the color of the logo.
   */
  color: _propTypes2.default.string,
  /**
   * Manually control the width of the logo. If only width is set, height
   * will be based on the aspect ratio.
   */
  width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),
  /**
   * Manually control the width of the logo. If only height is set, width
   * will be based on the aspect ratio.
   */
  height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number])
};

Logo.defaultProps = {
  className: null,
  id: null,
  color: null,
  height: null
};

Logo.Small = (0, _styledComponents2.default)(Logo).withConfig({
  displayName: 'Logo__Small'
})(['height:', ';'], (0, _themeGet2.default)('spacing.medium'));
Logo.Large = (0, _styledComponents2.default)(Logo).withConfig({
  displayName: 'Logo__Large'
})(['height:', ';'], (0, _themeGet2.default)('spacing.extraLarge'));

Logo.Primary = (0, _styledComponents2.default)(Logo).withConfig({
  displayName: 'Logo__Primary'
})(['fill:', ';'], (0, _themeGet2.default)('colors.primary.default'));
Logo.Primary.Small = (0, _styledComponents2.default)(Logo).withConfig({
  displayName: 'Logo__Small'
})(['fill:', ';height:', ';'], (0, _themeGet2.default)('colors.primary.default'), (0, _themeGet2.default)('spacing.medium'));
Logo.Primary.Large = (0, _styledComponents2.default)(Logo).withConfig({
  displayName: 'Logo__Large'
})(['fill:', ';height:', ';'], (0, _themeGet2.default)('colors.primary.default'), (0, _themeGet2.default)('spacing.extraLarge'));

exports.default = Logo;