"use strict";

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

require("core-js/modules/es.regexp.exec.js");

require("core-js/modules/es.string.split.js");

require("core-js/modules/es.string.trim.js");

function PlainText(props) {
  const sender = "sender" in props ? props.sender : "Bot";
  let bubbleStyle = sender === "Me" ? "chat right-chat" : "chat left-chat";
  console.log("plain text >", props);
  let length = props.message.split(" ").length;
  const 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((txt, i) => /*#__PURE__*/React.createElement("div", {
    key: "msgText".concat(new Date().getTime()).concat(i),
    className: "chat-text"
  }, txt.trim()))));
}

var _default = PlainText;
exports.default = _default;