// ═══════════════════════════════════════════════════════════════════════════ // QUIZ 8BAC — capa + 3 perguntas + popup de captura // ═══════════════════════════════════════════════════════════════════════════ const QUIZ_LABELS = { tem_trafego: { sim: 'Sim, já invisto/investi', nao: 'Não, ainda não' }, faturamento: { 'ate-30k': 'Até R$ 30 mil', '30-60k': 'R$ 30 a 60 mil', '60-150k': 'R$ 60 a 150 mil', '150k+': 'R$ 150 mil ou mais', }, atendimento: { ligacao: 'Ligação', mensagem: 'Mensagem', video: 'Vídeo-chamada' }, }; function Quiz({ onCapture, onClose, originText, mode }) { const isOverlay = mode === 'overlay'; const [step, setStep] = React.useState(0); // 0=capa, 1..3=perguntas const [modalOpen, setModalOpen] = React.useState(false); const [answers, setAnswers] = React.useState({ tem_trafego: '', faturamento: '', atendimento: '' }); React.useEffect(() => { if (window.lucide) window.lucide.createIcons(); }, [step, modalOpen]); React.useEffect(() => { if (isOverlay) { document.body.style.overflow = 'hidden'; return () => { document.body.style.overflow = ''; }; } }, [isOverlay]); function startQuiz() { fireCustom('QuizStart'); setStep(1); } function pickAnswer(key, value, eventName) { setAnswers(a => ({ ...a, [key]: value })); fireCustom(eventName, { [key]: value }); const next = step + 1; setTimeout(() => { if (next <= 3) setStep(next); else setModalOpen(true); }, 380); } return (
Vou te fazer 3 perguntas rapidinho antes da gente conversar — é o jeito mais rápido de eu já chegar com a estratégia certa pro seu negócio.
{sub}
}