import React from 'react' function ProcessingOverlay({ stems, progress }) { // Include mixing step in the progress display const allSteps = [...stems, '_mix'] const doneCount = Object.values(progress).filter(s => s === 'done').length const totalSteps = allSteps.length // Check if currently processing any stem const currentlyProcessing = Object.entries(progress).find(([_, status]) => status === 'processing')?.[0] return (
⚙️

Processing Audio

{currentlyProcessing === '_mix' ? 'Mixing stems together...' : currentlyProcessing ? `Processing ${currentlyProcessing.replace(/_/g, ' ')}...` : 'Please wait while we shift the pitch and tempo...'}

{/* Progress list */}
{allSteps.map((stem) => { const status = progress[stem] || 'waiting' const displayName = stem === '_mix' ? 'Final Mix' : stem.replace(/_/g, ' ') return (
{stem === '_mix' && 🎵} {displayName} {status === 'done' && '✓ Done'} {status === 'processing' && '⏳ Processing...'} {status === 'waiting' && '○ Waiting'} {status.startsWith('error') && '✗ Error'}
) })}
{/* Progress bar */}

{doneCount} of {totalSteps} complete

) } export default ProcessingOverlay