"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import HeroBillboardRotatedCarousel from '@/components/sections/hero/HeroBillboardRotatedCarousel';
import MetricCardEleven from '@/components/sections/metrics/MetricCardEleven';
import FooterMedia from '@/components/sections/footer/FooterMedia';
import { Zap, Code2, Rocket, Cpu } from "lucide-react";

export default function HomePage() {
  return (
    <ThemeProvider
      defaultButtonVariant="bounce-effect"
      defaultTextAnimation="entrance-slide"
      borderRadius="rounded"
      contentWidth="mediumLarge"
      sizing="mediumLargeSizeLargeTitles"
      background="circleGradient"
      cardStyle="gradient-mesh"
      primaryButtonStyle="radial-glow"
      secondaryButtonStyle="layered"
      headingFontWeight="bold"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          brandName="BASE"
          navItems={[
            { name: "Systems", id: "/systems" },
            { name: "Performance", id: "/performance" },
            { name: "Build", id: "/build" },
            { name: "Field Tests", id: "/field-tests" },
            { name: "Support", id: "/support" }
          ]}
          button={{ text: "Shop", href: "#shop" }}
          className="backdrop-blur-lg border border-accent/40"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardRotatedCarousel
          title="REFERENCE-LEVEL OUTPUT"
          description="Engineered acoustics, controlled dispersion, and room-adaptive DSP—built like an instrument. Test conditions disclosed. All results measured."
          tag="SERIES 01"
          tagIcon={Zap}
          buttons={[
            { text: "View Systems", href: "/systems" },
            { text: "See Performance Data", href: "/performance" }
          ]}
          carouselItems={[
            {
              id: "1",              imageSrc: "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=800&q=80",              imageAlt: "BASE speaker cutaway showing internal components"
            },
            {
              id: "2",              imageSrc: "https://images.unsplash.com/photo-1514525253161-7a46d19cd819?w=800&q=80",              imageAlt: "BASE One compact nearfield monitor"
            },
            {
              id: "3",              imageSrc: "https://images.unsplash.com/photo-1459749411175-04bf5292ceea?w=800&q=80",              imageAlt: "BASE Two room reference monitor"
            },
            {
              id: "4",              imageSrc: "https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=800&q=80",              imageAlt: "BASE Studio flagship monitoring system"
            },
            {
              id: "5",              imageSrc: "https://images.unsplash.com/photo-1487180144351-b8472da7d491?w=800&q=80",              imageAlt: "Performance measurement visualization"
            },
            {
              id: "6",              imageSrc: "https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=800&q=80",              imageAlt: "Room calibration and acoustic analysis"
            }
          ]}
          autoPlay={true}
          autoPlayInterval={5000}
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardEleven
          title="Measured Output"
          description="Key specifications verified under controlled laboratory conditions"
          metrics={[
            {
              id: "1",              value: "< 0.1%",              title: "Total Harmonic Distortion",              description: "Anechoic measurement @ 1kHz",              imageSrc: "https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=800&q=80",              imageAlt: "THD measurement graph"
            },
            {
              id: "2",              value: "110 dB",              title: "Peak SPL Capability",              description: "Sustained output at rated impedance",              imageSrc: "https://images.unsplash.com/photo-1487180144351-b8472da7d491?w=800&q=80",              imageAlt: "SPL performance data"
            },
            {
              id: "3",              value: "12 ms",              title: "System Latency",              description: "Input to output via DSP processing",              imageSrc: "https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=800&q=80",              imageAlt: "DSP latency measurement"
            }
          ]}
          animationType="scale-rotate"
          textboxLayout="default"
          useInvertedBackground="invertDefault"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          imageSrc="https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=800&q=80"
          imageAlt="BASE laboratory testing environment"
          logoText="BASE"
          copyrightText="© 2025 BASE Audio Systems. All rights reserved."
          columns={[
            {
              title: "Products",              items: [
                { label: "BASE One", href: "/systems" },
                { label: "BASE Two", href: "/systems" },
                { label: "BASE Studio", href: "/systems" },
                { label: "Configurator", href: "/build" }
              ]
            },
            {
              title: "Resources",              items: [
                { label: "Measurement Reports", href: "/performance" },
                { label: "Quick Start", href: "/support" },
                { label: "Field Tests", href: "/field-tests" },
                { label: "Technical Specs", href: "/performance" }
              ]
            },
            {
              title: "Company",              items: [
                { label: "About", href: "/about" },
                { label: "Support", href: "/support" },
                { label: "Contact", href: "/contact" },
                { label: "Careers", href: "/careers" }
              ]
            }
          ]}
        />
      </div>
    </ThemeProvider>
  );
}