"use client";

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

export default function PerformancePage() {
  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="performance" data-section="performance">
        <FeatureCardMedia
          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.",
              tag: "Measured",
              imageSrc: "https://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "Frequency response measurement graph"
            },
            {
              id: "distortion",
              title: "Distortion vs. Volume",
              description: "Harmonic and intermodulation distortion tracked across full SPL range with linearity assurance.",
              tag: "Verified",
              imageSrc: "https://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "Distortion measurement data"
            },
            {
              id: "directivity",
              title: "Directivity Pattern",
              description: "Polar plots at octave intervals showing controlled dispersion and off-axis response stability.",
              tag: "Measured",
              imageSrc: "https://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "Directivity polar pattern visualization"
            },
            {
              id: "impulse",
              title: "Impulse Response",
              description: "Time-domain capture revealing phase alignment, group delay, and transient fidelity across spectrum.",
              tag: "Verified",
              imageSrc: "https://img.b2bpic.net/free-vector/ilustration-growth-business-percentage-template_23-2148271410.jpg",
              imageAlt: "Impulse response waveform"
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="internals" data-section="internals">
        <FeatureCardMedia
          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.",
              tag: "Core",
              imageSrc: "https://img.b2bpic.net/free-photo/square-music-speaker-closeup-interior-room_169016-51647.jpg",
              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.",
              tag: "Acoustic",
              imageSrc: "https://img.b2bpic.net/free-photo/square-music-speaker-closeup-interior-room_169016-51647.jpg",
              imageAlt: "Acoustic chamber design"
            },
            {
              id: "dsp",
              title: "DSP Module",
              description: "Real-time processing for room correction, phase alignment, and adaptive EQ. Firmware updateable.",
              tag: "Digital",
              imageSrc: "https://img.b2bpic.net/free-photo/press-reporter-fallowing-leads-case_23-2149579707.jpg",
              imageAlt: "DSP processing module"
            },
            {
              id: "isolation",
              title: "Isolation + Damping",
              description: "Decoupled mounting and internal bracing suppress resonance and panel modes for clean, detailed imaging.",
              tag: "Structure",
              imageSrc: "https://img.b2bpic.net/free-photo/square-music-speaker-closeup-interior-room_169016-51647.jpg",
              imageAlt: "Isolation and damping materials"
            }
          ]}
          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>
  );
}