'use client'; import React, { useState } from 'react'; import Link from 'next/link'; import { Sparkles, ArrowRight, Smartphone, Layers, ShieldCheck, LockKeyhole, ImagePlus, Check, Zap, UploadCloud, SlidersHorizontal, } from 'lucide-react'; import { resolveLocalised, ToolItem, AppItem, VariantSpec } from '@/types'; import { TryItWidget } from './TryItWidget'; import { HeroPrism } from '@/components/3d/HeroPrism'; import { Kinetic3DText } from '@/components/ui/Kinetic3DText'; import { ShimmerBadge } from '@/components/animate-ui/ShimmerBadge'; import { CardBeforeAfterSlider } from '@/components/ui/CardBeforeAfterSlider'; import { BeforeAfterSlider } from '@/components/ui/BeforeAfterSlider'; interface HeroSectionProps { title?: any; subtitle?: any; variant?: string; badge?: any; tryIt?: { toolRef: string; }; tool?: ToolItem | null; homeApp?: AppItem | null; variants?: VariantSpec[]; locale?: string; } export function HeroSection({ title, subtitle, variant = 'centered', badge, tool, homeApp, variants = [], locale = 'en', }: HeroSectionProps) { const [mobileTab, setMobileTab] = useState<'upload' | 'compare'>('upload'); const resolvedTitle = resolveLocalised(title, locale); const resolvedSubtitle = resolveLocalised(subtitle, locale); const resolvedBadge = resolveLocalised(badge, locale); if (variant === 'tryit' && tool) { return (
{resolvedBadge || 'A calmer way to create'}
Explore the tools Our apps
No account needed Photos aren’t stored Try with a sample
); } // Dedicated Tool Landing Hero (for Google Search / Direct Traffic SEO) if (variant === 'toolHero' && tool) { const categoryName = tool.category?.replace('-', ' ').toUpperCase() || 'AI TOOL'; const appName = homeApp ? resolveLocalised(homeApp.name, locale) : 'Mobile App'; const primaryExample = tool.content?.examples?.[0] || { before: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=800&auto=format&fit=crop&q=80', after: 'https://images.unsplash.com/photo-1578632767115-351597cf2477?w=800&auto=format&fit=crop&q=80', caption: 'Sub-pixel neural transformation details', }; return (
{/* Ambient subtle warm gradient */}
{/* Breadcrumb Navigation */} {/* Centered Tool Header */}
{categoryName} • AI NEURAL TOOL

{resolvedTitle}

{resolvedSubtitle}

{/* Intelligent Mobile Tab Switcher (Visible ONLY on Mobile < 768px) */}
{/* Intelligent Side-by-Side Tool Studio (Side-by-Side on Tablet & Desktop) */}
{/* Column 1: Live Comparison Showcase */}
{/* Card Header */}

Neural Transformation Preview

Interactive Model Result

Live Demo
{/* Comparison Slider */}
{/* Model Specs Strip */}
Lossless 4K preservation Instant sub-second inference
{/* Mobile Jump to Upload */}
{/* Column 2: Upload Action Studio */}
setMobileTab('compare')} />
{/* Clean Trust Indicators */}
No account required Photos never stored High-res 4K export {homeApp && ( Available in {appName} App )}
); } // Centered Hero for Tools/Apps/Pricing pages return (
{resolvedBadge && (
{resolvedBadge}
)}

{resolvedTitle}

{resolvedSubtitle}

The Creative Suite Mobile Apps Suite
); }