"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
import HeroSplitKpi from '@/components/sections/hero/HeroSplitKpi';
import InlineImageSplitTextAbout from '@/components/sections/about/InlineImageSplitTextAbout';
import FeatureCardSeven from '@/components/sections/feature/FeatureCardSeven';
import TeamCardSix from '@/components/sections/team/TeamCardSix';
import TestimonialCardOne from '@/components/sections/testimonial/TestimonialCardOne';
import ContactSplit from '@/components/sections/contact/ContactSplit';
import FooterBaseReveal from '@/components/sections/footer/FooterBaseReveal';
import { BookOpen, Star, Users, MessageSquare, Zap } from 'lucide-react';

export default function HomePage() {
  const navItems = [
    { name: "Home", id: "/" },
    { name: "About", id: "about" },
    { name: "Features", id: "features" },
    { name: "Team", id: "team" },
    { name: "Contact", id: "contact" }
  ];

  const handleSubmit = (email: string) => {
    console.log("Email submitted:", email);
  };

  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="entrance-slide"
      borderRadius="pill"
      contentWidth="mediumSmall"
      sizing="medium"
      background="radialGradient"
      cardStyle="gradient-bordered"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="layered"
      headingFontWeight="bold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen 
          navItems={navItems}
          brandName="Tutorly"
          bottomLeftText="Join our learning community"
          bottomRightText="hello@tutorly.com"
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroSplitKpi
          title="Connect with Expert Tutors Anytime"
          description="Tutorly connects students with qualified tutors for personalized learning. Whether you're a student seeking help or a tutor sharing expertise, find your perfect match on our platform."
          tag="Education Platform"
          tagIcon={BookOpen}
          kpis={[
            { value: "5,000+", label: "Active Tutors" },
            { value: "50,000+", label: "Students Helped" },
            { value: "4.9★", label: "Average Rating" }
          ]}
          enableKpiAnimation={true}
          imageSrc="https://img.b2bpic.net/free-photo/virtual-classroom-study-space_23-2149178644.jpg"
          imageAlt="Students learning with tutors online"
          imagePosition="right"
          buttons={[
            { text: "Find a Tutor", href: "contact" },
            { text: "Become a Tutor", href: "contact" }
          ]}
        />
      </div>

      <div id="about" data-section="about">
        <InlineImageSplitTextAbout
          heading={[
            { type: "text", content: "Empowering education through" },
            { type: "text", content: "personalized learning experiences" }
          ]}
          useInvertedBackground="noInvert"
          buttons={[
            { text: "Learn More", href: "features" }
          ]}
        />
      </div>

      <div id="features" data-section="features">
        <FeatureCardSeven
          title="Why Choose Tutorly"
          description="Our platform provides everything you need for successful learning and teaching connections."
          tag="Features"
          tagIcon={Star}
          features={[
            {
              id: 1,
              title: "Easy Matching Algorithm",              description: "Our intelligent system matches students with tutors based on subjects, schedules, learning styles, and goals for optimal compatibility.",              imageSrc: "https://img.b2bpic.net/free-photo/virtual-classroom-study-space_23-2149178644.jpg"
            },
            {
              id: 2,
              title: "Secure Payments & Scheduling",              description: "Book sessions with ease, manage payments securely, and access your calendar all in one place. Transparent pricing with no hidden fees.",              imageSrc: "https://img.b2bpic.net/free-photo/virtual-classroom-study-space_23-2149178644.jpg"
            },
            {
              id: 3,
              title: "Live Tutoring Sessions",              description: "Conduct interactive lessons with integrated video, screen sharing, and whiteboard tools. Record sessions for future reference.",              imageSrc: "https://img.b2bpic.net/free-photo/virtual-classroom-study-space_23-2149178644.jpg"
            },
            {
              id: 4,
              title: "Progress Tracking",              description: "Monitor learning progress with detailed analytics, performance reports, and personalized recommendations for improvement.",              imageSrc: "https://img.b2bpic.net/free-photo/virtual-classroom-study-space_23-2149178644.jpg"
            }
          ]}
          textboxLayout="default"
          animationType="slide-up"
          useInvertedBackground="noInvert"
        />
      </div>

      <div id="team" data-section="team">
        <TeamCardSix
          title="Meet Our Expert Tutors"
          description="A diverse team of qualified educators committed to student success."
          tag="Team"
          tagIcon={Users}
          members={[
            {
              id: "1",              name: "Sarah Johnson",              role: "Math & Science Specialist",              imageSrc: "https://img.b2bpic.net/free-photo/close-up-young-business-person-doing-internship_23-2149305396.jpg",              imageAlt: "Sarah Johnson, Math Tutor"
            },
            {
              id: "2",              name: "Michael Chen",              role: "Language Arts Expert",              imageSrc: "https://img.b2bpic.net/free-photo/medium-shot-smiley-woman-library_23-2149204753.jpg",              imageAlt: "Michael Chen, English Tutor"
            },
            {
              id: "3",              name: "Emily Rodriguez",              role: "Test Prep Coach",              imageSrc: "https://img.b2bpic.net/free-photo/mature-business-manager-office_1098-21368.jpg",              imageAlt: "Emily Rodriguez, Test Prep Coach"
            },
            {
              id: "4",              name: "David Kim",              role: "Computer Science Mentor",              imageSrc: "https://img.b2bpic.net/free-photo/smiley-teacher-holding-tablet_23-2148668619.jpg",              imageAlt: "David Kim, CS Tutor"
            }
          ]}
          gridVariant="uniform-all-items-equal"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="invertDefault"
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardOne
          title="What Students & Tutors Say"
          description="Real stories from our community of learners and educators."
          tag="Testimonials"
          tagIcon={MessageSquare}
          testimonials={[
            {
              id: "1",              name: "Alex Martinez",              role: "Student",              company: "High School",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/vertical-shot-happy-young-woman-with-curly-hair-holds-notepad-pen-makes-notes-what-she-observes-around-city-dressed-casual-green-jumper-poses-outdoors-against-blurred-background_273609-56665.jpg",              imageAlt: "Alex Martinez"
            },
            {
              id: "2",              name: "Jordan Lee",              role: "College Student",              company: "University",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/side-view-smiley-woman-holding-book_23-2149535705.jpg",              imageAlt: "Jordan Lee"
            },
            {
              id: "3",              name: "Casey Thompson",              role: "Parent",              company: "Family",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/woman-sitting-library-couch_273609-12733.jpg",              imageAlt: "Casey Thompson"
            },
            {
              id: "4",              name: "Morgan Palmer",              role: "Tutor",              company: "Tutorly",              rating: 5,
              imageSrc: "https://img.b2bpic.net/free-photo/happy-boy-posing-with-tablet_23-2147655887.jpg",              imageAlt: "Morgan Palmer"
            }
          ]}
          gridVariant="uniform-all-items-equal"
          animationType="slide-up"
          textboxLayout="default"
          useInvertedBackground="invertDefault"
          carouselMode="buttons"
        />
      </div>

      <div id="contact" data-section="contact">
        <ContactSplit
          tag="Get Started"
          title="Join Tutorly Today"
          description="Whether you're looking for a tutor or ready to share your expertise, sign up now to get started on your learning journey."
          tagIcon={Zap}
          useInvertedBackground="noInvert"
          imageSrc="https://img.b2bpic.net/free-photo/cheerful-mature-call-center-operator-looking-laptop-screen_74855-4013.jpg"
          imageAlt="Join our learning community"
          mediaPosition="right"
          inputPlaceholder="Enter your email"
          buttonText="Sign Up"
          termsText="By signing up, you agree to our Terms of Service and Privacy Policy."
          onSubmit={handleSubmit}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseReveal
          columns={[
            {
              title: "Product",              items: [
                { label: "Find Tutors", href: "home" },
                { label: "Become a Tutor", href: "features" },
                { label: "Pricing", href: "features" },
                { label: "How It Works", href: "about" }
              ]
            },
            {
              title: "Company",              items: [
                { label: "About Us", href: "about" },
                { label: "Blog", href: "home" },
                { label: "Careers", href: "home" },
                { label: "Press", href: "home" }
              ]
            },
            {
              title: "Support",              items: [
                { label: "Help Center", href: "contact" },
                { label: "Contact Us", href: "contact" },
                { label: "Terms of Service", href: "home" },
                { label: "Privacy Policy", href: "home" }
              ]
            }
          ]}
          copyrightText="© 2025 Tutorly. All rights reserved."
        />
      </div>
    </ThemeProvider>
  );
}