"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import Link from "next/link";
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 } from "lucide-react";

export default function HomePage() {
  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="background-highlight"
      borderRadius="sharp"
      contentWidth="small"
      sizing="largeSmall"
      background="none"
      cardStyle="elevated"
      primaryButtonStyle="flat"
      secondaryButtonStyle="layered"
      headingFontWeight="extrabold"
    >
      <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-md border border-gray-300"
        />
      </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://img.b2bpic.net/free-photo/square-music-speaker-closeup-interior-room_169016-51647.jpg",
              imageAlt: "BASE speaker cutaway showing internal components"
            },
            {
              id: "2",
              imageSrc: "https://img.b2bpic.net/free-photo/square-music-speaker-control-knobs-closeup-details_169016-51505.jpg",
              imageAlt: "BASE One compact nearfield monitor"
            },
            {
              id: "3",
              imageSrc: "https://img.b2bpic.net/free-photo/audio-columns-are-system-several-pieces-close-up-audio-systems_78492-3673.jpg",
              imageAlt: "BASE Two room reference monitor"
            },
            {
              id: "4",
              imageSrc: "https://img.b2bpic.net/free-photo/crop-amplifier-black_23-2147781794.jpg",
              imageAlt: "BASE Studio flagship monitoring system"
            },
            {
              id: "5",
              imageSrc: "https://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "Performance measurement visualization"
            },
            {
              id: "6",
              imageSrc: "https://img.b2bpic.net/free-photo/working-process-polygraph-examiner-office-with-his-lie-detector-s-equipment_146671-17304.jpg",
              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://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "THD measurement graph"
            },
            {
              id: "2",
              value: "110 dB",
              title: "Peak SPL Capability",
              description: "Sustained output at rated impedance",
              imageSrc: "https://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "SPL performance data"
            },
            {
              id: "3",
              value: "12 ms",
              title: "System Latency",
              description: "Input to output via DSP processing",
              imageSrc: "https://img.b2bpic.net/free-photo/press-reporter-fallowing-leads-case_23-2149579707.jpg",
              imageAlt: "DSP latency measurement"
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="invertDefault"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          imageSrc="https://img.b2bpic.net/free-photo/press-reporter-fallowing-leads-case_23-2149579709.jpg"
          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>
  );
}