"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 } }, }; interface ChatMessage { sender: "bot" | "user"; text: string; } const translations = { tr: { navSim: "AI Simülatörü", navInteg: "Entegrasyonlar", navFeatures: "Özellikler", navReviews: "Yorumlar", navPricing: "Planlar", signUp: "Kayıt Ol", badge: "VAATBOT COSMIC AI SAAS", heroTitlePart1: "SİTENİZE", heroTitlePart2: "AI CHATBOT", heroTitlePart3: "EKLEYİN", heroDesc: "Özel yapay zekayı 2 dakikadan kısa sürede sitenize entegre edin. Cybernetic botlarımız veri tabanlarınızdan, dökümanlarınızdan ve web bağlantılarınızdan doğrudan öğrenerek %100 doğru yanıtları garanti eder.", accuracyLabel: "HATA PAYI %0", accuracyText: "Zendesk, Notion ve web sitenizle eğitilerek sıfır halüsinasyon sağlar.", speedLabel: "3x DAHA HIZLI", speedText: "Slack, WhatsApp ve Web widget'larında 600ms altında yanıt süresi.", bounceLabel: "-20% ÇIKMA ORANI", bounceText: "Ziyaretçileri sayfada tutarak abone dönüşümlerini anında ikiye katlar.", getStartedFree: "Ücretsiz Başla", integrations: "Entegrasyonlar", platformsTitle: "Esnek Platformlar", platformsHeader: "ESNEK ENTEGRASYONLAR", platformsDesc: "Kanalları sorunsuz bir şekilde değiştirin. Yapay zeka sohbet robotunuzu tüm platformlara dakikalar içinde kurun.", tabWidget: "Web Chat Widget'ı", tabSlack: "Slack Çalışma Alanı", tabWhatsapp: "WhatsApp Business", scriptTitle: "HTML ENTEGRASYON KODU", scriptDesc: "Tek yapmanız gereken bu hafif script etiketini sitenizin gövdesine eklemektir. Tarayıcı önbelleğini destekler ve sıfır gecikme yükü getirir.", featuresTitle: "Premium Değerler", featuresHeader: "TEMEL ÖZELLİKLER", featuresDesc: "Binlerce SaaS girişimi ve kurumsal destek platformunun VaatBot altyapısını tercih etme nedenleri.", reviewsTitle: "Değerlendirmeler", reviewsHeader: "MUTLU MÜŞTERİLER", reviewsDesc: "Şirket kurucularının ve tasarımcıların otomatik destek sistemlerimiz hakkındaki yorumları.", pricingTitle: "Karşılaştırmalı Planlar", pricingHeader: "FİYATLANDIRMA PLANLARI", pricingDesc: "Ziyaretçiden aboneye dönüşüm akışını hızlandıracak şeffaf fiyatlandırma yapısı.", planFree: "Ücretsiz Paket", planFreeDesc: "Temel bir sohbet robotu eklemek isteyen girişimler için. 5 adede kadar web bağlantısını indeksler.", planGrowth: "Büyüme Paketi", planGrowthDesc: "Ölçeklenen işletmeler ve öncelikli destek için. Notion, Slack entegrasyonu ve özel markalama içerir.", planEnt: "Kurumsal Paket", planEntDesc: "KVKK uyumluluğu, şirket içi veri tabanları ve anlık senkronizasyon gerektiren kurumsal platformlar için.", bestValue: "EN POPÜLER", choosePlan: "PLANI SEÇ", month: "AYLIK", footerDesc: "Notion veri tabanlarını, API belgelerini ve destek makalelerini indeksleyerek 600 milisaniyenin altında doğrulanmış yanıt garantisi sunan derin kozmik AI sohbet asistanı.", privacyRegs: "Gizlilik Sözleşmesi", termsStay: "Kullanım Şartları", dismiss: "KAPAT", startIntegration: "ENTEGRASYONU BAŞLAT", sandboxToken: "Sandbox Anahtarı Oluşturuldu", webLabel: "Web Sitesi Adresi", emailLabel: "İletişim E-Postası", generate: "KODLARI ÜRET", welcomeMsg: "Merhaba! VaatBot AI'a hoş geldiniz. Bugün size nasıl yardımcı olabilirim?", welcomeHelp: "Bana 50+ dil desteğimizi, 600ms altındaki yanıt hızımızı veya %100 doğruluk oranımızı sorabilirsiniz!", botTyping: "Yazıyor...", inputPlaceholder: "Doğruluk, fiyatlar veya diller hakkında sorun...", readyToSupercharge: "DESTEK SİSTEMİNİZİ YAPAY ZEKA İLE GÜÇLENDİRMEYE HAZIR MISINIZ?", startIntegBtn: "ENTEGRASYONU ŞİMDİ BAŞLAT", customizerTitle: "Özel Markalama", customizerDesc: "Renkleri, isimleri, avatarları ve karşılama mesajlarını kurumsal kimliğinize göre tamamen uyarlayın.", languagesTitle: "50+ Dil Desteği", languagesDesc: "İngilizce, İspanyolca, Türkçe ve daha fazlasını kapsayan 50'den fazla dilde müşterilerinizle akıcı konuşun.", widgetsTitle: "Esnek Widget", widgetsDesc: "Temiz kopyala-yapıştır script etiketimizi veya özelleştirilebilir iframe kapsayıcılarımızı saniyeler içinde kurun.", industriesTitle: "Tüm Sektörler", industriesDesc: "E-ticaret, SaaS, Emlak, Sağlık Klinikleri ve Müşteri Destek kanalları için yüksek düzeyde optimize edilmiştir.", }, en: { navSim: "AI Simulator", navInteg: "Integrations", navFeatures: "Core Features", navReviews: "Reviews", navPricing: "Plans", signUp: "Sign Up", badge: "VAATBOT COSMIC AI SAAS", heroTitlePart1: "ADD FREE", heroTitlePart2: "AI CHATBOT", heroTitlePart3: "TO YOUR SITE", heroDesc: "Deploy custom intelligence in under 2 minutes. Our verified cybernetic bots learn directly from your databases, documents, and web links to guarantee 100% accurate responses.", accuracyLabel: "0% ERROR RATE", accuracyText: "Trained on Zendesk, Notion, and your website URLs to achieve zero hallucination.", speedLabel: "3x FASTER CHAT", speedText: "Sub-600ms latency responses across Slack, WhatsApp, and Web widgets.", bounceLabel: "-20% BOUNCE RATE", bounceText: "Keep visitors deeply engaged and instantly double visitor-to-lead subscription rates.", getStartedFree: "Get Started Free", integrations: "Integrations", platformsTitle: "Flexible Platforms", platformsHeader: "FLEXIBLE INTEGRATIONS", platformsDesc: "Switch channels seamlessly. Deploy custom chat intelligence in minutes across all platforms.", tabWidget: "Web Chat Widget", tabSlack: "Slack Workspace", tabWhatsapp: "WhatsApp Business", scriptTitle: "HTML INTEGRATION SCRIPT", scriptDesc: "Simply copy and paste this lightweight async JS script tag into your body. Highly optimized with zero load latency.", featuresTitle: "Premium Values", featuresHeader: "CORE FEATURES", featuresDesc: "Why thousands of SaaS startups and corporate support platforms rely on our bot layers.", reviewsTitle: "Reviews", reviewsHeader: "HAPPY CLIENTS", reviewsDesc: "Hear what designers and company founders say about their automated support loops.", pricingTitle: "Comparative Plans", pricingHeader: "PRICING PLANS", pricingDesc: "Clear pricing structure designed to supercharge visitor-to-lead subscription streams.", planFree: "Free Tier", planFreeDesc: "For startups looking to add a basic custom widget. Index up to 5 web links.", planGrowth: "Growth Tier", planGrowthDesc: "For scaling businesses wanting priority support. Index Notion, Slack threads & custom branding.", planEnt: "Enterprise Tier", planEntDesc: "For corporate platforms requiring GDP alignment, on-prem databases, and instant sync.", bestValue: "BEST VALUES", choosePlan: "CHOOSE PLAN", month: "MONTH", footerDesc: "Deep cosmic cybernetic AI chatbot layer indexing Notion databases and Zendesk support lines with sub-second response guarantees.", privacyRegs: "Privacy Policy", termsStay: "Terms of Service", dismiss: "DISMISS", startIntegration: "START INTEGRATION", sandboxToken: "Free Sandbox Token Issued", webLabel: "Website URL", emailLabel: "Contact Email", generate: "GENERATE SCRIPTS", welcomeMsg: "Hello! Welcome to VaatBot AI. How can I help you today?", welcomeHelp: "Ask me about my 50+ languages support, our sub-second response times, or how we achieve 100% accuracy!", botTyping: "Typing...", inputPlaceholder: "Ask about accuracy, prices, or languages...", readyToSupercharge: "READY TO SUPERCHARGE YOUR SUPPORT WITH AI?", startIntegBtn: "START INTEGRATION NOW", customizerTitle: "Brand Customizer", customizerDesc: "Tailor colors, names, avatars, and greetings to fully respect your corporate branding system.", languagesTitle: "50+ Languages", languagesDesc: "Speaks your customer's native tongue fluently, spanning English, Spanish, Turkish, and more.", widgetsTitle: "Flexible Widget", widgetsDesc: "Deploy in seconds using our clean copy-paste JS script tag or customizable iframe containers.", industriesTitle: "Any Industry", industriesDesc: "Highly optimized for E-commerce, SaaS, Real Estate, Health Clinics, and Customer Support channels.", } }; export default function ChatbotTemplate({ data }: { data: DemoData }) { const { firma, istatistikler = [], hizmetler = [], yorumlar = [] } = data; const [showBookingModal, setShowBookingModal] = useState(false); const [lang, setLang] = useState<"tr" | "en">("tr"); const [preloader, setPreloader] = useState(true); const t = translations[lang]; // Live Chat Simulator State const [messages, setMessages] = useState([]); const [inputVal, setInputVal] = useState(""); const [isTyping, setIsTyping] = useState(false); const chatEndRef = useRef(null); // Platform Integration Selector State const [activePlatform, setActivePlatform] = useState<"widget" | "slack" | "whatsapp">("widget"); // Initial welcome messages useEffect(() => { setMessages([ { sender: "bot", text: t.welcomeMsg }, { sender: "bot", text: t.welcomeHelp }, ]); }, [lang, t.welcomeMsg, t.welcomeHelp]); // 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); }, []); // Scroll chat to bottom on new messages useEffect(() => { chatEndRef.current?.scrollIntoView({ behavior: "smooth" }); }, [messages, isTyping]); // Handles Simulated Bot Responses const handleSendMessage = (e: React.FormEvent) => { e.preventDefault(); if (!inputVal.trim() || isTyping) return; const userText = inputVal; setMessages((prev) => [...prev, { sender: "user", text: userText }]); setInputVal(""); setIsTyping(true); setTimeout(() => { let botResponse = ""; const lower = userText.toLowerCase(); if (lower.includes("lang") || lower.includes("dil") || lower.includes("lisan")) { botResponse = lang === "tr" ? "50'den fazla dili akıcı bir şekilde destekliyorum! Müşterinin Türkçe, İngilizce veya İspanyolca konuştuğunu otomatik olarak algılayıp gerçek zamanlı çeviri yaparım." : "I support 50+ languages fluently! I automatically detect if a customer speaks Turkish, English, Spanish, or German, and translate in real-time."; } else if (lower.includes("price") || lower.includes("fiyat") || lower.includes("ücret") || lower.includes("plan")) { botResponse = lang === "tr" ? "Hemen başlamanız için ücretsiz bir sürümümüz ($0) ve özel markalama, Notion entegrasyonu sunan bir Büyüme Paketimiz ($49/ay) mevcuttur!" : "We have a Free Tier ($0) to get you started instantly, and a Growth Tier ($49/mo) which adds custom branding and support for up to 10k monthly active chats!"; } else if (lower.includes("accuracy") || lower.includes("doğru") || lower.includes("hata") || lower.includes("güven")) { botResponse = lang === "tr" ? "Sıfır hata garantisi veriyoruz! Notion dökümanlarınızı, destek makalelerinizi ve şirket içi bağlantılarınızı indeksleyerek yalnızca doğrulanmış gerçeklerle yanıt veririm." : "We guarantee 100% accuracy! By indexing your custom website URLs, PDF files, and Zendesk support hubs, we answer only using verified facts, ensuring zero hallucinations."; } else { botResponse = lang === "tr" ? "Harika bir soru! Veri tabanlarınıza ve API belgelerinize doğrudan bağlanıp doğrulanmış şirket verilerinizle 600 milisaniyenin altında yanıt veriyorum." : "That is a great question! VaatBot AI connects directly to your databases, Notion files, and API docs to respond with verified company facts in under 600 milliseconds."; } setMessages((prev) => [...prev, { sender: "bot", text: botResponse }]); setIsTyping(false); }, 1200); }; // Localized statistics label mappings const getLocalizedStatLabel = (deger: string) => { if (deger.includes("Accuracy")) return t.accuracyLabel; if (deger.includes("Faster")) return t.speedLabel; return t.bounceLabel; }; const getLocalizedStatText = (deger: string) => { if (deger.includes("Accuracy")) return t.accuracyText; if (deger.includes("Faster")) return t.speedText; return t.bounceText; }; // Custom vector icons for chatbot values (No raw emojis) const getIconSvg = (name: string) => { switch (name) { case "languages": return ( ); case "customizer": return ( ); case "widgets": return ( ); case "industries": return ( ); default: return ( ); } }; const getBentoServiceText = (ikon: string) => { switch (ikon) { case "languages": return { title: t.languagesTitle, desc: t.languagesDesc }; case "customizer": return { title: t.customizerTitle, desc: t.customizerDesc }; case "widgets": return { title: t.widgetsTitle, desc: t.widgetsDesc }; default: return { title: t.industriesTitle, desc: t.industriesDesc }; } }; const css = ` @import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap'); :root { --color-neon-cyan: #00E5FF; --color-neon-pink: #FF007A; --color-neon-purple: #BD00FF; --color-space-black: #080710; --color-space-card: rgba(18, 20, 30, 0.45); --color-space-border: rgba(255, 255, 255, 0.08); } .font-sora-premium { font-family: 'Sora', sans-serif; } .font-mono-code { font-family: 'JetBrains Mono', monospace; } .bg-mesh-cosmic { background-image: radial-gradient(circle at 10% 20%, rgba(0, 229, 255, 0.04) 0%, transparent 45%), radial-gradient(circle at 90% 80%, rgba(255, 0, 122, 0.03) 0%, transparent 50%), linear-gradient(rgba(255, 255, 255, 0.005) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.005) 1px, transparent 1px); background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px; } .neon-cyan-glow { box-shadow: 0 0 30px rgba(0, 229, 255, 0.15); } .text-gradient-cyan-pink { background: linear-gradient(90deg, #00E5FF, #FF007A); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } .hero-title-clamp { font-size: clamp(34px, 5.5vw, 85px); letter-spacing: -0.02em; line-height: 0.95; } `; return ( <> {/* ── IMZA AN: CURTAIN REVEAL PRELOADER ── */} {preloader && (
VAATBOT CYBERNETICS
COSMIC AI PROTOXY
)}
{/* Ambient mesh grid */}
{/* Ambient Orbs */}
{/* ── 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."}
{/* ── FLOATING GLASS HEADER ── */}
{/* Logo */}
VAATBOT
{/* Navigation Links */} {/* Language Selector + Signup Button */}
{/* Language Switcher */}
setShowBookingModal(true)} className="text-[10px] font-black tracking-[2px] uppercase text-black bg-[#00E5FF] hover:bg-white px-6 py-3.5 rounded-xl transition-all cursor-pointer shadow-[0_5px_15px_rgba(0,229,255,0.25)] hidden sm:block" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.signUp}
{/* ── HERO & INTERACTIVE SANDBOX SECTION ── */}
{/* Left Column: Heading and high-impact metric counters */} {t.badge} {t.heroTitlePart1}
{t.heroTitlePart2}
{t.heroTitlePart3}
{t.heroDesc} {/* Accuracy & response blocks */} {istatistikler.map((stat, sIdx) => (
{getLocalizedStatLabel(stat.etiket)}
{getLocalizedStatText(stat.etiket)}
))}
{/* Call-to-actions */} setShowBookingModal(true)} className="px-8 py-4.5 rounded-xl bg-[#00E5FF] hover:bg-white text-black font-black text-[10px] tracking-[2px] uppercase transition-all shadow-[0_5px_15px_rgba(0,229,255,0.3)] cursor-pointer" whileHover={{ scale: 1.02 }} > {t.getStartedFree} {t.integrations}
{/* Right Column: Live Chat Sandbox & Flying Robot Mascot */}
{/* Floating Robot mascot overlap */} {/* eslint-disable-next-line @next/next/no-img-element */} VaatBot AI 3D mascot {/* Chatbox Sandbox Container */} {/* Top Bar */}
VAATBOT SANDBOX
100% ACCURACY ACTIVE
{/* Visual platform icon */}
🤖
{/* Message Stream */}
{messages.map((msg, mIdx) => (
{msg.text}
))} {/* Typing Indicator */} {isTyping && (
)}
{/* Input Form */}
setInputVal(e.target.value)} placeholder={t.inputPlaceholder} className="grow px-4 py-3.5 rounded-xl border border-white/5 bg-[#080710] text-xs text-white placeholder-white/20 focus:outline-none focus:border-[#00E5FF] focus:ring-1 focus:ring-[#00E5FF] font-medium" />
{/* ── SECTION 2: INTERACTIVE INTEGRATION TOGGLE ── */}
{t.platformsTitle}

{t.platformsHeader}

{t.platformsDesc}

{/* Platform Selector Tabs */}
{[ { id: "widget", label: t.tabWidget, icon: "🌐" }, { id: "slack", label: t.tabSlack, icon: "💬" }, { id: "whatsapp", label: t.tabWhatsapp, icon: "📱" }, ].map((p) => ( ))}
{/* Preview Area container */}
{activePlatform === "widget" && (
{t.scriptTitle}
{` `}

{t.scriptDesc}

)} {activePlatform === "slack" && ( {/* Slack Header */}
# slack-workspace
Channel Integration
{/* Thread */}
U

User 11:34 AM

@VaatBot {lang === "tr" ? "doğruluk garantimiz nedir?" : "what is our accuracy guarantee?"}

🤖

VaatBot APP

{lang === "tr" ? "Yüklenen Notion belgeleriniz, destek dökümanlarınız ve web bağlantılarınız üzerinden doğrudan eğitiliyoruz. Bu sayede kanallarda %100 doğru yanıtları garanti ediyoruz!" : "We are trained directly on your uploaded Notion docs, Zendesk files, and web links to guarantee 100% accurate responses in Slack channels!"}

)} {activePlatform === "whatsapp" && ( {/* Phone Header */}
🤖

VaatBot Business

online
{/* Chat */}
{lang === "tr" ? "Merhaba! Destek sorunuzu iletin." : "Hello! Ask me any support question."}
{lang === "tr" ? "Destek biletini İspanyolca'ya çevir." : "Translate the customer support ticket to Spanish."}
{lang === "tr" ? "¡Por supuesto! Destek bileti İspanyolca'ya çevrilerek iletildi." : "¡Por supuesto! The support ticket has been translated and dispatched."}
)}
{/* ── BENTO FEATURES GRID ── */}
{t.featuresTitle}

{t.featuresHeader}

{t.featuresDesc}

{/* Bento Grid */}
{hizmetler.map((hizmet, hIdx) => { const item = getBentoServiceText(hizmet.ikon); return (
{getIconSvg(hizmet.ikon)}

{item.title}

{item.desc}

); })}
{/* ── TESTIMONIALS ── */}
{t.reviewsTitle}

{t.reviewsHeader}

{t.reviewsDesc}

{/* Testimonials 2-Column Grid */}
{yorumlar.map((y, yIdx) => ( {/* Rating Stars SVG */}
{[...Array(5)].map((_, starIdx) => ( ))}

“{y.yorum}”

{y.yazar.charAt(0)}

{y.yazar}

{y.tarih}
))}
{/* ── SECTION 5: PRICING PLANS (Comparative pricing cards) ── */}
{t.pricingTitle}

{t.pricingHeader}

{t.pricingDesc}

{/* Three Pricing Cards */}
{[ { title: t.planFree, price: "$0", desc: t.planFreeDesc, popular: false }, { title: t.planGrowth, price: "$49", desc: t.planGrowthDesc, popular: true }, { title: t.planEnt, price: "Custom", desc: t.planEntDesc, popular: false } ].map((plan, pIdx) => ( {plan.popular && (
{t.bestValue}
)}

{plan.title}

{plan.desc}

{/* Price display */}
{plan.price} / {t.month}
setShowBookingModal(true)} className={`w-full py-4 rounded-xl font-black text-xs uppercase tracking-widest transition-all cursor-pointer ${ plan.popular ? "bg-[#00E5FF] hover:bg-white text-black shadow-md" : "bg-[#080710] hover:bg-white/5 text-white/70 border border-white/5 hover:border-white/10" }`} whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }} > {t.choosePlan}
))}
{/* ── BOTTOM BANNER ── */}

{t.readyToSupercharge}

setShowBookingModal(true)} className="inline-flex items-center gap-3 px-8 py-4 bg-black hover:bg-white text-white hover:text-black rounded-xl font-mono-code font-black tracking-widest uppercase transition-all shadow-[0_5px_15px_rgba(0,0,0,0.3)] text-xs cursor-pointer" whileHover={{ scale: 1.02 }} > {t.startIntegBtn}
{/* ── FOOTER ── */} {/* ── FAST SIGN UP MODAL ── */} {showBookingModal && ( {/* Close Button */} {/* Success check indicator */}

{t.startIntegration}

{t.sandboxToken}

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