// Languages typographic wall + Parents + FAQ + Closer function Languages({ t }) { const [playingIdx, setPlayingIdx] = useState(-1); const audioRef = useRef(null); const handlePlay = (i, phrase, lang) => { // Stop any currently playing audio if (audioRef.current) { audioRef.current.pause(); audioRef.current = null; } // Map language name to audio file const audioMap = { Hindi: 'hindi', English: 'english', Bengali: 'bengali', Telugu: 'telugu', Tamil: 'tamil', Kannada: 'kannada', Malayalam: 'malayalam', Marathi: 'marathi', Gujarati: 'gujarati', Odia: 'odia', Punjabi: 'punjabi' }; const audioFile = audioMap[lang]; if (audioFile) { setPlayingIdx(i); const audio = new Audio(`/landing-new/assets/voices/${audioFile}.mp3`); audioRef.current = audio; audio.onended = () => { setPlayingIdx(-1); audioRef.current = null; }; audio.onerror = () => { // Fallback to browser TTS if audio file not found setPlayingIdx(-1); try { if (window.speechSynthesis) { window.speechSynthesis.cancel(); const u = new SpeechSynthesisUtterance(phrase); const voiceMap = { Hindi: 'hi-IN', English: 'en-IN', Bengali: 'bn-IN', Telugu: 'te-IN', Tamil: 'ta-IN', Kannada: 'kn-IN', Malayalam: 'ml-IN', Marathi: 'mr-IN', Gujarati: 'gu-IN', Odia: 'or-IN', Punjabi: 'pa-IN' }; u.lang = voiceMap[lang] || 'en-IN'; u.rate = 0.9; u.onend = () => setPlayingIdx(-1); setPlayingIdx(i); window.speechSynthesis.speak(u); } } catch(e) {} }; audio.play().catch(() => setPlayingIdx(-1)); } else { // Fallback to browser TTS for unsupported languages setPlayingIdx(i); try { if (window.speechSynthesis) { window.speechSynthesis.cancel(); const u = new SpeechSynthesisUtterance(phrase); u.lang = 'en-IN'; u.rate = 0.9; u.onend = () => setPlayingIdx(-1); window.speechSynthesis.speak(u); } } catch(e) {} setTimeout(() => setPlayingIdx(p => p === i ? -1 : p), 3500); } }; return (
§ 04 — {t.langs.label} 11 SCRIPTS · ONE IDEA

{t.langs.title}

{t.langs.sub}
{t.langs.list.map((l, i) => (
handlePlay(i, l.phrase, l.name)} >
{l.name} {playingIdx === i ? '♪ …' : '►'}
{l.phrase}
{l.region}
))}
* {t.langs.note}
); } function Parents({ t }) { return (
§ 05 — {t.parents.label} FOUR COMMITMENTS
{t.parents.items.map((item, i) => (
C/0{i + 1}
{item.t}
{item.d}
))}
); } function FAQ({ t }) { const [open, setOpen] = useState(0); return (
§ 06 — {t.faq.label} TAP TO EXPAND

{t.faq.label}

{t.faq.items.map((item, i) => (
setOpen(open === i ? -1 : i)}> {item.q} +
{item.a}
))}
); } function Closer({ t }) { return (

{t.closer.title}

{t.closer.cta}
{t.closer.tag} {t.closer.tag_trans}
{t.closer.contact_label} {t.closer.contact}
{t.closer.made}
{t.closer.addr}
); } window.Languages = Languages; window.Parents = Parents; window.FAQComp = FAQ; window.Closer = Closer;