"use client";

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

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 PortfolioPage() {
  const navItems = [
    {name: "Home", id: "home", href: "/"},
    {name: "About us", id: "about", href: "/about"},
    {name: "Products", id: "products", href: "/products"},
    {name: "Achievements", id: "achievements", href: "/portfolio"},
    {name: "News", id: "news", href: "/portfolio"},
    {name: "Contact us", id: "contact", 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 className="min-h-[calc(100vh-16rem)] flex flex-col items-center justify-center p-8 bg-background">
        <h1 className="text-4xl md:text-6xl font-bold text-center mb-8 text-foreground">Our Portfolio</h1>
        <p className="text-lg text-center max-w-3xl text-foreground/80">
          Explore a selection of our recent projects and client success stories.
        </p>
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mt-12 w-full max-w-6xl">
          <div className="bg-card p-6 rounded-lg shadow-lg border border-accent">
            <h3 className="text-xl font-semibold mb-2 text-foreground">Project Alpha</h3>
            <p className="text-foreground/80">A cutting-edge web application for data visualization.</p>
          </div>
          <div className="bg-card p-6 rounded-lg shadow-lg border border-accent">
            <h3 className="text-xl font-semibold mb-2 text-foreground">Project Beta</h3>
            <p className="text-foreground/80">Mobile app development for a leading e-commerce brand.</p>
          </div>
          <div className="bg-card p-6 rounded-lg shadow-lg border border-accent">
            <h3 className="text-xl font-semibold mb-2 text-foreground">Project Gamma</h3>
            <p className="text-foreground/80">Enterprise-level CRM system integration and customization.</p>
          </div>
          <div className="bg-card p-6 rounded-lg shadow-lg border border-accent">
            <h3 className="text-xl font-semibold mb-2 text-foreground">Project Delta</h3>
            <p className="text-foreground/80">Cloud infrastructure migration and optimization.</p>
          </div>
          <div className="bg-card p-6 rounded-lg shadow-lg border border-accent">
            <h3 className="text-xl font-semibold mb-2 text-foreground">Project Epsilon</h3>
            <p className="text-foreground/80">AI-powered analytics platform development.</p>
          </div>
          <div className="bg-card p-6 rounded-lg shadow-lg border border-accent">
            <h3 className="text-xl font-semibold mb-2 text-foreground">Project Zeta</h3>
            <p className="text-foreground/80">Custom blockchain solution for secure transactions.</p>
          </div>
        </div>
      </main>
      <Footer brandName="Nexsoft Australia" navItems={navItems} />
    </ThemeProvider>
  );
}
