import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["contentArray", "aside", "className", "toRight", "clickable", "noPadding", "small", "spacedBottom", "color"];
import * as React from 'react';
import classnames from 'classnames';
export var COLORS_MAP = {
  white: 'white',
  transparent: 'transparent',
  'blue-20': 'blue-20',
  'gray-20': 'gray-20'
};

var Media = function Media(props) {
  var _props$contentArray = props.contentArray,
      contentArray = _props$contentArray === void 0 ? [] : _props$contentArray,
      aside = props.aside,
      className = props.className,
      toRight = props.toRight,
      clickable = props.clickable,
      noPadding = props.noPadding,
      small = props.small,
      spacedBottom = props.spacedBottom,
      _props$color = props.color,
      color = _props$color === void 0 ? 'white' : _props$color,
      restProps = _objectWithoutProperties(props, _excluded);

  var mediaClassName = classnames('sg-media', _defineProperty({
    'sg-media--to-right': toRight,
    'sg-media--clickable': clickable,
    'sg-media--no-padding': noPadding
  }, "sg-media--".concat(String(color)), color), className);
  var contentClassName = classnames('sg-media__content', {
    'sg-media__content--small': small,
    'sg-media__content--spaced-bottom': spacedBottom
  });
  return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
    className: mediaClassName
  }), /*#__PURE__*/React.createElement("div", {
    className: "sg-media__aside"
  }, aside), /*#__PURE__*/React.createElement("div", {
    className: "sg-media__wrapper"
  }, contentArray.map(function (content, index) {
    return /*#__PURE__*/React.createElement("div", {
      key: index,
      className: contentClassName
    }, content);
  })));
};

export default Media;