import React from 'react'; import { useTranslation } from 'react-i18next'; interface WizardStepperProps { currentStep: number; // 0~3, matching wizardStep in GenerationFlow } const WizardStepper: React.FC = ({ currentStep }) => { const { t } = useTranslation(); const steps = [ t('wizardSteps.brandAnalysis'), t('wizardSteps.asset'), t('wizardSteps.sound'), t('wizardSteps.video'), ]; return (
{steps.map((label, index) => { const isDone = index < currentStep; const isCurrent = index === currentStep; const stateClass = isDone ? ' done' : isCurrent ? ' current' : ' pending'; return ( {/* 노드: 2rem 고정 너비. 라벨은 absolute로 노드 중심 아래에 붙음 */}
{isDone ? ( ) : ( {index + 1} )}
{label}
{/* 연결선: flex:1로 남은 공간을 균등하게 채움 */} {index < steps.length - 1 && (
)} ); })}
); }; export default WizardStepper;