"use client";

import Link from "next/link";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from "@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen";
import HeroBillboardDashboard from "@/components/sections/hero/HeroBillboardDashboard";
import FeatureBento from "@/components/sections/feature/FeatureBento";
import FeatureHoverPattern from "@/components/sections/feature/featureHoverPattern/FeatureHoverPattern";
import MetricSplitMediaAbout from "@/components/sections/about/MetricSplitMediaAbout";
import TestimonialCardSix from "@/components/sections/testimonial/TestimonialCardSix";
import ContactCTA from "@/components/sections/contact/ContactCTA";
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
import {
  Sparkles,
  Zap,
  MessageSquareText,
  User,
  MessageSquare,
  BarChart3,
  Users,
  Briefcase,
  Shield,
  CheckCircle,
  Star,
  Rocket,
  MessageSquareText as MessageSquareTextIcon,
  Brain,
  TrendingUp,
  Globe,
  DollarSign,
  HelpCircle,
  Home,
  Settings,
  CircleDollarSign,
  ArrowLeftRight,
  Send,
} from "lucide-react";

const navItems = [
  { name: "Home", id: "/" },
  { name: "Features", id: "/features" },
  { name: "Pricing", id: "/pricing" },
  { name: "Contact", id: "/contact" },
  { name: "Docs", id: "https://docs.example.com" },
];

export default function HomePage() {
  return (
    <ThemeProvider
      defaultButtonVariant="icon-arrow"
      defaultTextAnimation="background-highlight"
      borderRadius="rounded"
      contentWidth="medium"
      sizing="medium"
      background="none"
      cardStyle="gradient-bordered"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="layered"
      headingFontWeight="semibold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          navItems={navItems}
          brandName="AIAssist"
          bottomLeftText="Advanced AI Technology"
          bottomRightText="hello@aiassist.io"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardDashboard
          title="Deploy AI Agents as Your Client Assistants"
          description="Powerful, intelligent AI agents that work alongside your team to handle client interactions, support requests, and business tasks. Seamless integration, real-time learning, and enterprise-grade reliability."
          tag="Next-Generation AI"
          tagIcon={Sparkles}
          tagAnimation="slide-up"
          buttons={[
            { text: "Start Free Trial", href: "https://app.example.com/trial" },
            { text: "Schedule Demo", href: "/contact" },
          ]}
          buttonAnimation="slide-up"
          background={{ variant: "radial-gradient" }}
          dashboard={{
            title: "Agent Command Center",
            logoIcon: Zap,
            imageSrc:
              "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/a-modern-dark-themed-ai-agent-dashboard--1772532768124-ae5c2b99.png",
            searchPlaceholder: "Search agent status...",
            buttons: [
              { text: "Deploy Agent", href: "#" },
              { text: "View Analytics", href: "#" },
            ],
            sidebarItems: [
              { icon: Home, active: true },
              { icon: MessageSquareTextIcon },
              { icon: Settings },
            ],
            stats: [
              {
                title: "Active Agents",
                values: [24, 38, 52],
                description: "Currently deployed",
              },
              {
                title: "Client Interactions",
                values: [1240, 1847, 2563],
                valuePrefix: "$",
                valueSuffix: "K",
                description: "Handled monthly",
              },
              {
                title: "System Uptime",
                values: [99.8, 99.9, 99.95],
                valueSuffix: "%",
                description: "Reliability guaranteed",
              },
            ],
            chartTitle: "Agent Performance",
            chartData: [
              { value: 75 },
              { value: 85 },
              { value: 92 },
              { value: 88 },
              { value: 95 },
            ],
            listTitle: "Recent Deployments",
            listItems: [
              {
                icon: CheckCircle,
                title: "CustomerBot v2.1",
                status: "Active",
              },
              {
                icon: CircleDollarSign,
                title: "SupportAgent v1.8",
                status: "Updating",
              },
              {
                icon: CheckCircle,
                title: "SalesAssistant v3.0",
                status: "Active",
              },
            ],
          }}
        />
      </div>

      <div id="features-bento" data-section="features-bento">
        <FeatureBento
          title="Powerful AI Agent Features"
          description="Everything you need to deploy, manage, and optimize intelligent AI agents for your business"
          tag="Advanced Capabilities"
          tagIcon={Zap}
          tagAnimation="slide-up"
          buttons={[{ text: "Explore All Features", href: "#" }]}
          buttonAnimation="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          animationType="slide-up"
          features={[
            {
              title: "Real-Time Communication",
              description:
                "Instant, contextual conversations with clients and team members",
              bentoComponent: "chat",
              aiIcon: MessageSquareText,
              userIcon: User,
              exchanges: [
                {
                  userMessage: "What are my account details?",
                  aiResponse:
                    "Your account shows 12 active projects with a total investment of $125,000. Would you like more details on any specific project?",
                },
                {
                  userMessage: "Can you help with billing?",
                  aiResponse:
                    "Absolutely! I can help you review your billing history, update payment methods, or generate invoices. What would you like to do?",
                },
              ],
              placeholder: "Ask me anything...",
            },
            {
              title: "Multi-Agent Orchestration",
              description:
                "Coordinate multiple specialized agents working in parallel",
              bentoComponent: "orbiting-icons",
              centerIcon: Zap,
              items: [
                { icon: MessageSquare, ring: 1 },
                { icon: BarChart3, ring: 1 },
                { icon: Users, ring: 2 },
                { icon: Briefcase, ring: 2 },
                { icon: Shield, ring: 3 },
              ],
            },
            {
              title: "Performance Analytics",
              description:
                "Comprehensive insights into agent behavior and client satisfaction",
              bentoComponent: "line-chart",
            },
            {
              title: "Enterprise Integration",
              description:
                "Connect with CRM, helpdesk, and business systems seamlessly",
              bentoComponent: "icon-info-cards",
              items: [
                { icon: Zap, label: "API Connectors", value: "50+" },
                {
                  icon: Shield,
                  label: "Security Standard",
                  value: "SOC 2 Type II",
                },
                { icon: Globe, label: "Data Centers", value: "6 Regions" },
              ],
            },
            {
              title: "Contextual Learning",
              description:
                "Agents that adapt and improve with every interaction",
              bentoComponent: "animated-bar-chart",
            },
            {
              title: "Global Deployment",
              description: "Serve clients worldwide with multi-language support",
              bentoComponent: "map",
            },
          ]}
          carouselMode="buttons"
        />
      </div>

      <div id="capabilities" data-section="capabilities">
        <FeatureHoverPattern
          title="Agent Capabilities That Drive Results"
          description="Discover what your AI agents can accomplish for your business"
          tag="Agent Superpowers"
          tagIcon={Zap}
          tagAnimation="slide-up"
          textboxLayout="default"
          useInvertedBackground={true}
          animationType="slide-up"
          features={[
            {
              icon: MessageSquareTextIcon,
              title: "24/7 Client Support",
              description:
                "Always-on assistance that never needs sleep, handling inquiries across time zones",
            },
            {
              icon: Brain,
              title: "Intelligent Learning",
              description:
                "Continuously improves responses and decision-making based on interactions",
            },
            {
              icon: Zap,
              title: "Lightning Fast",
              description:
                "Sub-second response times ensure smooth, natural conversations",
            },
            {
              icon: Shield,
              title: "Enterprise Security",
              description:
                "Bank-grade encryption and compliance with GDPR, HIPAA, and SOC 2",
            },
            {
              icon: TrendingUp,
              title: "Conversion Optimization",
              description:
                "Intelligent agents guide prospects through sales funnels with personalized assistance",
            },
            {
              icon: Globe,
              title: "Multi-Language Support",
              description:
                "Serve global audiences with natural communication in 100+ languages",
            },
          ]}
        />
      </div>

      <div id="about" data-section="about">
        <MetricSplitMediaAbout
          tag="Why Choose Us"
          tagIcon={CheckCircle}
          tagAnimation="slide-up"
          title="Built for Enterprise Teams That Demand Excellence"
          description="AIAssist was founded by AI researchers and enterprise software engineers who understand the complex requirements of scaling intelligent systems. We've processed over 50 million conversations and learned what it takes to deploy AI that customers love."
          metrics={[
            { value: "50M+", title: "Conversations Processed" },
            { value: "99.95%", title: "System Uptime" },
          ]}
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-workspace-showing-ai-agent--1772532766246-12323491.png"
          imageAlt="Enterprise AI metrics dashboard"
          mediaAnimation="slide-up"
          metricsAnimation="slide-up"
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSix
          title="Loved by Industry Leaders"
          description="See how companies are transforming customer interactions with AI agents"
          tag="Social Proof"
          tagIcon={Star}
          tagAnimation="slide-up"
          textboxLayout="default"
          useInvertedBackground={true}
          animationType="slide-up"
          testimonials={[
            {
              id: "1",
              name: "Sarah Chen",
              handle: "VP Product, TechCorp",
              testimonial:
                "AIAssist reduced our support response time by 85%. The agents integrate seamlessly with our existing systems and our customers can't tell they're talking to AI.",
              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-headshot-of-a-confident-bus-1772532765359-17d2a019.png",
              imageAlt: "Sarah Chen",
            },
            {
              id: "2",
              name: "Michael Rodriguez",
              handle: "CEO, GrowthStartup",
              testimonial:
                "We deployed 5 agents in 2 weeks. The ROI was immediate - handling 10x more customer inquiries with the same team size. Incredible solution.",
              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-headshot-of-a-female-techno-1772532766791-eaa8c798.png",
              imageAlt: "Michael Rodriguez",
            },
            {
              id: "3",
              name: "Emily Johnson",
              handle: "Head of Support, CloudSoft",
              testimonial:
                "The contextual learning is remarkable. Every day our agents get smarter. Our customer satisfaction scores have never been higher.",
              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-headshot-of-a-male-business-1772532765548-3507727f.png",
              imageAlt: "Emily Johnson",
            },
            {
              id: "4",
              name: "David Kim",
              handle: "Operations Manager, RetailHub",
              testimonial:
                "We've tried other AI platforms. AIAssist is in a different league. The support team is outstanding and the product constantly improves.",
              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-headshot-of-a-diverse-busin-1772532766055-24de2fcc.png",
              imageAlt: "David Kim",
            },
            {
              id: "5",
              name: "Lisa Anderson",
              handle: "CTO, FinanceFlow",
              testimonial:
                "Security and compliance were our concerns. AIAssist exceeded all our requirements. SOC 2 certified with full HIPAA support built-in.",
              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-headshot-of-a-young-entrepr-1772532766756-54e42e8c.png",
              imageAlt: "Lisa Anderson",
            },
            {
              id: "6",
              name: "James Peterson",
              handle: "CMO, MarketingPro",
              testimonial:
                "Our conversion rate increased 45% after deploying AIAssist agents. They're like having an expert salesperson working 24/7.",
              imageSrc:
                "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AQl7xgtU77Ab7K2fMjb9S5UEGO/professional-headshot-of-an-experienced--1772532765879-624a58d7.png",
              imageAlt: "James Peterson",
            },
          ]}
          speed={40}
          topMarqueeDirection="left"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCTA
          tag="Ready to Transform"
          tagIcon={Rocket}
          tagAnimation="slide-up"
          title="Start Building Your AI Assistant Today"
          description="Join hundreds of companies using AIAssist to deliver exceptional customer experiences. Get started free - no credit card required."
          buttons={[
            { text: "Start Free Trial", href: "https://app.example.com/trial" },
            { text: "Schedule Demo", href: "mailto:demo@aiassist.io" },
          ]}
          buttonAnimation="slide-up"
          background={{ variant: "radial-gradient" }}
          useInvertedBackground={false}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseCard
          logoText="AIAssist"
          columns={[
            {
              title: "Product",
              items: [
                { label: "Features", href: "/#features" },
                { label: "Pricing", href: "/#pricing" },
                { label: "Security", href: "/security" },
                { label: "API Docs", href: "https://docs.aiassist.io" },
              ],
            },
            {
              title: "Company",
              items: [
                { label: "About", href: "/about" },
                { label: "Blog", href: "/blog" },
                { label: "Careers", href: "/careers" },
                { label: "Contact", href: "/#contact" },
              ],
            },
            {
              title: "Resources",
              items: [
                {
                  label: "Documentation",
                  href: "https://docs.aiassist.io",
                },
                { label: "Integrations", href: "/integrations" },
                { label: "Templates", href: "/templates" },
                { label: "Support", href: "/support" },
              ],
            },
            {
              title: "Legal",
              items: [
                { label: "Privacy Policy", href: "/privacy" },
                { label: "Terms of Service", href: "/terms" },
                { label: "Cookie Policy", href: "/cookies" },
                { label: "Compliance", href: "/compliance" },
              ],
            },
          ]}
          copyrightText="© 2025 AIAssist. All rights reserved."
        />
      </div>
    </ThemeProvider>
  );
}