"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
import HeroBillboardGallery from '@/components/sections/hero/HeroBillboardGallery';
import TestimonialCardFifteen from '@/components/sections/testimonial/TestimonialCardFifteen';
import FooterCard from '@/components/sections/footer/FooterCard';
import { Sparkles, Instagram, Facebook, Mail } from "lucide-react";
import Link from "next/link";

export default function HomePage() {
  // Navigation logic for current page
  const navItems = [
    { name: "Home", id: "/" },
    { name: "Products", id: "/products" },
    { name: "About", id: "/about" },
    { name: "FAQ", id: "/faq" },
    { name: "Contact", id: "/contact" }
  ];

  const processedNavItems = navItems.map(item => {
    if (item.id === "/") {
      return { name: item.name, id: "hero" }; // scroll to hero section on current page
    }
    return item; // external page routes
  });

  return (
    <ThemeProvider
      defaultButtonVariant="hover-magnetic"
      defaultTextAnimation="reveal-blur"
      borderRadius="pill"
      contentWidth="compact"
      sizing="largeSmallSizeLargeTitles"
      background="aurora"
      cardStyle="gradient-radial"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="normal"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          navItems={processedNavItems}
          brandName="Moya Kvitka"
          bottomLeftText="Fresh Flowers Daily"
          bottomRightText="hello@moyakvitka.com"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardGallery
          title="Celebrate Life's Moments with Fresh Flowers"
          description="Discover our exquisite collection of hand-crafted floral arrangements. From romantic roses to vibrant tropicals, we bring nature's beauty to your special moments."
          tag="Premium Floristry"
          tagIcon={Sparkles}
          mediaItems={[
            {
              imageSrc: "https://img.b2bpic.net/free-photo/minimal-floral-arrangement-red-surface_58702-17285.jpg",              imageAlt: "Fresh rose bouquet arrangement"
            },
            {
              imageSrc: "https://img.b2bpic.net/free-photo/bouquet-fresh-roses-glass-vase-close-up_169016-8804.jpg",              imageAlt: "Colorful spring flowers"
            },
            {
              imageSrc: "https://img.b2bpic.net/free-photo/pink-fresh-tulips-wooden-table-top-view_169016-50656.jpg",              imageAlt: "Elegant orchid arrangement"
            },
            {
              imageSrc: "https://img.b2bpic.net/free-photo/tender-pink-roses-put-bouquet_1304-5428.jpg",              imageAlt: "Romantic peony bouquet"
            },
            {
              imageSrc: "https://img.b2bpic.net/free-photo/bouquet-fresh-roses_169016-8809.jpg",              imageAlt: "Bright sunflower arrangement"
            }
          ]}
          buttons={[
            { text: "Shop Now", href: "/products" },
            { text: "Learn More", href: "/about" }
          ]}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardFifteen
          testimonial="Moya Kvitka created the most beautiful wedding flowers I could have imagined. Every detail was perfect, and the quality was exceptional. Our guests couldn't stop complimenting the arrangements!"
          rating={5}
          author="Марія Петренко, Bride"
          avatars={[
            {
              src: "https://img.b2bpic.net/free-photo/positive-confident-businesswoman-wearing-formal-suit-standing-with-arms-folded_74855-10328.jpg",              alt: "Customer testimonial avatar 1"
            },
            {
              src: "https://img.b2bpic.net/free-photo/close-up-positive-businesswoman_1098-3531.jpg",              alt: "Customer testimonial avatar 2"
            },
            {
              src: "https://img.b2bpic.net/free-photo/close-up-good-looking-smiling-friendly-female-trainee-ready-tackle-assignments-smiling-broadly-feeling-lucky-day-work-self-assured-encouraged-achieve-success-goal-white-wall_176420-35567.jpg",              alt: "Customer testimonial avatar 3"
            },
            {
              src: "https://img.b2bpic.net/free-photo/closeup-smiling-beautiful-adult-businesswoman_1262-1760.jpg",              alt: "Customer testimonial avatar 4"
            },
            {
              src: "https://img.b2bpic.net/free-photo/confident-middle-aged-businesswoman-looking-camera_74855-4120.jpg",              alt: "Customer testimonial avatar 5"
            },
            {
              src: "https://img.b2bpic.net/free-photo/business-woman-banner-concept-with-copy-space_23-2149601533.jpg",              alt: "Customer testimonial avatar 6"
            }
          ]}
          useInvertedBackground="invertDefault"
        />
      </div>

      <FooterCard
        logoText="Moya Kvitka"
        copyrightText="© 2025 Moya Kvitka | Premium Floral Design | All rights reserved"
        socialLinks={[
          { icon: Instagram, href: "https://instagram.com/moyakvitka", ariaLabel: "Follow us on Instagram" },
          { icon: Facebook, href: "https://facebook.com/moyakvitka", ariaLabel: "Follow us on Facebook" },
          { icon: Mail, href: "mailto:hello@moyakvitka.com", ariaLabel: "Email us" }
        ]}
      />
    </ThemeProvider>
  );
}
