"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
import HeroSplitTestimonial from '@/components/sections/hero/HeroSplitTestimonial';
import TextAbout from '@/components/sections/about/TextAbout';
import FeatureCardThree from '@/components/sections/feature/featureCardThree/FeatureCardThree';
import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCardSix';
import FaqDouble from '@/components/sections/faq/FaqDouble';
import ContactCTA from '@/components/sections/contact/ContactCTA';
import FooterBaseReveal from '@/components/sections/footer/FooterBaseReveal';

const assetUrls = {
  "hero-plumber-working": "https://pixabay.com/get/g4b0df2bd57fe481fe804507a26bf08d8009a085e9d24ac49700e7554296b41165486d5fb67298026fea26b76591717810ccc43c219213817ce9568a73a4c1c88_1280.jpg",  "testimonial-1": "https://pixabay.com/get/gd6c7c410d0e3173c632744e2d710f0210c6a6720f8e1987760100b27c7ca4dfca0706a016542dc2382755d574a3ba88b2ac4c742d7fce8c7fa53eca7b83e7808_1280.jpg",  "testimonial-2": "https://pixabay.com/get/ge2815b647724f67cd670526e04807e6894a5de31fa19e3f46cfcfd5c65684811997b246effcd1a939bbed07411344946153e5b360c742e1279011df46683700f_1280.jpg",  "testimonial-3": "https://pixabay.com/get/g924cdb2f28044de30a0930b8f9e89ef8a5d480ffaabd42f1533d98e420d004b7b7202e1894fad2ce019384757881724015776017b5b02f9db22263ff8727ea09_1280.jpg",  "testimonial-4": "https://pixabay.com/get/g01e95d9b28aa80fc133083b03bb611b8ce0aea90f11cba71b400034681c3b7dc8f41f94748f0f0e568016884094091b81cae569c361eb93a715d1a113f4c886d_1280.jpg",  "feature-drain": "https://pixabay.com/get/g312221e5252b8f8bd22b25f398d4695f38fde9fab2fe6e7533890725abcf610cee6bac8b8c3b9ab41db0ead81feb56e78bb6840eb6718d0666b667c2dcf0ad35_1280.jpg",  "feature-water-heater": "https://pixabay.com/get/g87bab00abdea931d8f2d8aacf31ede5f7f9cdff891025b62ae027f8593925da545a0e3d197d6b8fb1ec572ac3ca205a59e94a9e49996970bc970b990808fb5b9_1280.jpg",  "feature-leak-detection": "https://pixabay.com/get/g04d3af62e4e3419f3c17fe99029e280b25d7ded281c7cfc1a6cfc3b49cbd3cbcdf4fb2984409d8183d8fe178f1f18277_1280.jpg",  "feature-pipe-repair": "https://pixabay.com/get/g523c57e1d301ba5a1e3efaa84c9e33e3e73aca13e500b1b6bf1123419392a01d1e65faf435c1ca5b26a9d0455edd63cb9f6b1ba957755df2786122d77f661bfa_1280.jpg"
};

const assetAlts = {
  "hero-plumber-working": "Professional plumber working on pipes under a sink.",  "testimonial-1": "Sarah J.",  "testimonial-2": "Michael D.",  "testimonial-3": "Emily R.",  "testimonial-4": "David K.",  "feature-drain": "Plumber cleaning a drain pipe",  "feature-water-heater": "New water heater installation",  "feature-leak-detection": "Plumber using leak detection equipment",  "feature-pipe-repair": "Plumber repairing a damaged pipe"
};

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="text-stagger"
      defaultTextAnimation="entrance-slide"
      borderRadius="soft"
      contentWidth="mediumLarge"
      sizing="largeSmallSizeLargeTitles"
      background="grid"
      cardStyle="glass-elevated"
      primaryButtonStyle="flat"
      secondaryButtonStyle="glass"
      headingFontWeight="bold"
    >
      <div id="nav" data-section="nav">
        <NavbarLayoutFloatingInline
          brandName="Plumber's Crack"
          navItems={[
            { name: "Home", id: "#hero" },
            { name: "Services", id: "#services" },
            { name: "About Us", id: "#about" },
            { name: "Reviews", id: "#testimonials" },
            { name: "FAQ", id: "#faq" }
          ]}
          button={{
            text: "Book Now",            href: "#contact"
          }}
          animateOnLoad={true}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroSplitTestimonial
          title="Plumber's Crack: Keeping Your Pipes & Pockets Happy"
          description="Reliable plumbing services for your home and business. Fast, friendly, and fixed right the first time. No crack, no problem!"
          background={{ variant: "plain" }}
          testimonials={[
            { name: "Sarah J.", handle: "Homeowner", testimonial: "Plumber's Crack saved the day! Quick response and fixed my leaky pipe perfectly. Highly recommend!", rating: 5, imageSrc: assetUrls["testimonial-1"], imageAlt: assetAlts["testimonial-1"] },
            { name: "Michael D.", handle: "Small Business Owner", testimonial: "Professional, efficient, and great value. They handled our office's plumbing issues without any disruption.", rating: 5, imageSrc: assetUrls["testimonial-2"], imageAlt: assetAlts["testimonial-2"] },
            { name: "Emily R.", handle: "Apartment Manager", testimonial: "Always our first call for any plumbing emergency. Their team is responsive and the quality of work is consistently excellent.", rating: 5, imageSrc: assetUrls["testimonial-3"], imageAlt: assetAlts["testimonial-3"] },
            { name: "David K.", handle: "Resident", testimonial: "Friendly service and they explained everything clearly. My new water heater works flawlessly. Fantastic experience!", rating: 5, imageSrc: assetUrls["testimonial-4"], imageAlt: assetAlts["testimonial-4"] }
          ]}
          mediaAnimation="slide-up"
          imageSrc={assetUrls["hero-plumber-working"]}
          imageAlt={assetAlts["hero-plumber-working"]}
          imagePosition="right"
          buttons={[
            { text: "Get a Free Estimate", href: "#contact" },
            { text: "Our Services", href: "#services" }
          ]}
          useInvertedBackground={false}
        />
      </div>

      <div id="about" data-section="about">
        <TextAbout
          tag="About Us"
          title="Your Local Experts for Every Plumbing Need"
          useInvertedBackground={true}
          buttons={[
            { text: "Meet Our Team", href: "#" },
            { text: "Why Choose Us", href: "#" }
          ]}
        />
      </div>

      <div id="services" data-section="services">
        <FeatureCardThree
          tag="Our Services"
          title="Comprehensive Plumbing Solutions You Can Trust"
          description="From leaky faucets to major installations, we handle it all with precision and care, ensuring lasting quality."
          features={[
            { id: "01", title: "Drain Cleaning & Unclogging", description: "Say goodbye to slow drains and stubborn clogs. We use advanced techniques to clear your pipes efficiently.", imageSrc: assetUrls["feature-drain"], imageAlt: assetAlts["feature-drain"] },
            { id: "02", title: "Water Heater Repair & Installation", description: "Hot water when you need it. We service, repair, and install all types of water heaters for optimal performance.", imageSrc: assetUrls["feature-water-heater"], imageAlt: assetAlts["feature-water-heater"] },
            { id: "03", title: "Leak Detection & Repair", description: "Don't let hidden leaks cause damage. Our experts accurately detect and repair leaks to protect your home.", imageSrc: assetUrls["feature-leak-detection"], imageAlt: assetAlts["feature-leak-detection"] },
            { id: "04", title: "Pipe Repair & Replacement", description: "From minor repairs to full pipe replacements, we ensure your plumbing infrastructure is sound and reliable.", imageSrc: assetUrls["feature-pipe-repair"], imageAlt: assetAlts["feature-pipe-repair"] }
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSix
          title="Hear It From Our Happy Customers"
          description="We're proud of the smiles and solid reviews we earn with every job. Your satisfaction is our top priority."
          testimonials={[
            { id: "1", name: "Sarah J.", handle: "Happy Homeowner", testimonial: "Plumber's Crack was fantastic! They fixed my shower leak quickly and professionally. Absolutely recommend their services to everyone!", imageSrc: assetUrls["testimonial-1"], imageAlt: assetAlts["testimonial-1"] },
            { id: "2", name: "Mark L.", handle: "Local Business Owner", testimonial: "Excellent service and incredibly responsive. Our business can't afford downtime, and Plumber's Crack ensured everything was flowing perfectly.", imageSrc: assetUrls["testimonial-2"], imageAlt: assetAlts["testimonial-2"] },
            { id: "3", name: "Jessica T.", handle: "Property Manager", testimonial: "Reliable and thorough! They've handled multiple jobs for my properties, always with a great attitude and transparent pricing. A true lifesaver.", imageSrc: assetUrls["testimonial-3"], imageAlt: assetAlts["testimonial-3"] },
            { id: "4", name: "Robert P.", handle: "Satisfied Customer", testimonial: "My new water heater was installed flawlessly. The team was courteous, cleaned up afterwards, and ensured I understood everything. Top-notch!", imageSrc: assetUrls["testimonial-4"], imageAlt: assetAlts["testimonial-4"] }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={true}
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqDouble
          title="Got Questions? We've Got Answers."
          description="Find quick solutions to common plumbing queries and learn more about our services and policies."
          faqs={[
            { id: "1", title: "What areas do you serve?", content: "We proudly serve [Your City/Region] and the surrounding areas. Please contact us to confirm service availability in your specific location." },
            { id: "2", title: "Do you offer emergency plumbing services?", content: "Yes, we understand that plumbing emergencies don't wait. We offer 24/7 emergency services. Call us anytime for urgent plumbing needs." },
            { id: "3", title: "How much does a plumbing service cost?", content: "The cost varies depending on the service required. We offer transparent pricing and provide a detailed estimate before any work begins. Contact us for a free quote!" },
            { id: "4", title: "Are your plumbers licensed and insured?", content: "Absolutely! All of our plumbers are fully licensed, highly trained, and insured for your peace of mind. You can trust us with your home." }
          ]}
          faqsAnimation="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCTA
          tag="Contact Us"
          title="Ready for Reliable Plumbing Service?"
          description="Don't let plumbing problems interrupt your day. Reach out today for a swift, professional solution and a free estimate."
          buttons={[
            { text: "Schedule Service", href: "tel:123-456-7890" },
            { text: "Request a Quote", href: "mailto:info@plumberscrack.com" }
          ]}
          background={{ variant: "plain" }}
          useInvertedBackground={true}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseReveal
          columns={[
            { title: "Quick Links", items: [{ label: "Home", href: "#hero" }, { label: "Services", href: "#services" }, { label: "About Us", href: "#about" }] },
            { title: "Services", items: [{ label: "Drain Cleaning", href: "#services" }, { label: "Water Heaters", href: "#services" }, { label: "Leak Repair", href: "#services" }] },
            { title: "Contact", items: [{ label: "Get a Quote", href: "#contact" }, { label: "Call Us", href: "tel:123-456-7890" }, { label: "Email Us", href: "mailto:info@plumberscrack.com" }] }
          ]}
          copyrightText="© 2024 Plumber's Crack. All rights reserved."
        />
      </div>
    </ThemeProvider>
  );
}
