'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var React = require('react');
var React__default = _interopDefault(React);
var PropTypes = _interopDefault(require('prop-types'));
var __chunk_1 = require('./chunk-94232455.js');
var __chunk_2 = require('./chunk-a63f1fa0.js');
var __chunk_3 = require('./chunk-6d243953.js');

var styles = (function (theme) {
  var icons = theme.icons;

  var customSize = function customSize(_ref) {
    var size = _ref.size;

    if (size === 'sm') return icons.size.sm;
    if (size === 'md') return icons.size.md;
    if (size === 'lg') return icons.size.lg;
    if (typeof size === 'number') return size;
    return icons.size.default;
  };

  return {
    root: {
      objectFit: 'contain',
      height: icons.size.default,
      width: icons.size.default,
      fill: theme.palette.black,
      outline: 'none'
    },
    customSize: {
      height: customSize,
      width: customSize
    },
    customColor: {
      fill: function fill(_ref2) {
        var color = _ref2.color;
        return theme.palette[color] || color;
      }
    },
    hoverColor: {
      '&:hover': {
        fill: function fill(_ref3) {
          var hoverColor = _ref3.hoverColor;
          return theme.palette[hoverColor] || hoverColor;
        }
      }
    }
  };
});

var Icon = function Icon(_ref) {
  var color = _ref.color,
      children = _ref.children,
      className = _ref.className,
      classes = _ref.classes,
      size = _ref.size,
      width = _ref.width,
      height = _ref.height,
      viewBox = _ref.viewBox,
      hoverColor = _ref.hoverColor,
      props = __chunk_3.objectWithoutProperties(_ref, ['color', 'children', 'className', 'classes', 'size', 'width', 'height', 'viewBox', 'hoverColor']);
  return React__default.createElement(
    'svg',
    __chunk_3._extends({
      className: __chunk_1.classNames(className, classes.root, size && classes.customSize, color && classes.customColor, hoverColor && classes.hoverColor),
      width: width,
      height: height,
      viewBox: viewBox
    }, props),
    children
  );
};

Icon.propTypes = {
  color: PropTypes.string,
  hoverColor: PropTypes.string,
  children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
  className: PropTypes.string,
  classes: PropTypes.object,
  // size can be "lg/md/sm" or number {12}
  size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
  width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
  height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
  viewBox: PropTypes.string
};

Icon.defaultProps = {
  width: 24,
  height: 24,
  viewBox: '0 0 24 24'
};

var Icon$1 = __chunk_1.injectSheet(__chunk_2.withTheme(styles))(Icon);

var Exit = function Exit(props) {
  return React__default.createElement(
    Icon$1,
    __chunk_3._extends({ name: 'exit' }, props, { width: '24', height: '24', viewBox: '0 0 24 24' }),
    React__default.createElement(
      'g',
      { fillRule: 'evenodd' },
      React__default.createElement('path', { fill: '#FFF', d: 'M0 0h24v24H0z' }),
      React__default.createElement('path', {
        fillRule: 'nonzero',
        d: 'M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'
      })
    )
  );
};

exports.Icon = Icon$1;
exports.ExitIcon = Exit;
//# sourceMappingURL=chunk-95a091e0.js.map
