'use client' import { Container, Card, CardContent, Typography, Box, Button, Paper, useTheme, Accordion, AccordionSummary, AccordionDetails, TextField, Chip, Avatar, Divider, IconButton, Tooltip, } from '@mui/material' import { MenuBook, Chat, Favorite as Prayer, Search, AutoStories, Favorite, ExpandMore, PlayArrow, Share, Bookmark, TrendingUp, QuestionAnswer, Facebook, Twitter, Instagram, YouTube, } from '@mui/icons-material' import { useRouter } from 'next/navigation' import { useTranslations, useLocale } from 'next-intl' import { useState, useEffect } from 'react' export default function Home() { const theme = useTheme() const router = useRouter() const t = useTranslations('home') const tSeo = useTranslations('seo') const locale = useLocale() const [userCount, setUserCount] = useState(2847) const [expandedFaq, setExpandedFaq] = useState(false) const [email, setEmail] = useState('') // Simulate live user counter useEffect(() => { const interval = setInterval(() => { setUserCount(prev => prev + Math.floor(Math.random() * 3)) }, 5000) return () => clearInterval(interval) }, []) // Generate current date and year const getCurrentDate = () => { const now = new Date() if (locale === 'ro') { return now.toLocaleDateString('ro-RO', { year: 'numeric', month: 'long', day: 'numeric' }) } else { return now.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) } } const getCurrentYear = () => { return new Date().getFullYear() } const features = [ { title: t('features.bible.title'), description: t('features.bible.description'), icon: , path: '/bible', color: theme.palette.primary.main, }, { title: t('features.chat.title'), description: t('features.chat.description'), icon: , path: '/__open-chat__', color: theme.palette.secondary.main, }, { title: t('features.prayers.title'), description: t('features.prayers.description'), icon: , path: '/prayers', color: theme.palette.success.main, }, { title: t('features.search.title'), description: t('features.search.description'), icon: , path: '/search', color: theme.palette.info.main, }, ] return ( {/* Hero Section */} {t('hero.title')} {t('hero.subtitle')} {t('hero.description')} {t('hero.liveCounter')} {/* Interactive Demo Section */} {t('demo.title')} {t('demo.subtitle')} {t('demo.userQuestion')} {t('demo.aiResponse')} {/* Daily Verse Section */} {t('dailyVerse.title')} {getCurrentDate()} {t('dailyVerse.verse')} {t('dailyVerse.reference')} { const verseText = t('dailyVerse.verse') const reference = t('dailyVerse.reference') const discussMessage = locale === 'ro' ? `Poți să îmi explici mai mult despre acest verset: "${verseText}" (${reference})?` : `Can you explain more about this verse: "${verseText}" (${reference})?` window.dispatchEvent(new CustomEvent('floating-chat:open', { detail: { fullscreen: true, initialMessage: discussMessage } })) }} > {t('dailyVerse.tomorrow')} {/* How It Works Section */} {t('howItWorks.title')} {t('howItWorks.subtitle')} {[ { icon: , title: t('howItWorks.step1.title'), description: t('howItWorks.step1.description') }, { icon: , title: t('howItWorks.step2.title'), description: t('howItWorks.step2.description') }, { icon: , title: t('howItWorks.step3.title'), description: t('howItWorks.step3.description') }, ].map((step, index) => ( {step.icon} {step.title} {step.description} {index + 1} ))} {/* Community Prayer Wall */} {t('prayerWall.title')} {[ { text: t('prayerWall.prayer1'), time: t('prayerWall.time1'), count: 32 }, { text: t('prayerWall.prayer2'), time: t('prayerWall.time2'), count: 47 }, { text: t('prayerWall.prayer3'), time: t('prayerWall.time3'), count: 89, type: 'celebration' }, ].map((prayer, index) => ( {prayer.text} {prayer.time} ))} {/* Features Section */} {t('features.title')} {t('features.subtitle')} {features.map((feature, index) => ( { if (feature.path === '/__open-chat__') { window.dispatchEvent(new CustomEvent('floating-chat:open', { detail: { fullscreen: true } })) } else { router.push(`/${locale}${feature.path}`) } }} > {feature.icon} {feature.title} {feature.description} ))} {/* Testimonials Section */} {t('testimonials.title')} {t('testimonials.subtitle')} {[ { name: t('testimonials.testimonial1.name'), role: t('testimonials.testimonial1.role'), text: t('testimonials.testimonial1.text'), avatar: '👩' }, { name: t('testimonials.testimonial2.name'), role: t('testimonials.testimonial2.role'), text: t('testimonials.testimonial2.text'), avatar: '👨‍💼' }, { name: t('testimonials.testimonial3.name'), role: t('testimonials.testimonial3.role'), text: t('testimonials.testimonial3.text'), avatar: '👨' }, { name: t('testimonials.testimonial4.name'), role: t('testimonials.testimonial4.role'), text: t('testimonials.testimonial4.text'), avatar: '👩‍🏫' }, ].map((testimonial, index) => ( "{testimonial.text}" {testimonial.avatar} {testimonial.name} {testimonial.role} ))} {/* FAQ Section */} {t('faq.title')} {[ { id: 'accurate', question: t('faq.questions.accurate'), answer: t('faq.answers.accurate') }, { id: 'free', question: t('faq.questions.free'), answer: t('faq.answers.free') }, { id: 'languages', question: t('faq.questions.languages'), answer: t('faq.answers.languages') }, { id: 'offline', question: t('faq.questions.offline'), answer: t('faq.answers.offline') }, { id: 'privacy', question: t('faq.questions.privacy'), answer: t('faq.answers.privacy') }, { id: 'versions', question: t('faq.questions.versions'), answer: t('faq.answers.versions') }, ].map((faq) => ( setExpandedFaq(isExpanded ? faq.id : false)} sx={{ mb: 1 }} > }> {faq.question} {faq.answer} ))} {/* Stats Section */} 66 {t('stats.books')} 31,000+ {t('stats.verses')} 24/7 {t('stats.aiAvailable')} {/* Newsletter CTA Section */} {t('newsletter.title')} {t('newsletter.description')} setEmail(e.target.value)} sx={{ flex: 1, minWidth: 250 }} /> {/* Enhanced Footer */} {/* Brand */} {t('footer.brand')} {tSeo('footer')} {/* Quick Links */} {t('footer.quickLinks.title')} {/* Legal */} {t('footer.legal.title')} {/* Social */} {t('footer.social.title')} © {getCurrentYear()} {locale === 'ro' ? 'Ghid Biblic - Făcut cu ❤️ și 🙏' : 'Biblical Guide - Made with ❤️ and 🙏'} ) }