import React, { useEffect, useState } from 'react'; import { Button } from './Button'; import { MousePointer2, Loader2, Check } from 'lucide-react'; interface Props { type: string; onComplete: () => void; } export const TourSimulation: React.FC = ({ type, onComplete }) => { const [step, setStep] = useState(0); const getSteps = () => { if (type === 'UPLOAD') return ['Navigating to Contacts...', 'Clicking Import CSV...', 'Mapping Fields...', 'Import Confirmed!']; if (type === 'SMS_DIY') return ['Opening Settings...', 'Buying Phone Number...', 'Verifying A2P Brand...', 'SMS Active!']; if (type === 'EMAIL_DIY') return ['Opening Domain Settings...', 'Adding DNS Records...', 'Verifying DKIM/SPF...', 'Email Warmup Started!']; if (type === 'CAMPAIGN_DIY') return ['Selecting Audience...', 'Choosing Template...', 'Setting Schedule...', 'Campaign Launched!']; if (type === 'LEAD_STORE') return ['Accessing Lead Database...', 'Filtering by Criteria...', 'Selecting 50 Leads...', 'Leads Acquired!']; return ['Processing...']; }; const steps = getSteps(); useEffect(() => { if (step < steps.length) { const timer = setTimeout(() => { setStep(prev => prev + 1); }, 1500); // 1.5s per step return () => clearTimeout(timer); } else { const timer = setTimeout(() => { onComplete(); }, 1000); return () => clearTimeout(timer); } }, [step, steps.length, onComplete]); return (
{step < steps.length ? ( ) : ( )}

{step < steps.length ? 'Guided Tour in Progress' : 'Setup Complete!'}

{steps.map((text, index) => (
step ? 'text-gray-300 opacity-30 blur-[1px]' : ''} `} > {index < step && } {index === step && } {text}
))}
); };