/* global React */ const { useState: useStateW, useMemo: useMemoW, useEffect: useEffectW } = React; const WEBHOOK = "https://n8n.226.wtf/webhook/whycanti-lead"; function submitLead(payload) { return fetch(WEBHOOK, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }).catch(() => {}); } // ============ QUICK WIZARD — 3 steps ============ function WizardQuick({ setPage }) { const [step, setStep] = useStateW(0); const [data, setData] = useStateW({ need:"", timeline:"", contact:"" }); const [submitting, setSubmitting] = useStateW(false); const steps = [ { k:"need", q:"What do you need most?", opts:[ ["website","Stronger website / brand"], ["content","Consistent content"], ["systems","Cleaner systems & ops"], ["strategy","Senior strategic direction"], ]}, { k:"timeline", q:"When are you starting?", opts:[ ["now","Immediately"], ["30d","Within 30 days"], ["60d","Within 60 days"], ["explore","Just exploring"], ]}, ]; if (step >= steps.length) { return (
Quick fit — complete
Looks like a fit.
Let's talk.

Based on what you told us, you'd most likely benefit from {labelFor(data.need)}. Drop your email and we'll send a 20-minute call slot.

setData({...data, contact: e.target.value})} style={{ marginBottom: 16, textAlign:"center" }}/>
); } const s = steps[step]; return (
Quick fit — 2 questions
{step + 1} / {steps.length}

{s.q}

{s.opts.map(([v, l]) => ( ))}
); } function labelFor(k) { return { website:"Brand Launch", content:"a Content Engine", systems:"Growth Infrastructure", strategy:"Strategic Support", }[k] || "a tailored engagement"; } // ============ FULL WIZARD — 8 steps with branching + live summary ============ function WizardFull({ setPage }) { const [step, setStep] = useStateW(0); const [data, setData] = useStateW({ business:"", stage:"", challenges:[], services:[], outcomes:[], timeline:"", budget:"", name:"", email:"", company:"", website:"", phone:"", notes:"", }); const steps = [ { k:"business", kind:"single", q:"What kind of business do you run?", opts:[["service","Service business"],["local","Local business"],["personal","Personal brand"],["ecom","Ecommerce"],["startup","Startup"],["creative","Creative business"],["other","Other"]] }, { k:"stage", kind:"single", q:"Where are you in the arc?", opts:[["fresh","Starting fresh"],["outdated","Existing but outdated"],["growing","Growing & inconsistent"],["established","Established but inefficient"],["scale","Ready to scale"]] }, { k:"challenges", kind:"multi", q:"What's slowing you down? Pick all that apply.", opts:[["site","Weak website"],["content","Inconsistent content"],["systems","Messy backend systems"],["positioning","Unclear positioning"],["execution","Not enough execution support"],["manual","Too many manual processes"]] }, { k:"services", kind:"multi", q:"Which areas do you think you need?", opts:[["brand","Website / brand launch"],["content","Content engine"],["growth","Growth infrastructure"],["strat","Strategic support"],["unsure","Not sure yet"]] }, { k:"outcomes", kind:"multi", q:"What would you like to improve in 90 days?", opts:[["credible","Look more credible"],["leads","Generate more leads"],["consistency","Publish consistently"],["time","Save time"],["workflows","Improve workflows"],["offer","Clarify the offer"],["scale","Scale efficiently"]] }, { k:"timeline", kind:"single", q:"When do you want to begin?", opts:[["now","Immediately"],["30","Within 30 days"],["60","Within 60 days"],["q","This quarter"],["explore","Exploring"]] }, { k:"budget", kind:"single", q:"What's your investment range?", opts:[["u2","Under $2k"],["2-5","$2k–$5k"],["5-10","$5k–$10k"],["10p","$10k+"],["guide","Need guidance"]] }, { k:"contact", kind:"contact", q:"Where should we send the brief?" }, ]; const total = steps.length; const recommendation = useMemoW(() => recommendFor(data), [data]); if (step >= total) { return ; } const s = steps[step]; const set = (val) => { if (s.kind === "multi") { const cur = data[s.k] || []; const next = cur.includes(val) ? cur.filter(x => x !== val) : [...cur, val]; setData({...data, [s.k]: next}); } else { setData({...data, [s.k]: val}); } }; const canAdvance = s.kind === "contact" ? data.name && data.email : s.kind === "multi" ? (data[s.k] || []).length > 0 : !!data[s.k]; return (
{/* Main */}
Onboarding wizard
STEP {String(step+1).padStart(2,"0")} / {String(total).padStart(2,"0")}
{Array.from({ length: total }).map((_, i) => (
))}

{s.q}

{s.kind === "contact" ? (
setData({...data, name: e.target.value})}/> setData({...data, email: e.target.value})}/>
setData({...data, company: e.target.value})}/> setData({...data, website: e.target.value})}/>
setData({...data, phone: e.target.value})}/>