"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered";
import HeroSplit from "@/components/sections/hero/HeroSplit";
import ProductCardTwo from "@/components/sections/product/ProductCardTwo";
import SocialProofOne from "@/components/sections/socialProof/SocialProofOne";
import TestimonialCardSix from "@/components/sections/testimonial/TestimonialCardSix";
import TextSplitAbout from "@/components/sections/about/TextSplitAbout";
import FooterLogoReveal from "@/components/sections/footer/FooterLogoReveal";
import Link from "next/link";
import { Sparkles, Award, Star, Heart } from "lucide-react";

export default function HomePage() {
  const navItems = [
    { name: "Home", id: "/" },
    { name: "Shop", id: "/shop" },
    { name: "About", id: "/about" },
    { name: "Reviews", id: "/testimonials" },
    { name: "Contact", id: "/contact" },
  ];

  const handleNavClick = (id: string) => {
    if (id === "/") {
      window.location.href = "/";
    } else if (id.startsWith("/")) {
      window.location.href = id;
    } else if (id.startsWith("http")) {
      window.open(id, "_blank");
    } else {
      const element = document.getElementById(id);
      if (element) {
        element.scrollIntoView({ behavior: "smooth" });
      }
    }
  };

  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="background-highlight"
      borderRadius="rounded"
      contentWidth="mediumSmall"
      sizing="mediumLargeSizeMediumTitles"
      background="circleGradient"
      cardStyle="gradient-radial"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="solid"
      headingFontWeight="light"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleCentered
          navItems={navItems}
          button={{ text: "Shop Now", href: "/shop" }}
          brandName="StyleHub"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroSplit
          title="Discover Your Style"
          description="Explore our curated collection of premium fashion and apparel. Find the perfect pieces to express your unique style with our exclusive collections."
          background={{ variant: "glowing-orb" }}
          tag="New Arrivals"
          tagIcon={Sparkles}
          buttons={[
            { text: "Shop Collection", href: "/shop" },
            { text: "View New Items", href: "#products" },
          ]}
          imageSrc="http://img.b2bpic.net/free-photo/close-up-hand-holding-bunch-hangers_1163-853.jpg"
          imageAlt="Fashion and lifestyle banner"
          imagePosition="right"
          mediaAnimation="slide-up"
          useInvertedBackground={false}
        />
      </div>

      <div id="products" data-section="products">
        <ProductCardTwo
          title="Featured Collections"
          description="Handpicked items from our latest collections designed for style and comfort"
          tag="Best Sellers"
          tagIcon={Award}
          textboxLayout="default"
          useInvertedBackground={false}
          animationType="slide-up"
          gridVariant="three-columns-all-equal-width"
          products={[
            {
              id: "1",              brand: "StyleHub Premium",              name: "Classic Casual Shirt",              price: "$89.99",              rating: 5,
              reviewCount: "2.4k",              imageSrc: "http://img.b2bpic.net/free-photo/portrait-handsome-smiling-stylish-hipster-lambersexual-modelmodern-man-dressed-white-shirt-fashion-male-posing-street-background-sunglasses-outdoors-sunset_158538-20630.jpg",              imageAlt: "Classic casual shirt"},
            {
              id: "2",              brand: "StyleHub Essentials",              name: "Blue Denim Jacket",              price: "$129.99",              rating: 5,
              reviewCount: "1.8k",              imageSrc: "http://img.b2bpic.net/free-photo/woman-model-demonstrating-winter-cloths_1303-16967.jpg",              imageAlt: "Blue denim jacket"},
            {
              id: "3",              brand: "StyleHub Sport",              name: "Premium Sneakers",              price: "$149.99",              rating: 5,
              reviewCount: "3.2k",              imageSrc: "http://img.b2bpic.net/free-photo/shoes-sand_23-2147647050.jpg",              imageAlt: "Premium sneakers"},
            {
              id: "4",              brand: "StyleHub Couture",              name: "Elegant Evening Dress",              price: "$199.99",              rating: 5,
              reviewCount: "1.5k",              imageSrc: "http://img.b2bpic.net/free-photo/attractive-woman-evening-dress-combing-hair_176420-17845.jpg",              imageAlt: "Elegant evening dress"},
            {
              id: "5",              brand: "StyleHub Comfort",              name: "Cozy Knit Sweater",              price: "$79.99",              rating: 5,
              reviewCount: "2.9k",              imageSrc: "http://img.b2bpic.net/free-photo/close-up-sensual-blond-girl-knitted-sweater-emotionally-posing-outdoor_574295-4018.jpg",              imageAlt: "Cozy knit sweater"},
            {
              id: "6",              brand: "StyleHub Classic",              name: "Dark Denim Jeans",              price: "$99.99",              rating: 5,
              reviewCount: "2.1k",              imageSrc: "http://img.b2bpic.net/free-photo/spring-wardrobe-switch-top-view_23-2150264140.jpg",              imageAlt: "Dark denim jeans"},
          ]}
        />
      </div>

      <div id="social-proof" data-section="social-proof">
        <SocialProofOne
          title="Trusted by Millions"
          description="Leading brands and fashion influencers choose StyleHub for quality and style"
          tag="Partners"
          tagIcon={Star}
          textboxLayout="default"
          useInvertedBackground={false}
          names={[
            "StyleHub Partners",            "Premium Brands",            "Fashion Leaders",            "Quality Assurance",            "Trusted Partners",            "Industry Leaders",            "Global Brands",            "Excellence Partners"]}
          logos={[
            "http://img.b2bpic.net/free-vector/collection-abstract-lineal-logo_23-2148457951.jpg",            "http://img.b2bpic.net/free-vector/retro-logo-collection_23-2148445976.jpg",            "http://img.b2bpic.net/free-vector/geometric-harmony-hills-private-school-logo-template_742173-18879.jpg",            "http://img.b2bpic.net/free-vector/flat-design-outlet-stamp-collection_23-2149753026.jpg",            "http://img.b2bpic.net/free-vector/flat-design-fashion-accessories-logo-set_23-2148888960.jpg",            "http://img.b2bpic.net/free-vector/health-store-logo-design_23-2148472971.jpg",            "http://img.b2bpic.net/free-vector/geometric-harmony-hills-private-school-logo-template_742173-18879.jpg",            "http://img.b2bpic.net/free-vector/retro-logo-collection_23-2148445976.jpg"]}
          speed={40}
          showCard={true}
        />
      </div>

      <div id="about" data-section="about">
        <TextSplitAbout
          title="About StyleHub"
          description={[
            "StyleHub is your destination for premium fashion and quality apparel. Since 2015, we've been committed to bringing you the finest selection of clothing that combines style, comfort, and sustainability.",            "Our mission is to make high-quality fashion accessible to everyone. We carefully curate every piece in our collection to ensure exceptional quality, timeless style, and excellent value for our customers worldwide."]}
          buttons={[
            { text: "Learn Our Story", href: "/about" },
            { text: "View Sustainability", href: "#" },
          ]}
          showBorder={true}
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSix
          title="Customer Love"
          description="Hear what our satisfied customers say about their StyleHub shopping experience"
          tag="Reviews"
          tagIcon={Heart}
          textboxLayout="default"
          useInvertedBackground={false}
          animationType="slide-up"
          testimonials={[
            {
              id: "1",              name: "Sarah Johnson",              handle: "@sarahj_style",              testimonial: "StyleHub has completely transformed my wardrobe! The quality is exceptional and the prices are unbeatable. Highly recommended for anyone serious about fashion.",              imageSrc: "http://img.b2bpic.net/free-photo/positive-confident-businesswoman-wearing-formal-suit-standing-with-arms-folded_74855-10328.jpg",              imageAlt: "Sarah Johnson"},
            {
              id: "2",              name: "Michael Chen",              handle: "@m_chen_looks",              testimonial: "Best shopping experience ever. Fast delivery, great customer service, and the clothing fits perfectly. I'm now a loyal StyleHub customer!",              imageSrc: "http://img.b2bpic.net/free-photo/close-up-portrait-young-handsome-successful-man_1163-5475.jpg",              imageAlt: "Michael Chen"},
            {
              id: "3",              name: "Emily Rodriguez",              handle: "@emily_fashion",              testimonial: "Love the diversity of styles available at StyleHub. From casual to formal, there's something for everyone. Quality is consistently excellent!",              imageSrc: "http://img.b2bpic.net/free-photo/positive-confident-businesswoman-wearing-formal-suit-standing-with-arms-folded_74855-10328.jpg",              imageAlt: "Emily Rodriguez"},
            {
              id: "4",              name: "David Kim",              handle: "@davidkim_style",              testimonial: "StyleHub offers premium quality at reasonable prices. Their collection is always fresh and on-trend. This is my go-to place for shopping!",              imageSrc: "http://img.b2bpic.net/free-photo/close-up-portrait-young-handsome-successful-man_1163-5475.jpg",              imageAlt: "David Kim"},
            {
              id: "5",              name: "Jessica Martinez",              handle: "@jess_vibe",              testimonial: "Amazing customer service and fantastic products! The attention to detail in every piece is remarkable. StyleHub is my favorite fashion destination.",              imageSrc: "http://img.b2bpic.net/free-photo/positive-confident-businesswoman-wearing-formal-suit-standing-with-arms-folded_74855-10328.jpg",              imageAlt: "Jessica Martinez"},
            {
              id: "6",              name: "Amanda Brooks",              handle: "@amandab_style",              testimonial: "I've been shopping with StyleHub for two years now. Consistently excellent quality, great prices, and they always go above and beyond for customers!",              imageSrc: "http://img.b2bpic.net/free-photo/positive-confident-businesswoman-wearing-formal-suit-standing-with-arms-folded_74855-10328.jpg",              imageAlt: "Amanda Brooks"},
          ]}
          speed={40}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterLogoReveal
          logoText="StyleHub"
          leftLink={{ text: "Privacy Policy", href: "#privacy" }}
          rightLink={{ text: "Terms of Service", href: "#terms" }}
        />
      </div>
    </ThemeProvider>
  );
}