import React from 'react'; import { ProcessingStep, VideoJob } from '../types'; import { Loader2, CheckCircle2, Music, Video, FileText, UploadCloud } from 'lucide-react'; interface ProcessTrackerProps { job: VideoJob; } const steps = [ { id: ProcessingStep.UPLOAD, label: "Upload", icon: UploadCloud }, { id: ProcessingStep.LYRICS, label: "Lyrics", icon: FileText }, { id: ProcessingStep.MUSIC, label: "Music", icon: Music }, { id: ProcessingStep.VIDEO, label: "Video", icon: Video }, ]; export const ProcessTracker: React.FC = ({ job }) => { const getCurrentStepIndex = () => { if (job.currentStep === ProcessingStep.DONE) return steps.length; return steps.findIndex(s => s.id === job.currentStep); }; const currentIndex = getCurrentStepIndex(); return (

Creating Magic for {job.data.customer_name}

{/* Connecting Line */}
{steps.map((step, index) => { const isActive = index === currentIndex; const isCompleted = index < currentIndex; const Icon = step.icon; return (
{isCompleted ? : isActive ? : }
{step.label}
); })}

{job.currentStep !== ProcessingStep.DONE ? `Current Step: ${job.currentStep}` : 'Finalizing output...'}

); };