// components.jsx — reusable UI pieces for Sendly (i18n-aware) const { useState, useEffect, useRef, useMemo } = React; /* ============ Decorative doodles ============ */ function Doodles() { return ( ); } /* ============ Step dots ============ */ function StepDots({ step, max }) { const dots = []; for (let i = 1; i <= max; i++) { let cls = "step-dot"; if (i < step) cls += " done"; if (i === step) cls += " active"; dots.push(
{i < step ? ( ) : i}
{i < max &&
} ); } return
{dots}
; } /* ============ Confetti ============ */ function Confetti({ show, palette }) { const pieces = useMemo(() => { if (!show) return []; const out = []; for (let i = 0; i < 90; i++) { out.push({ id: i, left: Math.random() * 100, bg: palette[Math.floor(Math.random() * palette.length)], delay: Math.random() * 0.6, duration: 1.6 + Math.random() * 1.6, rotate: Math.random() * 360, size: 8 + Math.random() * 8, }); } return out; }, [show, palette]); if (!show) return null; return (