"use client"; import { motion, AnimatePresence } from "framer-motion"; import { useRef, 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: { navBook: "Rezervasyon", navTariffs: "Tarifeler", navBenefits: "Ayrıcalıklar", navApp: "Mobil Uygulama", navReviews: "Misafir Yorumları", callCenter: "Çağrı Merkezi", bookNow: "Rezervasyon Yap", badge: "NYC GÜVENİLİR PRİVATE CAB AĞI", heroTitlePart1: "NYC'DE LÜKS", heroTitlePart2: "BİR SEYAHAT?", heroTitlePart3: "ÖZEL ŞOFÖRLÜ HAVAALANI TRANSFER SERVİSİ", heroDesc: "New York genelinde 7/24 güvenli, yüksek konforlu özel araç hizmetleri. Havalimanı lounge transferlerinizi anında hesaplayın ve stressiz planlayın.", instantBooking: "Hızlı Telefon Hattı", getQuote: "Seyahat Hesapla", viewTariffs: "Tarifeleri İncele", fastFormSubtitle: "Hızlı Seyahat Formu", fastFormTitle: "MİL HESAPLA & AYIRT", fastFormDesc: "Konum parametrelerinizi girerek seyahat tutarınızı anında hesaplayın ve rezervasyon oluşturun.", formName: "Ad Soyad", formNamePlaceholder: "Adınız Soyadınız", formPhone: "Telefon Numarası", formPhonePlaceholder: "İletişim Numaranız", formDate: "Tarih", formTime: "Saat", formPickup: "Alış Noktası", formDropoff: "Varış Noktası", chooseVehicle: "Araç Sınıfı Seçimi", submitBooking: "REZERVASYONU BAŞLAT", dispatchWarning: "Bu formu gönderdiğinizde, sürücümüz sizinle 3 dakika içinde iletişime geçecektir.", tariffsSubtitle: "Esnek Fiyatlar", tariffsTitle: "TARİFELERİMİZ", tariffsDesc: "Seyahatlerinize en uygun lüks araç segmentini ve ücretlendirmelerini keşfedin.", popular: "EN ÇOK TERCİH EDİLEN", perMile: "/ MİL", bookTariff: "BU TARİFEYİ SEÇ", benefitsSubtitle: "Özel Ayrıcalıklar", benefitsTitle: "HİZMET KALİTEMİZ", benefitsDesc: "New York'taki iş dünyasının ve seçkin yolcuların bizi tercih etmesinin nedenleri.", appSubtitle: "Uygulamayı İndirin", appTitle: "MOBİL CAB UYGULAMASI", appDesc: "CabHub mobil uygulamasını telefonunuza indirin. 7/24 GPS takibi yapın, uçuş rötar senkronizasyonu ile en özel fiyatlardan faydalanın.", getItOn: "HEMEN İNDİRİN", googlePlay: "Google Play Store", appStore: "App Store", reviewsSubtitle: "Müşteri Deneyimleri", reviewsTitle: "MUTLU YOLCULARIMIZ", reviewsDesc: "Sık seyahat eden iş insanlarımızın CabHub özel şoför hizmeti hakkındaki yorumları.", callStripText: "7 GÜN 24 SAAT ÇAĞRILARINIZI CEVAPLAMAYA HAZIRIZ!", footerRights: "Tüm hakları saklıdır.", footerPrivacy: "Gizlilik Politikası", footerTerms: "Kullanım Şartları", bookingRequested: "REZERVASYON ALINDI", nycDispatchActive: "NYC Sürücü Atama Hattı Aktif", successDesc: "Seyahat parametrelerinizi kaydettik. En yakın CabHub lüks aracı ve sürücüsü 3 dakika içinde sizinle iletişime geçecektir. Keyifli yolculuklar dileriz!", dismiss: "KAPAT", conceptBanner: "Bu web sitesi Ayris Tech tarafından hazırlanmış bir konsept çalışmasıdır.", calcEstimated: "Tahmini Tutar:", calcLoading: "Hesaplanıyor...", min: "dk", calculatingText: "Mesafe bazlı anlık ücretlendirme" }, en: { navBook: "Book Cab", navTariffs: "Tariffs", navBenefits: "Why Us", navApp: "Mobile App", navReviews: "Reviews", callCenter: "Call Center", bookNow: "Book Now", badge: "NYC TRUSTED PRIVATE CAB NETWORK", heroTitlePart1: "NEED A", heroTitlePart2: "PREMIUM RIDE?", heroTitlePart3: "NYC'S PREMIER PRIVATE TRANSFERS", heroDesc: "Safe, high-fidelity premium luxury rides available 24/7 across New York City. Book instantly from our modern standard line or download our custom voucher app for secure rides.", instantBooking: "Instant Booking Line", getQuote: "Calculate Fare", viewTariffs: "View Tariffs", fastFormSubtitle: "Fast Ride Form", fastFormTitle: "BOOK A CAB", fastFormDesc: "Fill in your destination parameters below to calculate estimated fares and allocate a nearby premium cab.", formName: "Name", formNamePlaceholder: "Your full name", formPhone: "Phone", formPhonePlaceholder: "Contact Number", formDate: "Date", formTime: "Time", formPickup: "Start Location", formDropoff: "End Destination", chooseVehicle: "Choose Vehicle", submitBooking: "SUBMIT BOOKING", dispatchWarning: "By submitting this form, you trigger immediate dispatch. A professional verified driver will contact you in under 3 minutes.", tariffsSubtitle: "Flexible Rates", tariffsTitle: "OUR TARIFFS", tariffsDesc: "Choose the perfect ride category structured to fit your travel coordinates.", popular: "POPULAR CHOICE", perMile: "/ MILE", bookTariff: "BOOK TARIFF", benefitsSubtitle: "Premium Values", benefitsTitle: "SOME BENEFITS", benefitsDesc: "Why thousands of New Yorkers and high-profile businesses trust our private network.", appSubtitle: "Download App", appTitle: "BEST CAB SERVICES", appDesc: "Download the CabHub voucher application on your phone. Book local transfers, coordinate with drivers using real-time GPS search, and access exclusive 40% member benefits dynamically.", getItOn: "GET IT ON", googlePlay: "Google Play", appStore: "App Store", reviewsSubtitle: "Testimonials", reviewsTitle: "HAPPY CLIENTS", reviewsDesc: "Hear what frequent business travelers say about the CabHub ride coordination.", callStripText: "WE ARE READY TO TAKE YOUR CALL 24 HOURS, 7 DAYS!", footerRights: "All rights reserved.", footerPrivacy: "Privacy Policy", footerTerms: "Terms of Service", bookingRequested: "BOOKING REQUESTED", nycDispatchActive: "NYC Dispatch Line Active", successDesc: "We have registered your travel parameters. A professional verified CabHub chauffeur will reach out on your contact number in under 3 minutes. Thank you!", dismiss: "DISMISS", conceptBanner: "This website is a premium concept prototype designed by Ayris Tech.", calcEstimated: "Estimated Fare:", calcLoading: "Calculating...", min: "min", calculatingText: "Real-time coordinate-based pricing" } }; const locationsList = [ "Manhattan Midtown", "Brooklyn Heights", "Queens Astoria", "JFK Airport", "LaGuardia Airport" ]; export default function TaxiTemplate({ data }: { data: DemoData }) { const { firma, istatistikler = [], hizmetler = [], yorumlar = [] } = data; const [showBookingModal, setShowBookingModal] = useState(false); const [activePlan, setActivePlan] = useState(1); // Standard Class active by default const [lang, setLang] = useState<"tr" | "en">("tr"); const [preloader, setPreloader] = useState(true); // Fare Calculator states const [pickupLoc, setPickupLoc] = useState("Manhattan Midtown"); const [dropoffLoc, setDropoffLoc] = useState("Brooklyn Heights"); const t = translations[lang]; const getIconSvg = (type: string) => { switch (type) { case "pickup": return ( ); case "booking": return ( ); case "bonus": return ( ); case "gps": return ( ); default: return ( ); } }; // 1. Lenis Smooth Scroll Setup useEffect(() => { let lenis: any; import("@studio-freight/lenis").then(({ default: Lenis }) => { lenis = new Lenis({ duration: 1.2, easing: (t: number) => Math.min(1, 1.001 - Math.pow(2, -10 * t)) }); function raf(time: number) { lenis.raf(time); requestAnimationFrame(raf); } requestAnimationFrame(raf); }); return () => lenis?.destroy(); }, []); // 2. Preloader timer useEffect(() => { const timer = setTimeout(() => { setPreloader(false); }, 1500); return () => clearTimeout(timer); }, []); // Price estimate logic const calculatePrice = () => { if (pickupLoc === dropoffLoc) return "$5.00"; // JFK flat rates if ((pickupLoc === "Manhattan Midtown" && dropoffLoc === "JFK Airport") || (pickupLoc === "JFK Airport" && dropoffLoc === "Manhattan Midtown")) { return activePlan === 0 ? "$55.00" : activePlan === 1 ? "$75.00" : "$110.00"; } // LaGuardia flat rates if ((pickupLoc === "Manhattan Midtown" && dropoffLoc === "LaGuardia Airport") || (pickupLoc === "LaGuardia Airport" && dropoffLoc === "Manhattan Midtown")) { return activePlan === 0 ? "$35.00" : activePlan === 1 ? "$48.00" : "$75.00"; } // Mileage estimations based on distance let miles = 8; if ((pickupLoc === "Manhattan Midtown" && dropoffLoc === "Brooklyn Heights") || (pickupLoc === "Brooklyn Heights" && dropoffLoc === "Manhattan Midtown")) miles = 6; else if ((pickupLoc === "Manhattan Midtown" && dropoffLoc === "Queens Astoria") || (pickupLoc === "Queens Astoria" && dropoffLoc === "Manhattan Midtown")) miles = 7; else if ((pickupLoc === "Brooklyn Heights" && dropoffLoc === "Queens Astoria") || (pickupLoc === "Queens Astoria" && dropoffLoc === "Brooklyn Heights")) miles = 10; else if ((pickupLoc === "Brooklyn Heights" && dropoffLoc === "JFK Airport") || (pickupLoc === "JFK Airport" && dropoffLoc === "Brooklyn Heights")) miles = 16; else if ((pickupLoc === "Brooklyn Heights" && dropoffLoc === "LaGuardia Airport") || (pickupLoc === "LaGuardia Airport" && dropoffLoc === "Brooklyn Heights")) miles = 14; else if ((pickupLoc === "Queens Astoria" && dropoffLoc === "JFK Airport") || (pickupLoc === "JFK Airport" && dropoffLoc === "Queens Astoria")) miles = 12; else if ((pickupLoc === "Queens Astoria" && dropoffLoc === "LaGuardia Airport") || (pickupLoc === "LaGuardia Airport" && dropoffLoc === "Queens Astoria")) miles = 6; else if ((pickupLoc === "JFK Airport" && dropoffLoc === "LaGuardia Airport") || (pickupLoc === "LaGuardia Airport" && dropoffLoc === "JFK Airport")) miles = 12; const basePrice = miles * 1.6 + 5.0; const multiplier = activePlan === 0 ? 1.0 : activePlan === 1 ? 1.5 : 2.2; return `$${(basePrice * multiplier).toFixed(2)}`; }; // Dynamic Localization handlers const getLocalizedStat = (deger: string) => { if (deger.toLowerCase().includes("economy")) { return { title: lang === "tr" ? "Ekonomi Sınıfı" : "Economy Class", desc: lang === "tr" ? "Şehir içi seyahatleriniz için ideal, konforlu ve ekonomik ulaşım. Mil başı $1.50." : "Optimal zero-emission trips to any destination within boroughs. $1.5/MI" }; } if (deger.toLowerCase().includes("standard")) { return { title: lang === "tr" ? "Standart Sınıf" : "Standard Class", desc: lang === "tr" ? "Havaalanı ve eyaletler arası transferler için premium sedanlar. Mil başı $2.25." : "Premium transfers. Verified luxury sedans covering tri-state airport hubs. $2.25/MI" }; } return { title: lang === "tr" ? "Business Sınıfı" : "Business Class", desc: lang === "tr" ? "Lüks araç filomuz ve öncelikli sürücü atama ayrıcalığı. Mil başı $3.50." : "First class executive. Top-tier luxury vehicles with priority lane dispatch. $3.50/MI" }; }; const getLocalizedService = (baslik: string, aciklama: string) => { if (baslik.toLowerCase().includes("pickup") || baslik.toLowerCase().includes("home")) { return { title: lang === "tr" ? "ADRESTEN ALIM" : "HOME PICKUP", desc: lang === "tr" ? "Kapınızdan veya otel lobinizden bagaj desteği ve koordinatlı karşılama ile lüks seyahat başlangıcı." : "We run services to serve you more better and to your convenience." }; } if (baslik.toLowerCase().includes("booking") || baslik.toLowerCase().includes("fast")) { return { title: lang === "tr" ? "KOLAY REZERVASYON" : "FAST BOOKING", desc: lang === "tr" ? "Sadece birkaç tıkla seyahat parametrelerinizi belirleyin, stressiz rezervasyon yapın." : "Our book method is very fast and easy. It won't stress you." }; } if (baslik.toLowerCase().includes("bonus") || baslik.toLowerCase().includes("member")) { return { title: lang === "tr" ? "MİL & ÜYELİK AVANTAJLARI" : "BONUSES FOR RIDE", desc: lang === "tr" ? "Bizimle yaptığınız her yolculukta mil puanları toplayın, sonraki rezervasyonlarda %40'a varan indirim kazanın." : "When you run services frequently we give you different bonuses that can put a smile on your face." }; } return { title: lang === "tr" ? "7/24 AKTİF GPS TAKİBİ" : "GPS SEARCHING", desc: lang === "tr" ? "Uçuş rötar senkronizasyonu ve 7/24 anlık uydu üzerinden konum takibi ile mutlak güvendesiniz." : "We run services incase you aren't sure of your destination. So you don't have to worry." }; }; const getLocalizedTestimonial = (yazar: string) => { if (yazar.toLowerCase().includes("john")) { return lang === "tr" ? "CabHub NYC iş seyahatlerimde en güvendiğim ulaşım ortağım oldu. Standart sınıf araçları pırıl pırıldı ve sürücü tüm kestirmeleri biliyordu." : "CabHub NYC provided the most reliable ride during my business trip. The standard class vehicle was pristine and the driver knew all the shortcuts."; } return lang === "tr" ? "Hızlı rezervasyon sistemi tek kelimeyle kusursuz çalışıyor. Adresten alım tam dakikasında gerçekleşti ve GPS takibi kendimi inanılmaz güvende hissettirdi." : "The fast booking system works like a charm. Home pickup was exactly on time and the GPS tracking made me feel incredibly secure."; }; const css = ` @import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Syne:wght@700;800&display=swap'); :root { --color-taxi-yellow: #F5C518; --color-taxi-yellow-rgb: 245, 197, 24; --color-coal-dark: #07080A; --color-coal-card: #121418; --color-coal-card-hover: #181C22; --color-text-white: #FFFFFF; --color-text-gray: rgba(255, 255, 255, 0.6); } .font-industrial { font-family: 'Syne', 'Oswald', sans-serif; } .font-sans-premium { font-family: 'Plus Jakarta Sans', sans-serif; } .spinning-badge { animation: spin 25s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .bg-mesh-grid { background-image: linear-gradient(rgba(245, 197, 24, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(245, 197, 24, 0.03) 1px, transparent 1px); background-size: 40px 40px; } .glowing-bar { box-shadow: 0 0 15px rgba(245, 197, 24, 0.4); } .pulse-glow { animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 197, 24, 0.5); } 70% { box-shadow: 0 0 0 15px rgba(245, 197, 24, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 197, 24, 0); } } .hero-title-clamp { font-size: clamp(34px, 5.8vw, 84px); letter-spacing: -0.01em; line-height: 0.95; } `; return ( <> {/* ── IMZA AN: HIGH-TECH PRELOADER ── */} {preloader && (
CABHUB DISPATCH SYSTEM
connecting...
)}
{/* ── MANDATORY FLOATING DEMO BANNER ── */}
{t.conceptBanner}
{/* ── MAIN CONTENT CONTAINER (Sleek Obsidian Theme) ── */}
{/* Decorative Mesh Background */}
{/* Floating Ambient Yellow Glow Orbs */}
{/* ── FLOATING NAVBAR ── */}
{/* Logo */}
CABHUB
{/* Navigation Links */} {/* Quick Contact & Action */}
{/* Language Switcher */}
setShowBookingModal(true)} className="text-[11px] font-black tracking-[2px] uppercase text-black bg-[#F5C518] hover:bg-white px-6 py-3.5 rounded-xl transition-all cursor-pointer shadow-[0_5px_15px_rgba(245,197,24,0.2)] hidden sm:block" whileHover={{ scale: 1.03 }} whileTap={{ scale: 0.98 }} > {t.bookNow}
{/* ── HERO & BOOKING SECTION ── */}
{/* Left Column: Heading and Badge */} {/* Yellow Accent Badge */} {t.badge} {t.heroTitlePart1}
{t.heroTitlePart2}
{t.heroDesc} {/* Call Booking Center */}
{t.instantBooking}
{firma.telefon}
{/* CTA Buttons */} {t.getQuote} {t.viewTariffs}
{/* Right Column: Hero Car & Parallax Plate */}
{/* Outer circle overlay */}
{/* High fidelity Yellow cab image */} {/* eslint-disable-next-line @next/next/no-img-element */} CabHub Yellow Sedan Premium NYC Cab {/* Floating badge rotating around */}
BOOK A RIDE • PREMIUM CAR SERVICE • 24/7 •
{/* ── INTERACTIVE TARIFF CALCULATOR WIDGET ── */}
{/* Glow border header indicator */}
{t.fastFormSubtitle}

{t.fastFormTitle}

{t.fastFormDesc}

{/* Form Grid */}
{[ { label: t.formName, placeholder: t.formNamePlaceholder, type: "text" }, { label: t.formPhone, placeholder: t.formPhonePlaceholder, type: "tel" }, { label: t.formDate, placeholder: "", type: "date" }, { label: t.formTime, placeholder: "", type: "time" }, ].map((field, idx) => (
))} {/* Interactive Pickup Location */}
{/* Interactive Dropoff Location */}
{/* Choose Vehicle */}
{["Economy", "Standard", "Business"].map((option, oIdx) => ( ))}
{/* ESTIMATED FARE BANNER */}
$
{t.calculatingText} {t.calcEstimated} {calculatePrice()}
Flat-rate airport vouchers apply dynamically between JFK / LaGuardia and Manhattan.
{/* Submit Action */}

{t.dispatchWarning}

setShowBookingModal(true)} className="w-full md:w-auto px-10 py-4.5 rounded-xl bg-[#F5C518] hover:bg-white text-black font-black text-xs uppercase tracking-widest transition-all cursor-pointer shadow-[0_5px_15px_rgba(245,197,24,0.3)] shrink-0" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.submitBooking}
{/* ── OUR TARIFFS (Subscription Cards) ── */}
{t.tariffsSubtitle}

{t.tariffsTitle}

{t.tariffsDesc}

{/* Three Tariff Cards Grid */}
{istatistikler.map((stat, sIdx) => { const locStat = getLocalizedStat(stat.deger); const isPopular = stat.deger === "Standard Class"; return ( {isPopular && (
{t.popular}
)}
{/* Car vector silhouette placeholder */}

{locStat.title}

{locStat.desc}

{/* Price Display */}
{sIdx === 0 ? "$1.50" : sIdx === 1 ? "$2.20" : "$3.50"} {t.perMile}
{ setActivePlan(sIdx); const el = document.getElementById("booking-flow"); el?.scrollIntoView({ behavior: "smooth" }); }} className={`w-full py-4.5 rounded-xl font-black text-xs uppercase tracking-widest transition-all cursor-pointer ${ isPopular ? "bg-[#F5C518] hover:bg-white text-black shadow-lg" : "bg-[#0B0C0E] hover:bg-white/5 text-white/70 border border-white/5 hover:border-white/10" }`} whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.bookTariff}
); })}
{/* ── OUR BENEFITS ── */}
{t.benefitsSubtitle}

{t.benefitsTitle}

{t.benefitsDesc}

{/* Grid display of benefits */}
{hizmetler.map((benefit, bIdx) => { const locBenefit = getLocalizedService(benefit.baslik, benefit.aciklama); return (
{getIconSvg(benefit.ikon)}

{locBenefit.title}

{locBenefit.desc}

); })}
{/* ── APP DOWNLOAD SHOWCASE ── */}
{/* Left Column: Heading and action badges */} {t.appSubtitle} {t.appTitle} {t.appDesc} {/* Badges buttons */} {/* Google Play */}
{t.getItOn}
{t.googlePlay}
{/* App Store */}
{t.getItOn}
{t.appStore}
{/* Right Column: Hand holding smartphone flatlay mockup */}
{/* eslint-disable-next-line @next/next/no-img-element */} CabHub Booking Digital Phone Interface Map
{/* ── TESTIMONIAL GRID ── */}
{t.reviewsSubtitle}

{t.reviewsTitle}

{t.reviewsDesc}

{/* Testimonials 2-Column Layout */}
{yorumlar.map((y, yIdx) => { const locTestimonial = getLocalizedTestimonial(y.yazar); return ( {/* Rating Stars SVG */}
{[...Array(5)].map((_, starIdx) => ( ))}

“{locTestimonial}”

{y.yazar.charAt(0)}

{y.yazar}

{y.tarih}
); })}
{/* ── BOTTOM CALL RESERVATION DIRECT STRIP ── */}

{t.callStripText}

📞 {firma.telefon}
{/* subtle moving abstract banner lines */}
{/* ── FOOTER ── */} {/* ── FAST BOOKING SUCCESS MODAL ── */} {showBookingModal && ( {/* Close Button */} {/* Visual success indicator */}

{t.bookingRequested}

{t.nycDispatchActive}

{t.successDesc}

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