'use strict';

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

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _palette = require('../../palette');

var _palette2 = _interopRequireDefault(_palette);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

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

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

var MicroCardGutter = function MicroCardGutter(props) {
  var className = props.className,
      color = props.color,
      _props$style = props.style,
      style = _props$style === undefined ? {} : _props$style,
      rest = _objectWithoutProperties(props, ['className', 'color', 'style']);

  var backgroundColor = '';
  switch (color) {
    case 'critical':
      backgroundColor = _palette2.default.red;
      break;
    case 'warning':
      backgroundColor = _palette2.default.yellow;
      break;
    case 'normal':
      backgroundColor = _palette2.default.blue;
      break;
    case 'blue':
      backgroundColor = _palette2.default.blue;
      break;
    default:
      backgroundColor = color;
  }

  return _react2.default.createElement('div', _extends({
    className: (0, _classnames2.default)('microcard__gutter', className),
    style: _extends({}, style, { backgroundColor: backgroundColor })
  }, rest));
};

MicroCardGutter.defaultProps = {
  color: '#FFFFFF'
};

MicroCardGutter.propTypes = {
  /**
   * Gutter color.  Use simple strings, e.g. red/green/blue, to pull standard
   * colors off the pallete, or, provide a web-friendly color string.
   */
  color: _propTypes2.default.string
};

exports.default = MicroCardGutter;
//# sourceMappingURL=MicroCardGutter.js.map