"use client"; import { motion, AnimatePresence } from "framer-motion"; import { useState, useEffect } from "react"; import type { DemoData } from "@/data/demos"; const fadeUp = { hidden: { opacity: 0, y: 35 }, show: { opacity: 1, y: 0, transition: { duration: 0.75, ease: [0.25, 0.46, 0.45, 0.94] as [number, number, number, number] } }, }; const stagger = { hidden: {}, show: { transition: { staggerChildren: 0.1 } }, }; const translations = { tr: { navMembership: "Üyelik Programı", navServices: "Hizmetlerimiz", navWorks: "Portföyümüz", navReviews: "Hasta Hikayeleri", navBooking: "Randevu Al", badge: "SEAMLESS DENTAL CLINIC", heroTitlePart1: "Kusursuz", heroTitlePart2: "Ağız ve Diş Sağlığı", heroTitlePart3: "Deneyimi", heroDesc: "Sağlıklı ve özgüvenli bir gülümseme için pürüzsüz ve stressiz bir diş hekimliği deneyimi. Odentries modern klinik koordinatları ile dijital sağlık lüksünü yaşayın.", bookNow: "Randevu Al", contactUs: "İletişim", statTitle1: "Özel Üye Tasarrufu", statDesc1: "Ağız Muayeneleri, Temizlik ve Röntgen dahil olmak üzere Diş Prosedürlerinde %60 - %80 arasında tasarruf sağlayın.", statTitle2: "Gelişmiş Üye Avantajları", statDesc2: "Kozmetik, Restoratif ve Uzmanlık Diş Tedavileri dahil olmak üzere Diğer Tüm Diş Hizmetlerinde %40 Tasarruf Sağlayın.", membershipHeader: "Aileniz İçin Erişilebilir Diş Hekimliği", membershipDesc: "Sevdikleriniz için en iyi diş sağlığı planlarını keşfedin. Muayene, temizlik ve özel estetik tedavilerde benzersiz fiyat avantajlarından yararlanın.", joinedText: "Bu ay 1.200'den fazla üye katıldı", joinBtn: "Üye Olun", servicesHeader: "Ayrıcalıklı Klinik Hizmetleri", worksHeader: "Sağlıklı Gülüşler Burada Başlar", worksDesc: "Daha parlak, daha sağlıklı bir gülümseme ve kalıcı özgüven için uzman diş bakımı ve profesyonel temizlik uygulamaları.", reviewsHeader: "Hasta Görüşleri", bookingHeader: "Online Randevu Oluşturun", bookingDesc: "Hayalinizdeki sağlıklı gülüşe kavuşmak için formu doldurun, sizi arayalım.", fieldsName: "Ad Soyad", fieldsPhone: "Telefon Numarası", fieldsEmail: "E-Posta Adresi", fieldsService: "Hizmet Türü", fieldsDate: "Tercih Edilen Tarih", fieldsNotes: "Şikayetiniz / Notunuz", fieldsNotesPlaceholder: "Belirtmek istediğiniz özel detaylar...", dispatchForm: "RANDEVU TALEP ET", footerDesc: "Ferah ve hijyenik modern klinik ortamında, ağrısız ve en son teknoloji tedavi yöntemleri ile size özel ağız sağlığı çözümleri.", privacyRegs: "Gizlilik Sözleşmesi", termsStay: "Kullanım Şartları", dismiss: "KAPAT", contactTitle: "Hızlı İletişim", contactDesc: "İletişim bilgilerinizi bırakın, en kısa sürede sizi arayalım.", submit: "Gönder", viewAllWorks: "PORTFÖYÜ KEŞFET • PORTFÖYÜ KEŞFET • ", preventTitle: "Diş Çürüklerini Önleme", preventDesc: "Kapsamlı diş muayeneleri ve koruyucu hekimlik uygulamaları ile dişlerinizi koruyoruz.", sparkleTitle: "Işıldayan Temizlik", sparkleDesc: "Profesyonel temizleme ve beyazlatma teknikleriyle parıldayan sağlıklı gülüşler yaratıyoruz.", detectionTitle: "Erken Teşhis İmkanı", detectionDesc: "İleri teknoloji röntgen ve teşhis araçlarıyla sorunları büyümeden yakalıyoruz.", }, en: { navMembership: "Membership Plan", navServices: "Our Services", navWorks: "Our Works", navReviews: "Patient Stories", navBooking: "Book Now", badge: "SEAMLESS DENTAL CLINIC", heroTitlePart1: "Seamless", heroTitlePart2: "Dental Care", heroTitlePart3: "Experience", heroDesc: "A smooth and hassle-free dental care experience for a healthy and confident smile. Indulge in digital health luxury structured by Odentries clinic.", bookNow: "Book Now", contactUs: "Contact", statTitle1: "Exclusive Member Savings", statDesc1: "Save 60% - 80% on Dental Procedures, including Oral Exams, Cleanings, and X-Rays.", statTitle2: "Enhanced Member Benefits", statDesc2: "Save 40% on All Other Dental Services, including Cosmetic, Restorative, and Specialty Dental Procedures.", membershipHeader: "Affordable Dental Care for Your Family", membershipDesc: "Unlock optimal dental wellness for your loved ones. Get massive savings on check-ups, cleaning, and specialized cosmetic treatments.", joinedText: "Joined by 1,200+ members this month", joinBtn: "Join Membership", servicesHeader: "Exclusive Clinic Services", worksHeader: "A Healthy Smile Starts Here", worksDesc: "Expert Dental Care and Cleaning Procedures for a Brighter, Healthier Smile and Lasting Confidence.", reviewsHeader: "Patient Testimonials", bookingHeader: "Online Appointment", bookingDesc: "Fill out the appointment details to secure your priority consultation slot with our experts.", fieldsName: "Full Name", fieldsPhone: "Phone Number", fieldsEmail: "Email Address", fieldsService: "Service Category", fieldsDate: "Preferred Date", fieldsNotes: "Notes / Symptoms", fieldsNotesPlaceholder: "Any specific dental notes or requests...", dispatchForm: "REQUEST APPOINTMENT", footerDesc: "Custom dental care solutions designed in an ultra-clean, welcoming clinic layout using advanced high-tech treatment instruments.", privacyRegs: "Privacy Policy", termsStay: "Terms of Service", dismiss: "DISMISS", contactTitle: "Quick Consultation", contactDesc: "Leave your contact details and our medical coordinator will call you back within 15 minutes.", submit: "Submit", viewAllWorks: "VIEW ALL WORKS • VIEW ALL WORKS • ", preventTitle: "Prevent Cavities & Disease", preventDesc: "State-of-the-art checkups and preventative dentistry to protect your raw teeth structure.", sparkleTitle: "Keep Your Teeth Sparkling Clean", sparkleDesc: "Professional scale cleaning and premium laser whitening for an immediate aesthetic update.", detectionTitle: "Early Detection of Dental Issues", detectionDesc: "Advanced high-resolution diagnostic tools to intercept hidden micro-cavities before they expand.", } }; export default function DentalTemplate({ data }: { data: DemoData }) { const { firma, istatistikler = [], hizmetler = [], projeler = [], yorumlar = [] } = data; const [showBookingModal, setShowBookingModal] = useState(false); const [activeYorum, setActiveYorum] = useState(0); const [lang, setLang] = useState<"tr" | "en">("tr"); const [preloader, setPreloader] = useState(true); const t = translations[lang]; // Lenis Smooth Scroll Integration useEffect(() => { let lenis: any; import("@studio-freight/lenis").then(({ default: Lenis }) => { lenis = new Lenis({ duration: 1.2, easing: (x: number) => Math.min(1, 1.001 - Math.pow(2, -10 * x)) }); function raf(time: number) { lenis.raf(time); requestAnimationFrame(raf); } requestAnimationFrame(raf); }); return () => lenis?.destroy(); }, []); // Preloader Curtain Timer useEffect(() => { const timer = setTimeout(() => { setPreloader(false); }, 1500); return () => clearTimeout(timer); }, []); // Map service icons without generic emojis const getServiceIconSvg = (ikon: string) => { switch (ikon) { case "🦷": return ( ); case "✨": return ( ); default: return ( ); } }; const getLocalizedServiceText = (baslik: string) => { if (baslik.includes("Prevent")) return { title: t.preventTitle, desc: t.preventDesc }; if (baslik.includes("Sparkling")) return { title: t.sparkleTitle, desc: t.sparkleDesc }; return { title: t.detectionTitle, desc: t.detectionDesc }; }; const css = ` @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700;800;900&family=Sora:wght@300;400;500;600;700;800&display=swap'); :root { --bg-ivory: #FAF7F2; --bg-mint: #EBF5F0; --text-slate: #1E2E38; --text-dark: #121C22; --color-gold: #D4AF37; } .font-elegant { font-family: 'Sora', sans-serif; } .font-sans-clean { font-family: 'DM Sans', sans-serif; } .spinning-text { animation: spin 24s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .hero-title-clamp { font-size: clamp(38px, 6vw, 85px); letter-spacing: -0.02em; line-height: 0.95; } `; return ( <> {/* ── IMZA AN: CURTAIN REVEAL PRELOADER ── */} {preloader && (
ODENTRIES CLINIC
interactive prototype
)}
{/* Floating cross graphics (+) from reference design */}
+
+
+
+
+
{/* ── FLOATING CONCEPT BANNER ── */}
{lang === "tr" ? "Bu web sitesi Ayris Tech tarafından hazırlanmış bir konsept çalışmasıdır." : "This website is a premium concept prototype designed by Ayris Tech."}
{/* ── PREMIUM HEADER ── */}
{/* Logo */} {firma.adi} {/* Links */} {/* Language Selector + Action Button */}
{/* Language Switcher */}
setShowBookingModal(true)} className="text-[10px] font-black tracking-[2.5px] uppercase text-[#FAF7F2] bg-[#1E2E38] hover:bg-[#121C22] px-6 py-3.5 rounded-xl transition-all cursor-pointer shadow-[0_4px_12px_rgba(30,46,56,0.15)] hidden sm:block" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.bookNow}
{/* ── HERO SECTION ── */}
{/* Left Col - Text Content */} {t.badge} {t.heroTitlePart1}
{t.heroTitlePart2}
{t.heroTitlePart3}
{t.heroDesc} setShowBookingModal(true)} className="inline-flex items-center gap-3 px-8 py-4.5 rounded-xl bg-[#1E2E38] hover:bg-[#121C22] text-[#FAF7F2] font-black text-[10px] tracking-[2px] uppercase transition-all shadow-[0_5px_15px_rgba(30,46,56,0.1)] cursor-pointer" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.bookNow}
{/* Right Col - Cropped Smiling Portrait Overlay */}
{/* Background soft lighting */}
{/* Main Generated High-Fidelity Smiling Image */} {/* eslint-disable-next-line @next/next/no-img-element */} Odentries Smiling Model
{/* ── SECTION 001: AFFORDABLE CARE & BENTO CARDS ── */}
{/* Left Content */} 001 - Join Membership {t.membershipHeader} {t.membershipDesc} {/* Patient Pile from Reference Design */}
{["👨‍⚕️", "👩‍⚕️", "🧑‍⚕️", "✨"].map((emoji, i) => (
{emoji}
))}
+
{t.joinedText}
setShowBookingModal(true)} className="px-8 py-4 rounded-xl bg-[#1E2E38] hover:bg-[#121C22] text-[#FAF7F2] font-black text-[10px] tracking-[2.5px] uppercase transition-colors" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.joinBtn}
{/* Right Bento Cards */}
{/* Card 1: 80% Savings */}
{istatistikler[0]?.deger || "80%"} +

{t.statTitle1}

{t.statDesc1}

{/* Card 2: 40% Benefits */}
{istatistikler[1]?.deger || "40%"} +

{t.statTitle2}

{t.statDesc2}

{/* ── CORE SERVICES CARD ROW ── */}
{t.navServices}

{t.servicesHeader}

{hizmetler.map((h, i) => { const item = getLocalizedServiceText(h.baslik); return (
{getServiceIconSvg(h.ikon)}

{item.title}

{item.desc}

); })}
{/* ── SECTION 002: OUR WORKS / PORTFOLIO ── */}
{/* Header */}
002 - Our Works {t.worksHeader} {/* Spinning Circle badge and text details */} {/* Spinning Badge */}
{t.viewAllWorks}

{t.worksDesc}

{/* 3 Column Image Cards Grid */}
{projeler.map((p, i) => (
{/* Photo container */}
{/* eslint-disable-next-line @next/next/no-img-element */} {p.baslik}
{/* Text details */}

{p.baslik}

{lang === "tr" ? "Estetik ve Dayanıklı Sonuçlar" : "Impressive, high-durability smile aesthetics"}

))}
{/* ── YORUMLAR (TESTIMONIALS) ── */}
003 - Patient Stories

{t.reviewsHeader}

{[...Array(yorumlar[activeYorum]?.puan || 5)].map((_, i) => ( ))}

“{yorumlar[activeYorum]?.yorum}”

{yorumlar[activeYorum]?.yazar.charAt(0)}

{yorumlar[activeYorum]?.yazar}

{yorumlar[activeYorum]?.tarih}

{yorumlar.map((_, i) => (
{/* ── RANDEVU AL (APPOINTMENT SECTION) ── */}
004 - Online Appointment

{t.bookingHeader}

{t.bookingDesc}

{[ { label: t.fieldsName, placeholder: lang === "tr" ? "Adınız Soyadınız" : "Your Full Name", type: "text", full: false }, { label: t.fieldsPhone, placeholder: "05xx xxx xx xx", type: "tel", full: false }, { label: t.fieldsEmail, placeholder: "ornek@mail.com", type: "email", full: false }, { label: t.fieldsService, placeholder: "", type: "select", full: false }, { label: t.fieldsDate, placeholder: "", type: "date", full: false }, { label: t.fieldsNotes, placeholder: t.fieldsNotesPlaceholder, type: "text", full: true }, ].map((field, i) => (
{field.type === "select" ? ( ) : ( )}
))}
setShowBookingModal(true)} className="mt-8 w-full py-4.5 rounded-xl text-[#FAF7F2] font-black text-xs bg-[#1E2E38] hover:bg-[#121C22] uppercase tracking-widest cursor-pointer shadow-[0_5px_15px_rgba(30,46,56,0.15)]" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > 📅 {t.dispatchForm}
{/* ── FOOTER ── */}
{firma.adi}

{t.footerDesc}

📍 {firma.adres}

📞 {firma.telefon}

{t.navServices}

{hizmetler.map((h, i) => { const s = getLocalizedServiceText(h.baslik); return ( {s.title} ); })}

Odentries

{[t.navMembership, t.navServices, t.navWorks, t.navReviews].map((item) => ( {item} ))}

© 2026 {firma.adi}. All rights reserved.

{/* ── BOOKING MODAL ── */} {showBookingModal && (

{t.contactTitle}

{t.contactDesc}

setShowBookingModal(false)} > {t.submit}
)}
); }