"use client";

import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
import HeroOverlay from '@/components/sections/hero/HeroOverlay';
import FeatureCardEight from '@/components/sections/feature/FeatureCardEight';
import MetricCardOne from '@/components/sections/metrics/MetricCardOne';
import TestimonialCardTen from '@/components/sections/testimonial/TestimonialCardTen';
import TestimonialAboutCard from '@/components/sections/about/TestimonialAboutCard';
import FaqBase from '@/components/sections/faq/FaqBase';
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
import FooterSimple from '@/components/sections/footer/FooterSimple';
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import { Star, Wrench, TrendingUp, Clock, Shield, DollarSign, MessageCircle, Building2, Heart, HelpCircle } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="entrance-slide"
      borderRadius="pill"
      contentWidth="mediumSmall"
      sizing="mediumLarge"
      background="none"
      cardStyle="soft-shadow"
      primaryButtonStyle="inset-glow"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="light"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingInline
          brandName="Mai Plumbing"
          navItems={[
            { name: "Services", id: "services" },
            { name: "Reviews", id: "testimonials" },
            { name: "About", id: "about" },
            { name: "FAQ", id: "faq" }
          ]}
          button={{ text: "Call Now", href: "tel:+12148781062" }}
          className="shadow-lg"
          navItemClassName="text-sm font-medium"
          buttonClassName="px-6 py-2 font-semibold"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroOverlay
          title="Dallas's Trusted Plumbing Experts"
          description="Fast, Fair, and Professional. Emergency plumbing, water heaters, leak detection, and more. Licensed, insured, and ready to serve you."
          tag="4.8★ Rated • 62 Reviews"
          tagIcon={Star}
          imageSrc="https://img.b2bpic.net/free-photo/female-plumber-working-fix-problems-client-s-house_23-2150990725.jpg"
          imageAlt="Professional plumbing expert at work"
          textPosition="bottom-left"
          showBlur={true}
          showDimOverlay={false}
          buttons={[
            { text: "Call Now: (214) 878-1062", href: "tel:+12148781062" },
            { text: "Get a Free Estimate", href: "#contact" }
          ]}
          className="min-h-screen"
          titleClassName="text-5xl md:text-6xl font-light"
          descriptionClassName="text-lg md:text-xl font-light opacity-90"
          tagClassName="text-sm font-semibold"
        />
      </div>

      <div id="services" data-section="services">
        <FeatureCardEight
          title="Our Services"
          description="Comprehensive plumbing solutions for Dallas homeowners. From emergencies to routine maintenance, we handle it all."
          tag="What We Do"
          tagIcon={Wrench}
          features={[
            {
              id: 1,
              title: "Emergency Plumbing",              description: "24/7 emergency response for burst pipes, major leaks, and urgent plumbing failures. Fast arrival times guaranteed.",              imageSrc: "https://img.b2bpic.net/free-photo/service-maintenance-worker-repairing_23-2149176719.jpg",              imageAlt: "Emergency plumbing repair"
            },
            {
              id: 2,
              title: "Water Heater Service",              description: "Expert repair and installation of water heaters. We handle maintenance, repairs, and full replacements for all brands.",              imageSrc: "https://img.b2bpic.net/free-photo/man-fixing-kitchen-sink_53876-13430.jpg",              imageAlt: "Water heater installation and repair"
            },
            {
              id: 3,
              title: "Leak Detection",              description: "Advanced leak detection technology to find hidden leaks before they cause major damage. Accurate diagnostics save you money.",              imageSrc: "https://img.b2bpic.net/free-photo/shocked-woman-calling-plumber-while-collecting-water-leaking-from-ceiling-using-utensil_657921-1199.jpg",              imageAlt: "Professional leak detection service"
            },
            {
              id: 4,
              title: "Drain Cleaning & Repair",              description: "Professional drain cleaning, pipe repair, and replacement. We solve clogs and damaged pipes quickly and efficiently.",              imageSrc: "https://img.b2bpic.net/free-photo/male-worker-operating-machinery-factory_107420-96043.jpg",              imageAlt: "Drain cleaning service"
            }
          ]}
          textboxLayout="default"
          useInvertedBackground="noInvert"
          cardTitleClassName="text-4xl md:text-5xl font-light"
          cardDescriptionClassName="text-lg opacity-80"
        />
      </div>

      <div id="metrics" data-section="metrics">
        <MetricCardOne
          title="Why Choose Mai Plumbing"
          description="Proven track record of excellence serving Dallas residents since our founding."
          tag="By The Numbers"
          tagIcon={TrendingUp}
          metrics={[
            {
              id: "1",              value: "4.8",              title: "★ Rating",              description: "Trusted by 62+ verified customers on Google and Yelp",              icon: Star
            },
            {
              id: "2",              value: "24/7",              title: "Emergency Service",              description: "Available around the clock for urgent plumbing needs",              icon: Clock
            },
            {
              id: "3",              value: "100%",              title: "Licensed & Insured",              description: "Full credentials and protection for peace of mind",              icon: Shield
            },
            {
              id: "4",              value: "$0",              title: "Service Call Fee",              description: "Free diagnosis and estimates on all plumbing work",              icon: DollarSign
            }
          ]}
          gridVariant="four-items-2x2-equal-grid"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="invertDefault"
          titleClassName="text-2xl font-light"
          descriptionClassName="text-base opacity-70"
          valueClassName="text-6xl font-light bg-gradient-to-r from-primary-cta to-accent bg-clip-text text-transparent"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardTen
          title="What Our Customers Say"
          description="Real reviews from real Dallas homeowners who trust Mai Plumbing for their most important home services."
          tag="Customer Testimonials"
          tagIcon={MessageCircle}
          textboxLayout="default"
          useInvertedBackground="noInvert"
          testimonials={[
            {
              id: "1",              title: "Fastest Response Time in Dallas",              quote: "Had a burst pipe at midnight. Mai Plumbing arrived in 30 minutes and fixed it professionally. Couldn't ask for better service.",              name: "Robert Martinez",              role: "Homeowner",              imageSrc: "https://img.b2bpic.net/free-photo/close-up-portrait-young-handsome-successful-man_1163-5475.jpg",              imageAlt: "Robert Martinez testimonial"
            },
            {
              id: "2",              title: "Honest Pricing, No Hidden Fees",              quote: "They quoted fair prices upfront and didn't try to upsell me on unnecessary work. Real professionals who care about customers.",              name: "Sarah Chen",              role: "Homeowner",              imageSrc: "https://img.b2bpic.net/free-photo/pensive-person-alone-corridor-serious_1262-1042.jpg",              imageAlt: "Sarah Chen testimonial"
            },
            {
              id: "3",              title: "Water Heater Installation - Perfect Job",              quote: "Our old water heater gave out and Mai Plumbing installed a new one the next day. Clean work, great communication.",              name: "James Wilson",              role: "Homeowner",              imageSrc: "https://img.b2bpic.net/free-photo/happy-businessman-smiling-camera_1163-4660.jpg",              imageAlt: "James Wilson testimonial"
            },
            {
              id: "4",              title: "Found Our Hidden Leak Quickly",              quote: "Advanced leak detection saved us thousands. They identified an issue in the wall we never would have found.",              name: "Michelle Lee",              role: "Homeowner",              imageSrc: "https://img.b2bpic.net/free-photo/portrait-businessman-conference-room-thinking-about-future_482257-25787.jpg",              imageAlt: "Michelle Lee testimonial"
            },
            {
              id: "5",              title: "Professional and Courteous Team",              quote: "From first call to final inspection, they treated us like family. Highly recommend Mai Plumbing to everyone.",              name: "David Thompson",              role: "Homeowner",              imageSrc: "https://img.b2bpic.net/free-photo/portrait-smiley-business-man_23-2148514859.jpg",              imageAlt: "David Thompson testimonial"
            },
            {
              id: "6",              title: "Drain Problem Solved for Good",              quote: "Persistent drain issues resolved with permanent solution. No more temporary fixes. Exceptional craftsmanship.",              name: "Jessica Garcia",              role: "Homeowner",              imageSrc: "https://img.b2bpic.net/free-photo/smiling-businessman-face-portrait-wearing-suit_53876-148135.jpg",              imageAlt: "Jessica Garcia testimonial"
            }
          ]}
          textBoxTitleClassName="text-4xl md:text-5xl font-light"
          textBoxDescriptionClassName="text-lg opacity-80"
        />
      </div>

      <div id="about" data-section="about">
        <TestimonialAboutCard
          tag="About Mai Plumbing Co Inc"
          tagIcon={Building2}
          title="Family-Owned Plumbing Excellence Serving Dallas Since Day One"
          description="Mai Plumbing Co Inc"
          subdescription="9403 Faircrest Dr, Dallas, TX 75238"
          icon={Heart}
          imageSrc="https://img.b2bpic.net/free-photo/portrait-happy-auto-repairman-looking-camera-while-his-customers-are-standing-background_637285-7790.jpg"
          imageAlt="Mai Plumbing professional team"
          useInvertedBackground="invertDefault"
          titleClassName="text-3xl md:text-4xl font-light"
          descriptionClassName="text-lg font-semibold"
          subdescriptionClassName="text-base opacity-80"
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqBase
          title="Frequently Asked Questions"
          description="Quick answers to common questions about our plumbing services and pricing."
          tag="Common Questions"
          tagIcon={HelpCircle}
          textboxLayout="default"
          useInvertedBackground="noInvert"
          animationType="smooth"
          showCard={true}
          faqs={[
            {
              id: "1",              title: "Do you offer 24/7 emergency plumbing?",              content: "Yes, we provide 24/7 emergency plumbing services for burst pipes, major leaks, and urgent problems. Call (214) 878-1062 anytime."
            },
            {
              id: "2",              title: "Is there a service call fee?",              content: "No! We offer free service call fees and comprehensive estimates. You only pay for the actual work performed."
            },
            {
              id: "3",              title: "Are you licensed and insured?",              content: "100% licensed, insured, and bonded. Your home and family are fully protected with our comprehensive insurance coverage."
            },
            {
              id: "4",              title: "How quickly can you respond to emergencies?",              content: "We typically arrive within 30-45 minutes for emergency calls. Our fast response times are one reason customers rate us 4.8 stars."
            },
            {
              id: "5",              title: "Do you handle water heater replacement?",              content: "Yes, we specialize in water heater repair, installation, and replacement for all major brands. Same-day or next-day service available."
            },
            {
              id: "6",              title: "What areas do you serve?",              content: "We proudly serve Dallas, Texas and surrounding areas. Contact us to confirm service for your address: (214) 878-1062."
            }
          ]}
          textBoxTitleClassName="text-4xl md:text-5xl font-light"
          textBoxDescriptionClassName="text-lg opacity-80"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactSplitForm
          title="Get Your Free Plumbing Estimate"
          description="Tell us about your plumbing issue and we'll provide a free, no-obligation estimate. Fast response guaranteed."
          inputs={[
            { name: "name", type: "text", placeholder: "Your Name", required: true },
            { name: "phone", type: "tel", placeholder: "(214) 878-1062", required: true }
          ]}
          textarea={{
            name: "message",            placeholder: "Describe your plumbing issue (emergency, water heater, leak, drain, etc.)",            rows: 5,
            required: true
          }}
          imageSrc="https://img.b2bpic.net/free-photo/male-plumber-working-with-client-fix-kitchen-problems_23-2150990690.jpg"
          imageAlt="Contact Mai Plumbing for free estimate"
          mediaPosition="right"
          buttonText="Request Free Estimate"
          useInvertedBackground="invertDefault"
          titleClassName="text-4xl md:text-5xl font-light"
          descriptionClassName="text-lg opacity-80"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterSimple
          columns={[
            {
              title: "Services",              items: [
                { label: "Emergency Plumbing", href: "#services" },
                { label: "Water Heater Repair", href: "#services" },
                { label: "Leak Detection", href: "#services" },
                { label: "Drain Cleaning", href: "#services" }
              ]
            },
            {
              title: "Company",              items: [
                { label: "About Us", href: "#about" },
                { label: "Reviews", href: "#testimonials" },
                { label: "FAQ", href: "#faq" },
                { label: "Contact", href: "#contact" }
              ]
            },
            {
              title: "Contact",              items: [
                { label: "Call: (214) 878-1062", href: "tel:+12148781062" },
                { label: "9403 Faircrest Dr, Dallas, TX 75238", href: "#" },
                { label: "Open: Weekdays until 5 PM", href: "#" }
              ]
            }
          ]}
          bottomLeftText="© 2025 Mai Plumbing Co Inc. All rights reserved."
          bottomRightText="Licensed • Insured • Bonded"
          columnTitleClassName="font-semibold text-base"
          columnItemClassName="text-sm opacity-80 hover:opacity-100"
        />
      </div>
    </ThemeProvider>
  );
}