import React from 'react' import { motion, useReducedMotion } from 'framer-motion' /** * StudioStatusBar * * Sticky header beneath the main nav that shows: * - Step pills (reuse UploadStepper visual style but condensed) * - Upload progress bar (visible while uploading/processing) * - Machine-state pill * - Back / Next primary actions */ const STATE_LABELS = { idle: null, initializing: 'Initializing…', uploading: 'Uploading', finishing: 'Finishing…', processing: 'Processing', ready_to_publish: 'Ready', publishing: 'Publishing…', complete: 'Published', error: 'Error', cancelled: 'Cancelled', } const STATE_COLORS = { idle: '', initializing: 'bg-sky-500/20 text-sky-200 border-sky-300/30', uploading: 'bg-sky-500/25 text-sky-100 border-sky-300/40', finishing: 'bg-sky-400/20 text-sky-200 border-sky-300/30', processing: 'bg-amber-500/20 text-amber-100 border-amber-300/30', ready_to_publish: 'bg-emerald-500/20 text-emerald-100 border-emerald-300/35', publishing: 'bg-sky-500/25 text-sky-100 border-sky-300/40', complete: 'bg-emerald-500/25 text-emerald-100 border-emerald-300/50', error: 'bg-red-500/20 text-red-200 border-red-300/30', cancelled: 'bg-white/8 text-white/50 border-white/15', } export default function StudioStatusBar({ steps = [], activeStep = 1, highestUnlockedStep = 1, machineState = 'idle', progress = 0, showProgress = false, onStepClick, }) { const prefersReducedMotion = useReducedMotion() const transition = prefersReducedMotion ? { duration: 0 } : { duration: 0.3, ease: 'easeOut' } const stateLabel = STATE_LABELS[machineState] ?? machineState const stateColor = STATE_COLORS[machineState] ?? 'bg-white/8 text-white/50 border-white/15' return (