import type { Post } from "../../../types/post";
import { useI18n } from "../../../i18n";
import { autolink } from "../utils/autolink";
import { postDisplayText } from "../utils/postText";
import { CollapsibleText } from "../CollapsibleText";

export function TextBubble({ post }: { post: Post }) {
  const { lang } = useI18n();
  return (
    <CollapsibleText className="message-stream-copyable-text select-text whitespace-pre-wrap break-words text-[14px] leading-snug text-neutral-100">
      {autolink(postDisplayText(post, lang))}
    </CollapsibleText>
  );
}
