import { GitBranch, Layers, CheckCircle, ArrowRight, RotateCcw, Play } from 'lucide-react' import { useAIFlowBuilderStore } from '@/store/aiFlowBuilderStore' import { cn } from '@/lib/utils' interface TreePreviewCardProps { onOpenInEditor: () => void onStartFlow: () => void onBuildAnother: () => void } export function TreePreviewCard({ onOpenInEditor, onStartFlow, onBuildAnother }: TreePreviewCardProps) { const { assembledTree, isLoading } = useAIFlowBuilderStore() if (!assembledTree) return null const { summary } = assembledTree const stats = [ { label: 'Nodes', value: summary.node_count, icon: Layers }, { label: 'Decisions', value: summary.decision_count, icon: GitBranch }, { label: 'Solutions', value: summary.solution_count, icon: CheckCircle }, { label: 'Depth', value: summary.depth, icon: Layers }, ] return (

Tree Assembled

"{assembledTree.suggested_name}" is ready to review in the editor.

{/* Stats grid */}
{stats.map(({ label, value, icon: Icon }) => (
{value} {label}
))}
{/* Description */} {assembledTree.suggested_description && (

{assembledTree.suggested_description}

)} {/* Actions */}
) }