"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 FeatureCardSixteen from "@/components/sections/feature/FeatureCardSixteen";
import ProductCardThree from "@/components/sections/product/ProductCardThree";
import MetricCardThree from "@/components/sections/metrics/MetricCardThree";
import TestimonialCardTwelve from "@/components/sections/testimonial/TestimonialCardTwelve";
import FooterMedia from "@/components/sections/footer/FooterMedia";
import { Users, Star, CheckCircle, Award, Clock } from "lucide-react";

export default function HomePage() {
  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="hero" data-section="hero">
        <HeroSplit
          title="Professional Home Services You Can Trust"
          description="Emergency-ready HVAC, plumbing, and electrical services. Available 24/7 with certified technicians and transparent pricing. Your community's trusted service provider for over 15 years."
          background={{ variant: "plain" }}
          tag="Available 24/7"
          tagIcon={Clock}
          buttons={[
            { text: "Get a Quote Now", href: "/contact" },
            { text: "Call (555) 123-4567", href: "tel:+15551234567" },
          ]}
          imageSrc="http://img.b2bpic.net/free-photo/woman-inviting-man-house-with-tools_259150-58291.jpg"
          imageAlt="Professional technician providing trusted home services"
          mediaAnimation="opacity"
          imagePosition="right"
        />
      </div>

      <div id="about" data-section="about">
        <MediaAbout
          title="Why Choose ProServe?"
          description="We combine decades of expertise with a commitment to customer satisfaction. Every technician is licensed, insured, and background-checked. We're not just fixing problems—we're building community trust."
          tag="About Us"
          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="Our professional and certified technician team"
          buttons={[{ text: "Learn More", href: "/about" }]}
          useInvertedBackground={false}
        />
      </div>

      <div id="trust-signals" data-section="trust-signals">
        <FeatureCardSixteen
          title="What Sets Us Apart"
          description="We've earned customer trust through consistent, honest service and professional excellence."
          negativeCard={{
            items: [
              "Hidden fees and surprise charges",
              "Unlicensed or unverified technicians",
              "Long wait times with no updates",
              "No warranty on work performed",
            ],
          }}
          positiveCard={{
            items: [
              "Transparent, upfront pricing with free estimates",
              "All technicians fully licensed and background-checked",
              "Real-time appointment tracking and status updates",
              "2-year warranty on all service work",
            ],
          }}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          tag="Trust Signals"
        />
      </div>

      <div id="services" data-section="services">
        <ProductCardThree
          title="Our Core Services"
          description="Emergency and routine service for residential and commercial properties. Fast response, guaranteed satisfaction."
          products={[
            {
              id: "hvac",
              name: "HVAC Services",
              price: "Free Inspection",
              imageSrc:
                "http://img.b2bpic.net/free-photo/coworkers-refill-air-conditioner-freon_482257-90737.jpg",
              imageAlt: "Professional HVAC technician",
              initialQuantity: 1,
            },
            {
              id: "plumbing",
              name: "Plumbing Solutions",
              price: "Free Estimate",
              imageSrc:
                "http://img.b2bpic.net/free-photo/plumbing-professional-doing-his-job_23-2150721546.jpg",
              imageAlt: "Expert plumbing repair services",
              initialQuantity: 1,
            },
            {
              id: "electrical",
              name: "Electrical Work",
              price: "Free Consultation",
              imageSrc:
                "http://img.b2bpic.net/free-photo/electrician-connecting-wires-work-inside-panel-engineer-with-tool_169016-68074.jpg",
              imageAlt: "Licensed electrical technician",
              initialQuantity: 1,
            },
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardThree
          title="Trusted by Thousands"
          description="Over a decade of reliable service to the local community."
          metrics={[
            {
              id: "1",
              icon: Users,
              title: "Happy Customers",
              value: "12,500+",
            },
            { id: "2", icon: Star, title: "5-Star Reviews", value: "4,800+" },
            {
              id: "3",
              icon: CheckCircle,
              title: "Jobs Completed",
              value: "18,000+",
            },
            { id: "4", icon: Award, title: "Years of Service", value: "15+" },
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardTwelve
          cardTitle="Over 4,800 five-star reviews from satisfied homeowners who trust ProServe for their home service needs."
          cardTag="Customer Testimonials"
          testimonials={[
            {
              id: "1",
              name: "Sarah Johnson",
              imageSrc:
                "http://img.b2bpic.net/free-photo/alone-specialist-handsome-daydreaming-collar_1262-870.jpg",
              imageAlt: "Sarah Johnson, satisfied customer",
            },
            {
              id: "2",
              name: "Michael Chen",
              imageSrc:
                "http://img.b2bpic.net/free-photo/smiling-african-american-man-posing-library_74855-1619.jpg",
              imageAlt: "Michael Chen, verified customer",
            },
            {
              id: "3",
              name: "Emily Rodriguez",
              imageSrc:
                "http://img.b2bpic.net/free-photo/smiling-young-businessman-suit-looking-camera-meeting_1163-4654.jpg",
              imageAlt: "Emily Rodriguez, happy homeowner",
            },
            {
              id: "4",
              name: "David Kim",
              imageSrc:
                "http://img.b2bpic.net/free-photo/smiling-man-sitting-cafe-table-gesturing_1262-1141.jpg",
              imageAlt: "David Kim, trusted customer",
            },
            {
              id: "5",
              name: "Jessica Martinez",
              imageSrc:
                "http://img.b2bpic.net/free-photo/alone-specialist-handsome-daydreaming-collar_1262-870.jpg",
              imageAlt: "Jessica Martinez, satisfied homeowner",
            },
            {
              id: "6",
              name: "Robert Thompson",
              imageSrc:
                "http://img.b2bpic.net/free-photo/smiling-african-american-man-posing-library_74855-1619.jpg",
              imageAlt: "Robert Thompson, verified customer",
            },
          ]}
          cardAnimation="slide-up"
          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>
  );
}