// Phase 4 closure (FE-M3): OnboardingWizard mega-page split. // Shared shell helpers used by every step: // • StepIndicator — the top progress strip ("Connect a CA → Deploy Agent → …") // • WizardFooter — the bottom Skip / Continue bar // • CodeBlock — copyable install-command box (AgentStep, also reusable) // // Behavior copied byte-equivalent from the pre-split OnboardingWizard.tsx // so the existing E2E vitest + the operator's muscle memory don't drift. import { useState } from 'react'; import { STEPS, type WizardStep } from './types'; export function CodeBlock({ code, label }: { code: string; label?: string }) { const [copied, setCopied] = useState(false); return (
{label &&
{label}
}
        {code}
      
); } export function StepIndicator({ steps, current }: { steps: typeof STEPS; current: WizardStep }) { const currentIdx = steps.findIndex(s => s.key === current); return (
{steps.map((s, i) => { const isCompleted = i < currentIdx; const isCurrent = s.key === current; return (
{isCompleted ? ( ) : i + 1}
{i < steps.length - 1 && (
)}
); })}
); } export function WizardFooter({ onSkip, onNext, nextLabel, nextDisabled, showSkip = true }: { onSkip?: () => void; onNext?: () => void; nextLabel?: string; nextDisabled?: boolean; showSkip?: boolean; }) { return (
{showSkip && onSkip && ( )}
{onNext && ( )}
); }