"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");

// import BotIcon from "../../images/icons/boticon.png";
// import UserIcon from "../../images/icons/usericon.png";
// <img src={BotIcon} style={{ width: "20px", height: "20px" }} /> 
// <img src={UserIcon} style={{ width: "20px", height: "20px" }} />
function TitleText(props) {
  // console.log("TitleText -", props);
  let bubbleStyle = props.params.sender === "Me" ? "chat right-chat" : "chat left-chat";
  let length = props.params.message.split(" ").length;
  const textLines = props.params.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"
  }, /*#__PURE__*/React.createElement("div", {
    key: "msgInfo".concat(new Date().getTime()),
    className: "chat-info"
  }, /*#__PURE__*/React.createElement("div", {
    key: "msgName".concat(new Date().getTime()),
    className: "chat-info-name"
  }, props.params.sender === "Bot" ? "Bot" : "Me"), /*#__PURE__*/React.createElement("div", {
    key: "msgTime".concat(new Date().getTime()),
    className: "chat-info-time"
  }, props.params.timestamp)), textLines.map((txt, i) => /*#__PURE__*/React.createElement("div", {
    key: "msgText".concat(new Date().getTime()).concat(i),
    className: "chat-text"
  }, txt.trim()))));
}

var _default = TitleText;
exports.default = _default;