import { MessageCircle, Trash2 } from "lucide-react"; import { useState } from "react"; import { Button } from "~/components/ui/button"; import { Textarea } from "~/components/ui/textarea"; interface LocalCommentAnnotationProps { kind: "draft" | "comment"; rangeLabel: string; text: string; onTextChange?: (text: string) => void; onCancel: () => void; onComment: (text: string) => void; onDelete: () => void; } export function LocalCommentAnnotation({ kind, rangeLabel, text, onTextChange, onCancel, onComment, onDelete, }: LocalCommentAnnotationProps) { const [localDraftText, setLocalDraftText] = useState(""); const displayedText = kind === "draft" && !onTextChange ? localDraftText : text; if (kind === "comment") { return (
{displayedText}