"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered";
import HeroBillboardRotatedCarousel from "@/components/sections/hero/HeroBillboardRotatedCarousel";
import AboutMetric from "@/components/sections/about/AboutMetric";
import FeatureHoverPattern from "@/components/sections/feature/featureHoverPattern/FeatureHoverPattern";
import TestimonialCardOne from "@/components/sections/testimonial/TestimonialCardOne";
import FaqSplitText from "@/components/sections/faq/FaqSplitText";
import ContactCTA from "@/components/sections/contact/ContactCTA";
import FooterMedia from "@/components/sections/footer/FooterMedia";
import { Award, Users, Zap, Shield, Home, Building2, Wrench, Lightbulb, AlertTriangle, CheckCircle } from "lucide-react";

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="icon-arrow"
      defaultTextAnimation="reveal-blur"
      borderRadius="soft"
      contentWidth="small"
      sizing="largeSmall"
      background="grid"
      cardStyle="gradient-mesh"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="solid"
      headingFontWeight="extrabold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleCentered
          brandName="R.H. Carter Electrician"
          navItems={[
            { name: "Services", id: "services" },
            { name: "About", id: "about" },
            { name: "Testimonials", id: "testimonials" },
            { name: "FAQ", id: "faq" }
          ]}
          button={{ text: "Get Quote", href: "#contact" }}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardRotatedCarousel
          title="Professional Electrical Solutions"
          description="Expert electrical contracting services for residential and commercial properties. R.H. Carter brings decades of experience, reliability, and quality craftsmanship to every project."
          background={{ variant: "rotated-rays-animated" }}
          tag="Licensed & Insured"
          tagIcon={CheckCircle}
          tagAnimation="blur-reveal"
          buttons={[
            { text: "Schedule Service", href: "#contact" },
            { text: "Learn More", href: "#services" }
          ]}
          buttonAnimation="slide-up"
          carouselItems={[
            {
              id: "carousel-1",              imageSrc: "http://img.b2bpic.net/free-photo/man-talking-mobile-phone-while-using-digital-tablet-kitchen_107420-84983.jpg?_wi=1",              imageAlt: "Professional electrician working on electrical panel"
            },
            {
              id: "carousel-2",              imageSrc: "http://img.b2bpic.net/free-photo/male-electrician-works-switchboard-with-electrical-connecting-cable_169016-15090.jpg?_wi=1",              imageAlt: "Residential electrical wiring installation"
            },
            {
              id: "carousel-3",              imageSrc: "http://img.b2bpic.net/free-photo/hallway-building_23-2149397545.jpg",              imageAlt: "Commercial electrical system installation"
            },
            {
              id: "carousel-4",              imageSrc: "http://img.b2bpic.net/free-photo/male-electrician-working-switchboard-with-fuses_169016-52975.jpg",              imageAlt: "Emergency electrician repair call"
            },
            {
              id: "carousel-5",              imageSrc: "http://img.b2bpic.net/free-photo/man-talking-mobile-phone-while-using-digital-tablet-kitchen_107420-84983.jpg?_wi=2",              imageAlt: "Electrician performing diagnostic testing"
            },
            {
              id: "carousel-6",              imageSrc: "http://img.b2bpic.net/free-photo/male-electrician-works-switchboard-with-electrical-connecting-cable_169016-15090.jpg?_wi=2",              imageAlt: "Electrical panel upgrade and maintenance"
            }
          ]}
          autoPlay={true}
          autoPlayInterval={5000}
          ariaLabel="Hero carousel showcasing electrical services"
        />
      </div>

      <div id="about" data-section="about">
        <AboutMetric
          title="Why Choose R.H. Carter Electrician"
          metrics={[
            { icon: Award, label: "Years of Experience", value: "20+" },
            { icon: Users, label: "Satisfied Customers", value: "500+" },
            { icon: Zap, label: "Projects Completed", value: "1000+" },
            { icon: Shield, label: "Licensed & Insured", value: "Certified" }
          ]}
          metricsAnimation="slide-up"
          useInvertedBackground={true}
          ariaLabel="About section with company metrics"
        />
      </div>

      <div id="services" data-section="services">
        <FeatureHoverPattern
          title="Comprehensive Electrical Services"
          description="From residential repairs to commercial installations, we provide a full range of electrical solutions tailored to your needs."
          features={[
            {
              icon: Home,
              title: "Residential Wiring",              description: "Complete home electrical installations, rewiring, panel upgrades, and safety inspections for residential properties.",              button: { text: "Learn More", href: "#contact" }
            },
            {
              icon: Building2,
              title: "Commercial Installation",              description: "Professional commercial electrical systems, lighting design, power distribution, and industrial infrastructure setup.",              button: { text: "Learn More", href: "#contact" }
            },
            {
              icon: Wrench,
              title: "Maintenance & Repair",              description: "Regular maintenance, troubleshooting, equipment repair, and emergency electrical services available 24/7.",              button: { text: "Learn More", href: "#contact" }
            },
            {
              icon: Lightbulb,
              title: "Energy Solutions",              description: "LED lighting upgrades, energy-efficient installations, and sustainable electrical solutions to reduce costs.",              button: { text: "Learn More", href: "#contact" }
            },
            {
              icon: AlertTriangle,
              title: "Emergency Service",              description: "24/7 emergency electrical response for outages, hazards, and urgent repairs whenever you need us.",              button: { text: "Learn More", href: "#contact" }
            },
            {
              icon: CheckCircle,
              title: "Safety Inspections",              description: "Comprehensive electrical safety inspections, code compliance checks, and certification services for peace of mind.",              button: { text: "Learn More", href: "#contact" }
            }
          ]}
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={false}
          tag="Expert Services"
          tagAnimation="blur-reveal"
          carouselMode="auto"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardOne
          title="What Our Clients Say"
          description="Trusted by hundreds of satisfied residential and commercial customers throughout the region."
          testimonials={[
            {
              id: "1",              name: "James Mitchell",              role: "Homeowner",              company: "Residential Client",              rating: 5,
              imageSrc: "http://img.b2bpic.net/free-photo/smiley-woman-indoors-medium-shot_23-2148944925.jpg",              imageAlt: "James Mitchell"
            },
            {
              id: "2",              name: "Sarah Johnson",              role: "Property Manager",              company: "Commercial Property",              rating: 5,
              imageSrc: "http://img.b2bpic.net/free-photo/man-winking-thumb-up_1187-3210.jpg",              imageAlt: "Sarah Johnson"
            },
            {
              id: "3",              name: "Michael Chen",              role: "Business Owner",              company: "Retail Store",              rating: 5,
              imageSrc: "http://img.b2bpic.net/free-photo/content-beautiful-businesswoman-standing-window_1262-1778.jpg",              imageAlt: "Michael Chen"
            },
            {
              id: "4",              name: "Emily Rodriguez",              role: "Contractor",              company: "Construction Firm",              rating: 5,
              imageSrc: "http://img.b2bpic.net/free-photo/expressive-middle-aged-woman-posing_344912-2831.jpg",              imageAlt: "Emily Rodriguez"
            },
            {
              id: "5",              name: "David Williams",              role: "Facilities Director",              company: "Office Complex",              rating: 5,
              imageSrc: "http://img.b2bpic.net/free-photo/beautiful-business-woman-portrait_23-2149280737.jpg",              imageAlt: "David Williams"
            },
            {
              id: "6",              name: "Lisa Anderson",              role: "Homeowner",              company: "Residential Client",              rating: 5,
              imageSrc: "http://img.b2bpic.net/free-photo/people-spending-time-together-experiencing-time-expansion_23-2151338335.jpg",              imageAlt: "Lisa Anderson"
            }
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground={true}
          tag="Customer Reviews"
          tagAnimation="blur-reveal"
        />
      </div>

      <div id="faq" data-section="faq">
        <FaqSplitText
          sideTitle="Frequently Asked Questions"
          sideDescription="Find answers to common questions about our electrical services, pricing, and availability."
          buttons={[{ text: "Contact Us", href: "#contact" }]}
          faqs={[
            {
              id: "1",              title: "Are you licensed and insured?",              content: "Yes, R.H. Carter Electrician is fully licensed, bonded, and insured. All work meets local electrical codes and industry standards."
            },
            {
              id: "2",              title: "Do you offer emergency services?",              content: "Absolutely. We provide 24/7 emergency electrical service for power outages, hazards, and urgent repairs. Call us anytime."
            },
            {
              id: "3",              title: "What areas do you service?",              content: "We serve the entire region with both residential and commercial electrical services. Contact us to confirm service availability in your area."
            },
            {
              id: "4",              title: "How quickly can you respond?",              content: "We pride ourselves on rapid response times. Most service calls are handled within 24 hours, with emergency services available immediately."
            },
            {
              id: "5",              title: "Do you provide free estimates?",              content: "Yes, we offer free estimates for all projects. Our team will assess your needs and provide a detailed quote before any work begins."
            },
            {
              id: "6",              title: "What's your warranty policy?",              content: "All work is guaranteed. We stand behind our craftsmanship and offer warranties on labor and materials for customer peace of mind."
            }
          ]}
          faqsAnimation="blur-reveal"
          useInvertedBackground={false}
          textPosition="left"
          showCard={true}
          animationType="smooth"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactCTA
          tag="Get Started Today"
          tagIcon={Zap}
          tagAnimation="blur-reveal"
          title="Ready for Professional Electrical Service?"
          description="Contact R.H. Carter Electrician today to schedule your service, request an estimate, or discuss your electrical needs with our expert team."
          buttons={[
            { text: "Schedule Service", href: "tel:+1-800-ELECTRIC" },
            { text: "Request Quote", href: "mailto:info@rhcarterelectric.com" }
          ]}
          buttonAnimation="slide-up"
          background={{ variant: "animated-grid" }}
          useInvertedBackground={true}
          ariaLabel="Contact section for scheduling electrical services"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterMedia
          imageSrc="http://img.b2bpic.net/free-photo/photo-metal-texture-pattern_58702-13646.jpg"
          imageAlt="Electrical infrastructure background"
          logoText="R.H. Carter Electrician"
          copyrightText="© 2025 R.H. Carter Electrician. All rights reserved."
          columns={[
            {
              title: "Services",              items: [
                { label: "Residential Wiring", href: "#services" },
                { label: "Commercial Installation", href: "#services" },
                { label: "Emergency Repair", href: "#services" },
                { label: "Energy Solutions", href: "#services" }
              ]
            },
            {
              title: "Company",              items: [
                { label: "About Us", href: "#about" },
                { label: "Our Team", href: "#about" },
                { label: "FAQ", href: "#faq" },
                { label: "Contact", href: "#contact" }
              ]
            },
            {
              title: "Legal",              items: [
                { label: "Privacy Policy", href: "#" },
                { label: "Terms of Service", href: "#" },
                { label: "License Information", href: "#" },
                { label: "Insurance", href: "#" }
              ]
            }
          ]}
          ariaLabel="Site footer"
        />
      </div>
    </ThemeProvider>
  );
}
