"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import Link from "next/link";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import FeatureCardThree from '@/components/sections/feature/featureCardThree/FeatureCardThree';
import FooterMedia from '@/components/sections/footer/FooterMedia';

export default function PerformancePage() {
  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="background-highlight"
      borderRadius="pill"
      contentWidth="medium"
      sizing="largeSmall"
      background="radialGradient"
      cardStyle="glass-elevated"
      primaryButtonStyle="inset-glow"
      secondaryButtonStyle="glass"
      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-purple-600"
        />
      </div>

      <div id="performance" data-section="performance">
        <FeatureCardThree
          title="Performance Verified"
          description="Full measurement suite with disclosed test conditions, anechoic + in-room data, and downloadable reports for every system"
          features={[
            {
              id: "freq-response",              title: "Frequency Response",              description: "Toggle between anechoic free-field and in-room compensated curves. All measurements at 1 meter reference distance.",              imageSrc: "https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=800&q=80",              imageAlt: "Frequency response measurement graph"
            },
            {
              id: "distortion",              title: "Distortion vs. Volume",              description: "Harmonic and intermodulation distortion tracked across full SPL range with linearity assurance.",              imageSrc: "https://images.unsplash.com/photo-1487180144351-b8472da7d491?w=800&q=80",              imageAlt: "Distortion measurement data"
            },
            {
              id: "directivity",              title: "Directivity Pattern",              description: "Polar plots at octave intervals showing controlled dispersion and off-axis response stability.",              imageSrc: "https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=800&q=80",              imageAlt: "Directivity polar pattern visualization"
            },
            {
              id: "impulse",              title: "Impulse Response",              description: "Time-domain capture revealing phase alignment, group delay, and transient fidelity across spectrum.",              imageSrc: "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=800&q=80",              imageAlt: "Impulse response waveform"
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="noInvert"
          gridVariant="bento-grid"
        />
      </div>

      <div id="internals" data-section="internals">
        <FeatureCardThree
          title="Exposed Architecture"
          description="Every component has a job. No decorative design. Hover to reveal engineering notes."
          features={[
            {
              id: "driver-array",              title: "Driver Array",              description: "Precision-matched transducers with controlled crossover and phase alignment for flat, coherent output.",              imageSrc: "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=800&q=80",              imageAlt: "Driver array internal structure"
            },
            {
              id: "chamber",              title: "Acoustic Chamber",              description: "Sealed or ported geometry optimized for low-frequency extension and transient accuracy without coloration.",              imageSrc: "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=800&q=80",              imageAlt: "Acoustic chamber design"
            },
            {
              id: "dsp",              title: "DSP Module",              description: "Real-time processing for room correction, phase alignment, and adaptive EQ. Firmware updateable.",              imageSrc: "https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=800&q=80",              imageAlt: "DSP processing module"
            },
            {
              id: "isolation",              title: "Isolation + Damping",              description: "Decoupled mounting and internal bracing suppress resonance and panel modes for clean, detailed imaging.",              imageSrc: "https://images.unsplash.com/photo-1470225620780-dba8ba36b745?w=800&q=80",              imageAlt: "Isolation and damping materials"
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="invertDefault"
          gridVariant="bento-grid-inverted"
        />
      </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>
  );
}
