import type { ProceduralStep } from '@/types' import { Terminal, Info, CheckSquare, AlertTriangle, LayoutList } from 'lucide-react' import { cn } from '@/lib/utils' interface StaticStepsPreviewProps { steps: ProceduralStep[] name?: string } const CONTENT_TYPE_ICONS: Record = { action: Terminal, informational: Info, verification: CheckSquare, warning: AlertTriangle, } export function StaticStepsPreview({ steps, name }: StaticStepsPreviewProps) { let stepNumber = 0 return (

Preview: {name || 'Untitled Flow'}

{steps.filter((s) => s.type === 'procedure_step').length} steps

{steps.map((step) => { if (step.type === 'section_header') { return (
{step.title}
) } if (step.type === 'procedure_end') { return (
{step.title || 'Procedure Complete'}
) } stepNumber++ const contentType = step.content_type || 'action' const Icon = CONTENT_TYPE_ICONS[contentType] || Terminal return (
{stepNumber}
{step.title}
{step.commands && (
{Array.isArray(step.commands) ? step.commands.length : 1} command{(Array.isArray(step.commands) ? step.commands.length : 1) !== 1 ? 's' : ''}
)}
{step.estimated_minutes && ( ~{step.estimated_minutes}m )}
) })}
) }