"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ReactLenis from "lenis/react";
import ContactSplit from '@/components/sections/contact/ContactSplit';
import FaqSplitText from '@/components/sections/faq/FaqSplitText';
import FooterCard from '@/components/sections/footer/FooterCard';
import HeroBillboardRotatedCarousel from '@/components/sections/hero/HeroBillboardRotatedCarousel';
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import PricingCardThree from '@/components/sections/pricing/PricingCardThree';
import ProductCardThree from '@/components/sections/product/ProductCardThree';
import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCardSix';
import TextAbout from '@/components/sections/about/TextAbout';
import { Cake, Phone, MapPin, Instagram, Facebook } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
        defaultButtonVariant="hover-bubble"
        defaultTextAnimation="background-highlight"
        borderRadius="pill"
        contentWidth="small"
        sizing="largeSmall"
        background="floatingGradient"
        cardStyle="gradient-radial"
        primaryButtonStyle="flat"
        secondaryButtonStyle="glass"
        headingFontWeight="semibold"
    >
      <ReactLenis root>
  <div id="nav" data-section="nav">
      <NavbarLayoutFloatingOverlay
      navItems={[
        { name: "Home", id: "hero" },
        { name: "Menu", id: "products" },
        { name: "Calculator", id: "calculator" },
        { name: "Contact", id: "contact" },
      ]}
      brandName="Korjik Bakery"
    />
  </div>

  <div id="hero" data-section="hero">
      <HeroBillboardRotatedCarousel
      background={{ variant: "gradient-bars" }}
      title="Korjik Bakery: Premium Cakes"
      description="Crafting sweet moments with premium ingredients and artistry in every slice."
      buttons={[{ text: "View Menu", href: "#products" }, { text: "Calculate Price", href: "#calculator" }]}
      carouselItems={Array.from({length: 6}).map((_, i) => ({ id: `c${i}`, imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3DUyVnve7Kh6TrptJyNK7rltRFc/uploaded-1778351191230-4ed7n31k.jpg?_wi=1" }))}
    />
  </div>

  <div id="about" data-section="about">
      <TextAbout useInvertedBackground={true} title="Handcrafted Perfection for Your Celebration" tag="Our Story" tagIcon={Cake} />
  </div>

  <div id="products" data-section="products">
      <ProductCardThree
      animationType="slide-up"
      textboxLayout="split"
      gridVariant="four-items-2x2-equal-grid"
      useInvertedBackground={false}
      products={[
        { id: "p1", name: "Mango Passion Fruit", price: "Custom", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3DUyVnve7Kh6TrptJyNK7rltRFc/uploaded-1778351191230-4ed7n31k.jpg?_wi=2", initialQuantity: 0 },
        { id: "p2", name: "Red Velvet Raspberry", price: "Custom", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3DUyVnve7Kh6TrptJyNK7rltRFc/uploaded-1778351191230-xqaun9ef.jpg?_wi=2", initialQuantity: 0 },
        { id: "p3", name: "Snickers Deluxe", price: "Custom", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3DUyVnve7Kh6TrptJyNK7rltRFc/uploaded-1778351191230-so738kgy.jpg?_wi=2", initialQuantity: 0 },
        { id: "p4", name: "Pistachio Napoleon", price: "Custom", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3DUyVnve7Kh6TrptJyNK7rltRFc/uploaded-1778351191230-vr3b8t4m.jpg?_wi=2", initialQuantity: 0 },
      ]}
      title="Our Signature Fillings"
      description="Choose from our curated collection of premium cake flavors."
    />
  </div>

  <div id="calculator" data-section="calculator">
      <PricingCardThree
      animationType="slide-up"
      textboxLayout="split"
      useInvertedBackground={true}
      plans={[
        { id: "small", name: "Small (1.5 - 3kg)", price: "Estimate", features: ["Personalized Filling", "Standard Decor"], buttons: [{ text: "Select", href: "#contact" }] },
        { id: "medium", name: "Medium (3 - 6kg)", price: "Estimate", features: ["Personalized Filling", "Premium Decor"], buttons: [{ text: "Select", href: "#contact" }] },
        { id: "large", name: "Event Size (6kg+)", price: "Contact Us", features: ["Custom Design", "Consultation"], buttons: [{ text: "Inquire", href: "#contact" }] },
      ]}
      title="Interactive Cake Calculator"
      description="Customize your perfect cake size, filling, and decor."
    />
  </div>

  <div id="faq" data-section="faq">
      <FaqSplitText
      useInvertedBackground={false}
      faqs={[{ id: "f1", title: "How far in advance should I order?", content: "3-5 days in advance." }]}
      sideTitle="Common Questions"
      faqsAnimation="slide-up"
    />
  </div>

  <div id="testimonials" data-section="testimonials">
      <TestimonialCardSix
      animationType="slide-up"
      textboxLayout="split"
      useInvertedBackground={true}
      testimonials={[{ id: "t1", name: "Maria", handle: "@client", testimonial: "The best cake I have ever had!" }]}
      title="Sweet Reviews"
    />
  </div>

  <div id="contact" data-section="contact">
      <ContactSplit
      tag="Contact Us"
      title="Get in Touch"
      description="Call us at 0786 80 779 or visit us at Strada Independenței 3/1, Chișinău."
      onSubmit={(email) => console.log("Order request from:", email)}
      background={{ variant: "plain" }}
    />
  </div>

  <div id="footer" data-section="footer">
      <FooterCard
      logoText="Korjik Bakery"
      copyrightText="© 2025 Korjik Bakery"
      socialLinks={[
        { icon: Instagram, href: "#", ariaLabel: "Instagram" },
        { icon: Facebook, href: "#", ariaLabel: "Facebook" }
      ]}
    />
  </div>
      </ReactLenis>
    </ThemeProvider>
  );
}