"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingOverlay from '@/components/navbar/NavbarLayoutFloatingOverlay/NavbarLayoutFloatingOverlay';
import Link from "next/link";
import MediaAbout from '@/components/sections/about/MediaAbout';

interface FooterProps {
  brandName?: string;
  navItems: Array<{ name: string; href: string; }>;
}

const Footer: React.FC<FooterProps> = ({ brandName = "Nexsoft Australia", navItems }) => {
  return (
    <footer className="w-full py-8 bg-card text-foreground border-t border-accent mt-16">
      <div className="mx-auto px-4 md:px-6 max-w-7xl flex flex-col md:flex-row justify-between items-center gap-4">
        <div className="text-lg font-bold">
          {brandName}
        </div>
        <nav className="flex flex-wrap justify-center gap-6">
          {navItems.map((item) => (
            <Link key={item.href} href={item.href} className="text-foreground hover:text-primary-cta">
              {item.name}
            </Link>
          ))}
        </nav>
        <div className="text-sm text-foreground/80">
          © {new Date().getFullYear()} {brandName}. All rights reserved.
        </div>
      </div>
    </footer>
  );
};

export default function AboutPage() {
  const navItems = [
    {name: "Home", id: "home", href: "/"},
    {name: "About us", id: "about-us", href: "/about"},
    {name: "Services", id: "services", href: "/services"},
    {name: "Products", id: "products", href: "/products"},
    {name: "Achievements", id: "achievements", href: "/portfolio"},
    {name: "News", id: "news", href: "/portfolio"},
    {name: "Contact us", id: "contact-us", href: "/contact"}
  ];

  const navbarProps = {
    brandName: "Nexsoft Australia",    navItems: navItems,
    button: {text: "Get a Quote", href: "/contact"}
  };

  return (
    <ThemeProvider
      defaultButtonVariant="hover-magnetic"
      defaultTextAnimation="background-highlight"
      borderRadius="soft"
      contentWidth="medium"
      sizing="largeSmall"
      background="blurBottom"
      cardStyle="gradient-radial"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="normal"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay {...navbarProps} />
      </div>

      <main>
        <div id="about-section" data-section="about-section">
          <MediaAbout
            title="Dedicated to Innovation and Excellence"
            description="At Nexsoft Australia, we are a passionate team committed to transforming ideas into cutting-edge software solutions. With years of experience and a deep understanding of modern technology trends, we empower businesses to achieve their goals through robust, scalable, and user-friendly applications. Our focus is on delivering exceptional value and fostering long-term partnerships."
            imageSrc="https://picsum.photos/seed/aboutcompany/1920/1080?_wi=1"
            imageAlt="Team collaborating"
            useInvertedBackground={false}
            ariaLabel="About Our Company Section"
          />
        </div>
      </main>

      <Footer brandName="Nexsoft Australia" navItems={navItems} />
    </ThemeProvider>
  );
}