"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

function PlainText(props) {
  var sender = "sender" in props ? props.sender : "Bot";
  var bubbleStyle = sender === "Me" ? "chat right-chat" : "chat left-chat";
  console.log("plain text >", props);
  var length = props.message.split(" ").length;
  var textLines = props.message.split("\n\n");
  return /*#__PURE__*/React.createElement("div", {
    key: "chat".concat(new Date().getTime() * length),
    className: bubbleStyle
  }, /*#__PURE__*/React.createElement("div", {
    key: "msgBubble".concat(new Date().getTime()),
    className: "chat-bubble"
  }, textLines.map(function (txt, i) {
    return /*#__PURE__*/React.createElement("div", {
      key: "msgText".concat(new Date().getTime()).concat(i),
      className: "chat-text"
    }, txt.trim());
  })));
}

var _default = PlainText;
exports["default"] = _default;