import type { EditorMode } from "@/uhm/lib/editor/session/sessionTypes"; import { Panel } from "./Panel"; import { ModeHint } from "./ModeHint"; type ToolsPanelProps = { mode: EditorMode; setMode: (mode: EditorMode) => void; onUndo: () => void; }; export function ToolsPanel({ mode, setMode, onUndo }: ToolsPanelProps) { const toggleMode = (newMode: EditorMode) => { if (mode === newMode) { setMode("idle"); } else { setMode(newMode); } }; const modeButtonStyle = (btnMode: EditorMode) => ({ padding: "8px 10px", borderRadius: 6, border: "1px solid #334155", background: mode === btnMode ? "#16a34a" : "#111827", color: "white", cursor: "pointer", fontWeight: 800, fontSize: 12, minHeight: 34, boxSizing: "border-box", }) as const; return (
Mode: {mode}
); }