import { Eye, Plus, SquareDashed, Tag, Trash2 } from 'lucide-react' import { cn } from '../lib/utils' import { t } from '../lib/i18n' import type { Lang, ToolMode } from '../lib/types' const TOOLS: { id: ToolMode icon: typeof Eye labelKey: 'toolView' | 'toolDelete' | 'toolAdd' | 'toolReassign' | 'toolArea' activeClass: string }[] = [ { id: 'view', icon: Eye, labelKey: 'toolView', activeClass: 'bg-[var(--text)] text-white' }, { id: 'delete', icon: Trash2, labelKey: 'toolDelete', activeClass: 'bg-[var(--danger)] text-white' }, { id: 'add', icon: Plus, labelKey: 'toolAdd', activeClass: 'bg-[var(--success)] text-white' }, { id: 'reassign', icon: Tag, labelKey: 'toolReassign', activeClass: 'bg-[var(--info)] text-white' }, { id: 'area', icon: SquareDashed, labelKey: 'toolArea', activeClass: 'bg-[#7c3aed] text-white' }, ] interface Props { lang: Lang tool: ToolMode onToolChange: (tool: ToolMode) => void } export function ToolBar({ lang, tool, onToolChange }: Props) { return (

{t(lang, 'tools')}

{TOOLS.map(({ id, icon: Icon, labelKey, activeClass }) => { const active = tool === id return ( ) })}
) }