"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 ProductCardThree from "@/components/sections/product/ProductCardThree";
import FaqBase from "@/components/sections/faq/FaqBase";
import FooterMedia from "@/components/sections/footer/FooterMedia";

export default function ServicesPage() {
  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="services-hero" data-section="services-hero">
        <HeroSplit
          title="Our Professional Services"
          description="We provide comprehensive HVAC, plumbing, and electrical solutions for residential and commercial properties. Each service is backed by our 2-year guarantee and performed by certified, licensed technicians."
          background={{ variant: "plain" }}
          tag="Complete Solutions"
          buttons={[
            { text: "Request Free Estimate", href: "/contact" },
            { text: "Emergency Service", href: "tel:+15551234567" },
          ]}
          imageSrc="http://img.b2bpic.net/free-photo/coworkers-refill-air-conditioner-freon_482257-90737.jpg"
          imageAlt="Professional service team at work"
          mediaAnimation="opacity"
          imagePosition="right"
        />
      </div>

      <div id="detailed-services" data-section="detailed-services">
        <ProductCardThree
          title="Service Offerings"
          description="From routine maintenance to emergency repairs, we handle all your home service needs with professionalism and care."
          products={[
            {
              id: "hvac-detail",
              name: "HVAC Services",
              price: "Starting at Free Inspection",
              imageSrc:
                "http://img.b2bpic.net/free-photo/coworkers-refill-air-conditioner-freon_482257-90737.jpg",
              imageAlt: "HVAC installation and repair",
              initialQuantity: 1,
            },
            {
              id: "plumbing-detail",
              name: "Plumbing Solutions",
              price: "Starting at Free Estimate",
              imageSrc:
                "http://img.b2bpic.net/free-photo/plumbing-professional-doing-his-job_23-2150721546.jpg",
              imageAlt: "Professional plumbing services",
              initialQuantity: 1,
            },
            {
              id: "electrical-detail",
              name: "Electrical Work",
              price: "Starting at Free Consultation",
              imageSrc:
                "http://img.b2bpic.net/free-photo/electrician-connecting-wires-work-inside-panel-engineer-with-tool_169016-68074.jpg",
              imageAlt: "Expert electrical services",
              initialQuantity: 1,
            },
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="services-faq" data-section="services-faq">
        <FaqBase
          title="Service FAQs"
          description="Get answers to common questions about our services and what to expect when you work with ProServe."
          faqs={[
            {
              id: "1",
              title: "What services do you offer?",
              content:
                "We specialize in HVAC, plumbing, and electrical services for residential and commercial properties. Services include installation, repair, maintenance, and emergency response available 24/7.",
            },
            {
              id: "2",
              title: "Are emergency services available?",
              content:
                "Yes, we offer 24/7 emergency services. Emergency calls outside regular business hours may incur additional fees, but we guarantee fast response times and professional solutions.",
            },
            {
              id: "3",
              title: "What's included in your warranty?",
              content:
                "All service work is backed by our comprehensive 2-year warranty. This covers parts and labor for any issues related to our work. Full warranty details will be provided at the time of service.",
            },
            {
              id: "4",
              title: "Do you serve commercial properties?",
              content:
                "Absolutely! We provide professional services for both residential and commercial clients. Contact us for commercial rates and availability.",
            },
            {
              id: "5",
              title: "How can I schedule a service?",
              content:
                "You can request a free estimate through our online form, call us at (555) 123-4567, or use our booking system. We'll confirm your appointment and provide real-time tracking.",
            },
            {
              id: "6",
              title: "What payment methods do you accept?",
              content:
                "We accept all major credit cards, cash, checks, and offer flexible financing options for larger projects. Ask about our financing plans during your consultation.",
            },
          ]}
          textboxLayout="default"
          useInvertedBackground={false}
          faqsAnimation="slide-up"
        />
      </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>
  );
}