"use client";

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

export default function ServiceAreasPage() {
  const navItems = [
    { name: "Home", id: "/" },
    { name: "Services", id: "/services" },
    { name: "Service Areas", id: "/service-areas" },
    { name: "About", id: "/about" },
    { name: "Contact", id: "/contact" },
  ];

  const handleNavClick = (id: string) => {
    if (id.startsWith("/")) {
      window.location.href = id;
    }
  };

  return (
    <ThemeProvider
      defaultButtonVariant="directional-hover"
      defaultTextAnimation="entrance-slide"
      borderRadius="soft"
      contentWidth="mediumLarge"
      sizing="large"
      background="none"
      cardStyle="layered-gradient"
      primaryButtonStyle="diagonal-gradient"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="medium"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingOverlay
          brandName="ProServe"
          navItems={navItems}
          button={{
            text: "Get a Quote",
            href: "/contact",
          }}
        />
      </div>

      <div id="service-areas-hero" data-section="service-areas-hero">
        <HeroSplit
          title="We're Here for You"
          description="ProServe proudly serves the greater metro area and surrounding communities within a 30-mile radius. Our expert technicians are ready to help with HVAC, plumbing, and electrical services wherever you are located."
          background={{ variant: "plain" }}
          tag="Local Coverage"
          buttons={[
            { text: "Check Your Area", href: "/contact" },
            { text: "Call for Availability", href: "tel:+15551234567" },
          ]}
          imageSrc="http://img.b2bpic.net/free-photo/woman-inviting-man-house-with-tools_259150-58291.jpg"
          imageAlt="Service area coverage map"
          mediaAnimation="opacity"
          imagePosition="right"
        />
      </div>

      <div id="coverage-details" data-section="coverage-details">
        <MediaAbout
          title="Coverage Area Details"
          description="We maintain multiple service stations and technician dispatch centers throughout the region to ensure rapid response times. Our 30-mile service radius includes major metropolitan areas and surrounding neighborhoods. Contact us directly to verify that your address is within our service area."
          tag="Service Coverage"
          imageSrc="http://img.b2bpic.net/free-photo/builder-man-wearing-construction-uniform-standing-with-arms-crossed-with-confident-smile-isolated-orange-wall_141793-14478.jpg"
          imageAlt="Service area map and locations"
          buttons={[{ text: "Confirm Your Location", href: "/contact" }]}
          useInvertedBackground={false}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          imageSrc="http://img.b2bpic.net/free-vector/dark-polygonal-background_23-2148122780.jpg"
          imageAlt="Professional services background"
          logoText="ProServe"
          copyrightText="© 2025 ProServe. All rights reserved. | Licensed & Insured"
          columns={[
            {
              title: "Services",
              items: [
                { label: "HVAC Services", href: "/services" },
                { label: "Plumbing Solutions", href: "/services" },
                { label: "Electrical Work", href: "/services" },
                { label: "Emergency Service", href: "/contact" },
              ],
            },
            {
              title: "Company",
              items: [
                { label: "About Us", href: "/about" },
                { label: "Service Areas", href: "/service-areas" },
                { label: "Contact", href: "/contact" },
                { label: "Reviews", href: "/" },
              ],
            },
            {
              title: "Legal",
              items: [
                { label: "Privacy Policy", href: "/" },
                { label: "Terms of Service", href: "/" },
                { label: "License Information", href: "/" },
                { label: "Insurance Verification", href: "/" },
              ],
            },
          ]}
        />
      </div>
    </ThemeProvider>
  );
}