import React from 'react'; import { useTranslation } from 'react-i18next'; interface WizardStepperProps { currentStep: number; // 0-based. ADO2 는 wizardStep 0~3 과 일치 /** * 단계 라벨. 생략하면 ADO2 기본 4단계를 쓴다(기존 호출부 무수정). * 썰박스처럼 단계 구성이 다른 파이프라인이 직접 넘긴다. */ steps?: string[]; } const WizardStepper: React.FC = ({ currentStep, steps: stepsProp }) => { const { t } = useTranslation(); const steps = stepsProp ?? [ 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;