import{d as h,r as u,j as e,c as t}from"./index-BOwCLZTK.js";import{e as f,g as p,a as g,b as j,f as b}from"./chat-utils-D21OFED5.js";/**
 * @license lucide-react v0.559.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],k=h("message-square-text",w),v=u.memo(function({senderName:a,text:n,timestamp:c,nameAccessory:d,bubbleAccessory:x,className:o}){const{emoji:l,cleanName:i}=f(a),r=p(i),m=g(a);return e.jsxs("div",{className:t("group flex items-start gap-3 w-full",o),children:[e.jsxs("div",{className:"flex-shrink-0 w-9 flex flex-col items-center gap-1",children:[e.jsx("div",{className:t("w-9 h-9 rounded-full flex items-center justify-center","shadow-md ring-1 ring-edge-subtle",l?"text-lg":"text-white text-[13px] font-bold tracking-tight"),style:{backgroundColor:r},children:l||m}),e.jsx("span",{className:"text-xs text-fg-muted tabular-nums h-4 leading-4",children:j(c)})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 h-5 mb-1",children:[e.jsx("span",{className:"text-[13px] font-medium truncate",style:{color:r,lineHeight:"20px"},children:i}),d]}),e.jsxs("div",{className:"flex items-end gap-1.5",children:[e.jsx("div",{className:t("inline-block px-3.5 py-2.5 max-w-full","rounded-2xl rounded-tl-md","bg-[#007AFF]"),children:e.jsx("p",{className:"text-sm text-white leading-relaxed tracking-wide whitespace-pre-wrap break-words",children:b(n)})}),x]})]})]})});function C({text:s}){return e.jsx("div",{className:"flex justify-center my-1",children:e.jsx("span",{className:t("px-3 py-1 rounded-full","bg-subtle-fill text-[11px] text-fg-muted/80 font-medium","ring-1 ring-edge-subtle"),children:s})})}export{v as C,k as M,C as S};
