"use client" import { useState } from "react" interface HighlightSelectionToolbarProperties { selectionRect: DOMRect containerRect: DOMRect onHighlight: (note: string | null) => void onShare: () => void onDismiss: () => void } export function HighlightSelectionToolbar({ selectionRect, onHighlight, onShare, onDismiss, }: HighlightSelectionToolbarProperties) { const [showNoteInput, setShowNoteInput] = useState(false) const [noteText, setNoteText] = useState("") const toolbarLeft = selectionRect.left + selectionRect.width / 2 const toolbarTop = selectionRect.top - 8 function handleHighlightClick() { if (showNoteInput) { onHighlight(noteText.trim() || null) } else { onHighlight(null) } } return (