"use client";

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

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 ServicesPage() {
  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="services-section" data-section="services-section">
          <FeatureCardTwentyFour
            title="Our Comprehensive Services"
            description="We offer a wide array of professional services tailored to meet your unique business requirements. From initial concept to deployment and ongoing support, we're with you every step of the way."
            animationType="slide-up"
            textboxLayout="default"
            useInvertedBackground={false}
            ariaLabel="Our Services Section"
            features={[
              {
                id: "web-development",                title: "Web Development",                author: "Our Team",                description: "Modern, responsive websites and web applications tailored to your business needs.",                tags: ["Frontend", "Backend", "Full-Stack"],
                imageSrc: "https://picsum.photos/seed/webdev/800/600?_wi=1",                imageAlt: "Web Development"
              },
              {
                id: "mobile-app-development",                title: "Mobile App Development",                author: "Our Team",                description: "Custom iOS and Android applications designed for exceptional user experience and performance.",                tags: ["iOS", "Android", "Cross-Platform"],
                imageSrc: "https://picsum.photos/seed/mobileapp/800/600?_wi=1",                imageAlt: "Mobile App Development"
              },
              {
                id: "cloud-solutions",                title: "Cloud Solutions",                author: "Our Team",                description: "Scalable and secure cloud infrastructure, migration, and management services.",                tags: ["AWS", "Azure", "GCP"],
                imageSrc: "https://picsum.photos/seed/cloud/800/600?_wi=1",                imageAlt: "Cloud Solutions"
              },
              {
                id: "ai-ml",                title: "AI & Machine Learning",                author: "Our Team",                description: "Harnessing data for intelligent insights, automation, and predictive analytics.",                tags: ["Data Science", "Automation", "Predictive"],
                imageSrc: "https://picsum.photos/seed/ai/800/600?_wi=1",                imageAlt: "AI & Machine Learning"
              }
            ]}
          />
        </div>
      </main>

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