'use client' import type { AnnotationType } from '@/app/korrektur/types' import { ANNOTATION_COLORS } from '@/app/korrektur/types' interface AnnotationToolbarProps { selectedTool: AnnotationType | null onToolSelect: (tool: AnnotationType | null) => void className?: string } const tools: Array<{ type: AnnotationType label: string shortcut: string icon: React.ReactNode }> = [ { type: 'rechtschreibung', label: 'Rechtschreibung', shortcut: 'R', icon: ( ), }, { type: 'grammatik', label: 'Grammatik', shortcut: 'G', icon: ( ), }, { type: 'inhalt', label: 'Inhalt', shortcut: 'I', icon: ( ), }, { type: 'struktur', label: 'Struktur', shortcut: 'S', icon: ( ), }, { type: 'stil', label: 'Stil', shortcut: 'T', icon: ( ), }, { type: 'comment', label: 'Kommentar', shortcut: 'K', icon: ( ), }, ] export function AnnotationToolbar({ selectedTool, onToolSelect, className = '', }: AnnotationToolbarProps) { return (
{tools.map((tool) => { const isSelected = selectedTool === tool.type const color = ANNOTATION_COLORS[tool.type] return ( ) })} {/* Divider */}
{/* Clear Tool Button */}
) } // ============================================================================= // ANNOTATION LEGEND // ============================================================================= export function AnnotationLegend({ className = '' }: { className?: string }) { return (
{tools.map((tool) => (
{tool.label}
))}
) }