var _excluded = ["icon", "caption", "captionAttribute", "contentAttribute", "textAttribute", "children"];

function _extends() { _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; }; return _extends.apply(this, arguments); }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React, { forwardRef } from 'react';
var Chat = forwardRef(function (_ref, ref) {
  var icon = _ref.icon,
      caption = _ref.caption,
      _ref$captionAttribute = _ref.captionAttribute,
      captionAttribute = _ref$captionAttribute === void 0 ? {} : _ref$captionAttribute,
      _ref$contentAttribute = _ref.contentAttribute,
      contentAttribute = _ref$contentAttribute === void 0 ? {} : _ref$contentAttribute,
      _ref$textAttribute = _ref.textAttribute,
      textAttribute = _ref$textAttribute === void 0 ? {} : _ref$textAttribute,
      children = _ref.children,
      others = _objectWithoutPropertiesLoose(_ref, _excluded);

  return /*#__PURE__*/React.createElement("div", _extends({
    ref: ref
  }, others, {
    className: "chat" + (others.className ? ' ' + others.className : '')
  }), icon, /*#__PURE__*/React.createElement("div", _extends({}, contentAttribute, {
    className: "chat-content" + (contentAttribute.className ? ' ' + contentAttribute.className : '')
  }), caption && /*#__PURE__*/React.createElement("div", _extends({}, captionAttribute, {
    className: "chat-content-caption" + (captionAttribute.className ? ' ' + captionAttribute.className : '')
  }), caption), /*#__PURE__*/React.createElement("div", _extends({}, textAttribute, {
    className: "chat-content-text" + (textAttribute.className ? ' ' + textAttribute.className : '')
  }), children)));
});
export default Chat;