"use client"

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import HeroSplitKpi from '@/components/sections/hero/HeroSplitKpi';
import ParallaxAbout from '@/components/sections/about/ParallaxAbout';
import FeatureCardSixteen from '@/components/sections/feature/FeatureCardSixteen';
import PricingCardSeven from '@/components/sections/pricing/PricingCardSeven';
import ProductCardSeven from '@/components/sections/product/ProductCardSeven';
import TestimonialCardFifteen from '@/components/sections/testimonial/TestimonialCardFifteen';
import FaqBase from '@/components/sections/faq/FaqBase';
import ContactSplit from '@/components/sections/contact/ContactSplit';
import FooterBaseCard from '@/components/sections/footer/FooterBaseCard';
import { CheckCircle, Crown, DollarSign, HelpCircle, Sparkles, Zap } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="expand-hover"
      defaultTextAnimation="entrance-slide"
      borderRadius="rounded"
      contentWidth="medium"
      sizing="largeSmallSizeLargeTitles"
      background="noiseDiagonalGradient"
      cardStyle="elevated-accent-light"
      primaryButtonStyle="neon-glow-border"
      secondaryButtonStyle="solid"
      headingFontWeight="normal"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          brandName="AIFlow"
          navItems={[
            { name: "Features", id: "features" },
            { name: "Pricing", id: "pricing" },
            { name: "About", id: "about" },
            { name: "FAQ", id: "faq" },
            { name: "Contact", id: "contact" }
          ]}
          button={{
            text: "Get Started",
            href: "https://app.aiflow.ai/signup"
          }}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroSplitKpi
          title="Transform Your Workflow with AI"
          description="Automate repetitive tasks and unlock productivity with intelligent AI-powered automation designed for modern teams"
          tag="Trusted by 500+ Companies"
          tagIcon={Zap}
          kpis={[
            { value: "87%", label: "Productivity Increase" },
            { value: "24/7", label: "AI-Powered Support" },
            { value: "5 min", label: "Setup Time" }
          ]}
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766735978956-mbp7zxok.jpg"
          imageAlt="AIFlow Dashboard showing advanced analytics and automation controls"
          imagePosition="right"
          buttons={[
            { text: "Start Free Trial", href: "https://app.aiflow.ai/trial" },
            { text: "View Demo", href: "https://demo.aiflow.ai" }
          ]}
        />
      </div>

      <div id="about" data-section="about">
        <ParallaxAbout
          title="Intelligent Automation for Everyone"
          description="We believe AI should be accessible, intuitive, and powerful. AIFlow combines cutting-edge technology with a human-centered design approach to deliver automation that truly works."
          tag="Our Mission"
          tagIcon={Sparkles}
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767176355117-q9759h5y.jpg"
          imageAlt="Abstract AI technology visualization"
          buttons={[
            { text: "Learn Our Story", href: "#" }
          ]}
        />
      </div>

      <div id="features" data-section="features">
        <FeatureCardSixteen
          title="Why Choose AIFlow"
          description="See how AIFlow compares to traditional automation tools and manual processes"
          tag="Feature Comparison"
          tagIcon={CheckCircle}
          negativeCard={{
            title: "Manual Processes",
            items: [
              "Time-consuming manual workflows",
              "Human error and inconsistencies",
              "Limited scalability",
              "High operational costs",
              "Slow decision-making cycles"
            ]
          }}
          positiveCard={{
            title: "AIFlow Solution",
            items: [
              "Fully automated intelligent workflows",
              "99.9% accuracy and consistency",
              "Scales seamlessly with your business",
              "Reduces operational costs by 70%",
              "Real-time intelligent insights"
            ]
          }}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="pricing" data-section="pricing">
        <PricingCardSeven
          title="Simple, Transparent Pricing"
          description="Choose the perfect plan for your needs. All plans include 14-day free trial."
          tag="Pricing"
          tagIcon={DollarSign}
          plans={[
            {
              id: "starter",
              tag: "FOR INDIVIDUALS",
              tagIcon: Sparkles,
              pricingOptions: [
                { value: "monthly", label: "Monthly", price: "$49", subtitle: "Per Month" },
                { value: "yearly", label: "Yearly", price: "$490", subtitle: "Per Year" }
              ],
              defaultOption: "yearly",
              selectorNote: "Save $98 with yearly",
              description: "Perfect for freelancers and small projects looking to automate basic workflows",
              buttons: [
                { text: "Get Started", href: "https://app.aiflow.ai/signup?plan=starter" }
              ]
            },
            {
              id: "pro",
              tag: "MOST POPULAR",
              tagIcon: Zap,
              pricingOptions: [
                { value: "monthly", label: "Monthly", price: "$149", subtitle: "Per Month" },
                { value: "yearly", label: "Yearly", price: "$1490", subtitle: "Per Year" }
              ],
              defaultOption: "yearly",
              selectorNote: "Save $298 with yearly",
              description: "Everything in Starter, plus advanced automation, priority support, and custom integrations",
              buttons: [
                { text: "Get Started", href: "https://app.aiflow.ai/signup?plan=pro" }
              ]
            },
            {
              id: "enterprise",
              tag: "FOR TEAMS",
              tagIcon: Crown,
              pricingOptions: [
                { value: "monthly", label: "Monthly", price: "Custom", subtitle: "Contact Sales" },
                { value: "yearly", label: "Yearly", price: "Custom", subtitle: "Contact Sales" }
              ],
              defaultOption: "monthly",
              selectorNote: "Unlimited everything",
              description: "Unlimited automation, dedicated account manager, SLA guarantee, and custom development",
              buttons: [
                { text: "Contact Sales", href: "https://calendly.com/aiflow/sales" }
              ]
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="products" data-section="products">
        <ProductCardSeven
          title="Featured AI Modules"
          description="Powerful AI tools to transform your business operations"
          tag="Our Capabilities"
          tagIcon={Zap}
          products={[
            {
              id: "1",
              name: "Smart Workflow Automation",
              price: "Core Feature",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766735978956-mbp7zxok.jpg",
              imageAlt: "Workflow automation dashboard"
            },
            {
              id: "2",
              name: "Intelligent Data Processing",
              price: "Core Feature",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767176355117-q9759h5y.jpg",
              imageAlt: "Data processing visualization"
            },
            {
              id: "3",
              name: "Predictive Analytics Engine",
              price: "Core Feature",
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766735978956-mbp7zxok.jpg",
              imageAlt: "Analytics dashboard"
            }
          ]}
          gridVariant="uniform-all-items-equal"
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardFifteen
          testimonial="AIFlow transformed how we operate. We've cut our manual processes by 85% and saved thousands in operational costs. The AI simply works."
          rating={5}
          author="Sarah Mitchell, Director of Operations at TechVenture"
          avatars={[
            { src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1766399078370-foj14u2p.jpg", alt: "Avatar 1" },
            { src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767105170085-07gms6pl.jpg", alt: "Avatar 2" },
            { src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767105171752-5ywrdnpe.jpg", alt: "Avatar 3" },
            { src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767105172560-1tw6lhpc.jpg", alt: "Avatar 4" },
            { src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767176357551-4dc18juo.jpg", alt: "Avatar 5" },
            { src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767105170945-eh07laue.jpg", alt: "Avatar 6" }
          ]}
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqBase
          title="Common Questions"
          description="Everything you need to know about AIFlow"
          tag="FAQ"
          tagIcon={HelpCircle}
          textboxLayout="default"
          useInvertedBackground="noInvert"
          animationType="smooth"
          showCard={true}
          faqs={[
            {
              id: "1",
              title: "How does AIFlow integrate with my existing tools?",
              content: "AIFlow connects seamlessly with 500+ popular business applications through our API and pre-built integrations. Setup takes just a few minutes for most tools."
            },
            {
              id: "2",
              title: "Is my data secure with AIFlow?",
              content: "Yes. We use enterprise-grade encryption, comply with GDPR and SOC 2 standards, and never store your data longer than necessary. Your data security is our top priority."
            },
            {
              id: "3",
              title: "What kind of support do you provide?",
              content: "All plans include email support. Pro and Enterprise plans get priority support with response times under 2 hours, plus access to our knowledge base and video tutorials."
            },
            {
              id: "4",
              title: "Can I customize workflows for my specific needs?",
              content: "Absolutely. While most use cases are covered by templates, Pro and Enterprise plans allow custom workflow development with our team of AI specialists."
            },
            {
              id: "5",
              title: "Do you offer a free trial?",
              content: "Yes, all new accounts get a 14-day free trial with full access to features. No credit card required to start. You can upgrade anytime during or after your trial."
            },
            {
              id: "6",
              title: "How does the AI learn and improve?",
              content: "Our AI improves through continuous learning from anonymized user interactions. We regularly update models and algorithms to ensure accuracy and performance."
            }
          ]}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactSplit
          tag="Newsletter"
          title="Stay ahead with AI insights"
          description="Get weekly updates on AI automation trends, product features, and industry insights delivered to your inbox."
          imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/gallery/uploaded-1767176356104-h0v8ptlb.jpg"
          imageAlt="Modern workspace with computer and technology"
          mediaPosition="right"
          inputPlaceholder="your@email.com"
          buttonText="Subscribe"
          termsText="We respect your privacy. Unsubscribe at any time."
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseCard
          logoText="AIFlow"
          columns={[
            {
              title: "Product",
              items: [
                { label: "Features", href: "#features" },
                { label: "Pricing", href: "#pricing" },
                { label: "Security", href: "#" },
                { label: "Roadmap", href: "#" }
              ]
            },
            {
              title: "Company",
              items: [
                { label: "About Us", href: "#about" },
                { label: "Blog", href: "#" },
                { label: "Careers", href: "#" },
                { label: "Contact", href: "#contact" }
              ]
            },
            {
              title: "Resources",
              items: [
                { label: "Documentation", href: "#" },
                { label: "API Reference", href: "#" },
                { label: "Community", href: "#" },
                { label: "Support", href: "#" }
              ]
            },
            {
              title: "Legal",
              items: [
                { label: "Privacy Policy", href: "#" },
                { label: "Terms of Service", href: "#" },
                { label: "Cookie Policy", href: "#" }
              ]
            }
          ]}
          copyrightText="© 2025 AIFlow. All rights reserved."
        />
      </div>
    </ThemeProvider>
  );
}