"use client"; import { CheckCircle2, Circle, Crosshair, Download, FileInput, GitBranchPlus, Radio, Save, Square, Upload } from "lucide-react"; import { Button } from "@/components/ui/Button"; import { PlaybackControls } from "@/components/tree-visualizer/PlaybackControls"; import type { TreeNodeViewMode } from "@/components/tree-visualizer/viewMode"; import { cn } from "@/lib/utils"; interface TreeCommandBarProps { hasTree: boolean; isDirty: boolean; isPlaying: boolean; isSaving: boolean; isValidating: boolean; nodeViewMode: TreeNodeViewMode; onCreate: () => void; onImport: () => void; onModelStream: () => void; onSave: () => void; onExportRaw: () => void; onValidate: () => void; onReplay: () => void; onPause: () => void; onStep: () => void; onFitView: () => void; onNodeViewModeChange: (mode: TreeNodeViewMode) => void; } export function TreeCommandBar({ hasTree, isDirty, isPlaying, isSaving, isValidating, nodeViewMode, onCreate, onImport, onModelStream, onSave, onExportRaw, onValidate, onReplay, onPause, onStep, onFitView, onNodeViewModeChange }: TreeCommandBarProps) { const modeOptions = [ { mode: "full" as const, label: "Full", icon: Square }, { mode: "atom" as const, label: "Atom", icon: Circle } ]; return (
{modeOptions.map(({ mode, label, icon: Icon }) => { const active = nodeViewMode === mode; return ( ); })}
{isDirty ? "unsaved edits" : "workspace synced"}
); }