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; onCancel: () => void; onComment: (text: string) => void; onDelete: () => void; } export function LocalCommentAnnotation({ kind, rangeLabel, text: savedText, onCancel, onComment, onDelete, }: LocalCommentAnnotationProps) { const [text, setText] = useState(""); if (kind === "comment") { return (
event.stopPropagation()} >
Local comment {rangeLabel}

{savedText}

); } return (
event.stopPropagation()} >
Local comment
Comment on lines {rangeLabel}