import{c as e}from"./index-nE6cslhy.js";import{r as s,j as t,c as a}from"./vendor-react-Co0R0q1H.js";import{e as l,g as r,a as i,b as n,f as d}from"./chat-utils-Cr1hSgWq.js";const c=e("message-square-text",[["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"}]]),m=s.memo(function({senderName:e,text:s,timestamp:c,nameAccessory:m,bubbleAccessory:x,className:o}){const{emoji:h,cleanName:p}=l(e),f=r(p),u=i(e);return t.jsxs("div",{className:a("group flex items-start gap-3 w-full",o),children:[t.jsxs("div",{className:"flex-shrink-0 w-9 flex flex-col items-center gap-1",children:[t.jsx("div",{className:a("w-9 h-9 rounded-full flex items-center justify-center","shadow-md ring-1 ring-edge-subtle",h?"text-lg":"text-white text-[13px] font-bold tracking-tight"),style:{backgroundColor:f},children:h||u}),t.jsx("span",{className:"text-xs text-fg-muted tabular-nums h-4 leading-4",children:n(c)})]}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center gap-2 h-5 mb-1",children:[t.jsx("span",{className:"text-[13px] font-medium truncate",style:{color:f,lineHeight:"20px"},children:p}),m]}),t.jsxs("div",{className:"flex items-end gap-1.5",children:[t.jsx("div",{className:a("inline-block px-3.5 py-2.5 max-w-full","rounded-2xl rounded-tl-md","bg-[#007AFF]"),children:t.jsx("p",{className:"text-sm text-white leading-relaxed tracking-wide whitespace-pre-wrap break-words",children:d(s)})}),x]})]})]})});function x({text:e}){return t.jsx("div",{className:"flex justify-center my-1",children:t.jsx("span",{className:a("px-3 py-1 rounded-full","bg-subtle-fill text-[11px] text-fg-muted/80 font-medium","ring-1 ring-edge-subtle"),children:e})})}export{m as C,c as M,x as S};
