"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from "@/components/navbar/NavbarStyleApple/NavbarStyleApple";
import HeroBillboardRotatedCarousel from "@/components/sections/hero/HeroBillboardRotatedCarousel";
import FeatureCardTwentyFour from "@/components/sections/feature/FeatureCardTwentyFour";
import TestimonialCardSixteen from "@/components/sections/testimonial/TestimonialCardSixteen";
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
import Link from "next/link";
import { Zap, Award, Star, CheckCircle } from "lucide-react";

export default function EventsPage() {
  const navItems = [
    { name: "Home", id: "home" },
    { name: "Trainers", id: "trainers" },
    { name: "Events", id: "events" },
    { name: "Communities", id: "communities" },
    { name: "About", id: "about" },
  ];

  const navItemsWithLinks = navItems.map((item) => {
    let href = "/";
    if (item.id === "home") href = "/";
    else if (item.id === "trainers") href = "/trainers";
    else if (item.id === "events") href = "/events";
    else if (item.id === "communities") href = "/communities";
    else if (item.id === "about") href = "/about";

    return {
      name: item.name,
      id: item.id,
      href,
    };
  });

  const footerColumns = [
    {
      title: "Platform",      items: [
        { label: "Find Trainers", href: "/trainers" },
        { label: "Discover Events", href: "/events" },
        { label: "Join Communities", href: "/communities" },
        { label: "Dashboard", href: "/dashboard" },
      ],
    },
    {
      title: "Company",      items: [
        { label: "About Us", href: "/about" },
        { label: "Careers", href: "#" },
        { label: "Blog", href: "#" },
        { label: "Press", href: "#" },
      ],
    },
    {
      title: "Support",      items: [
        { label: "Help Center", href: "#" },
        { label: "Contact Us", href: "#" },
        { label: "Safety Guidelines", href: "#" },
        { label: "Community Standards", href: "#" },
      ],
    },
    {
      title: "Legal",      items: [
        { label: "Privacy Policy", href: "#" },
        { label: "Terms of Service", href: "#" },
        { label: "Cookie Policy", href: "#" },
        { label: "Accessibility", href: "#" },
      ],
    },
  ];

  return (
    <ThemeProvider
      defaultButtonVariant="elastic-effect"
      defaultTextAnimation="background-highlight"
      borderRadius="soft"
      contentWidth="medium"
      sizing="medium"
      background="noise"
      cardStyle="glass-depth"
      primaryButtonStyle="primary-glow"
      secondaryButtonStyle="layered"
      headingFontWeight="bold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleApple
          brandName="FitnessaCollective"
          navItems={navItems}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardRotatedCarousel
          title="Discover Fitness Events Across Mumbai"
          description="Explore exclusive fitness events, workshops, marathons, and wellness seminars curated for elite athletes and fitness enthusiasts. Find your next challenge and connect with the vibrant fitness community."
          background={{ variant: "rotated-rays-animated-grid" }}
          tag="Fitness Events"
          tagIcon={Zap}
          tagAnimation="blur-reveal"
          buttons={[
            { text: "Browse All Events", href: "/events" },
            { text: "Host an Event", href: "#" },
          ]}
          buttonAnimation="slide-up"
          carouselItems={[
            {
              id: "carousel-1",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-high-energy-fitness-event-with-multipl-1773869150266-977fa4c1.png?_wi=2",              imageAlt: "High-energy fitness event with participants"},
            {
              id: "carousel-2",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-vibrant-running-club-gathering-in-mumb-1773869151153-2a8e2d1b.png?_wi=2",              imageAlt: "Dynamic running club gathering in Mumbai"},
            {
              id: "carousel-3",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-serene-yoga-session-in-a-premium-minim-1773869150020-b40d582b.png?_wi=2",              imageAlt: "Serene yoga session in premium fitness studio"},
            {
              id: "carousel-4",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-intense-crossfit-training-session-wit-1773869150783-19bdea1c.png?_wi=2",              imageAlt: "Intense CrossFit training session"},
            {
              id: "carousel-5",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-holistic-wellness-experience-showing-a-1773869150483-7d5f054d.png?_wi=2",              imageAlt: "Holistic wellness experience and meditation"},
            {
              id: "carousel-6",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-vibrant-well-organized-fitness-event-w-1773869150566-77c55641.png?_wi=2",              imageAlt: "Vibrant fitness event with organized setup"},
          ]}
          autoPlay={true}
          autoPlayInterval={5000}
          ariaLabel="Events carousel showcasing FitnessaCollective fitness events"
        />
      </div>

      <div id="features" data-section="features">
        <FeatureCardTwentyFour
          title="Upcoming Events in Mumbai"
          description="Discover a curated selection of premium fitness events happening across Mumbai. From marathons to yoga workshops, from CrossFit competitions to wellness retreats — find events that match your fitness goals."
          tag="Featured Events"
          tagIcon={Award}
          tagAnimation="blur-reveal"
          features={[
            {
              id: "feature-1",              title: "Mumbai Marathon Pro 2025",              author: "Running Events",              description: "Join thousands of runners in Mumbai's premier marathon event. A 42km challenge through iconic city landmarks with hydration stations, medical support, and a celebration festival at the finish line.",              tags: ["42km", "Feb 2025", "Premium Event"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-vibrant-running-club-gathering-in-mumb-1773869151153-2a8e2d1b.png?_wi=3",              imageAlt: "Mumbai Marathon running event"},
            {
              id: "feature-2",              title: "Elite CrossFit Championship",              author: "Competition Events",              description: "Experience high-intensity competitive fitness at its peak. This championship brings together elite athletes for challenging workouts, team competitions, and masterclasses from fitness professionals.",              tags: ["Competition", "Jan 2025", "Elite"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-intense-crossfit-training-session-wit-1773869150783-19bdea1c.png?_wi=3",              imageAlt: "CrossFit championship competition"},
            {
              id: "feature-3",              title: "Wellness Retreat Weekend",              author: "Wellness Events",              description: "Escape to tranquility with yoga sessions, meditation workshops, healthy cuisine, and holistic wellness guidance. Perfect for rejuvenation and connecting with mindful fitness enthusiasts.",              tags: ["Retreat", "Monthly", "Wellness"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-holistic-wellness-experience-showing-a-1773869150483-7d5f054d.png?_wi=3",              imageAlt: "Wellness retreat meditation experience"},
          ]}
          animationType="slide-up"
          textboxLayout="split"
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSixteen
          title="Events That Changed Lives"
          description="Hear from fitness enthusiasts who discovered their passion, achieved their goals, and built lasting connections through FitnessaCollective events."
          tag="Event Success Stories"
          tagIcon={Star}
          tagAnimation="blur-reveal"
          testimonials={[
            {
              id: "testimonial-1",              name: "Priya Sharma",              role: "Marathon Runner",              company: "Mumbai Running Collective",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-professional-portrait-photograph-of-a--1773869149808-5d5a8eb0.png?_wi=3"},
            {
              id: "testimonial-2",              name: "Arjun Kapoor",              role: "CrossFit Competitor",              company: "Elite Fitness Mumbai",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-professional-portrait-of-a-male-fitnes-1773869149883-589098f9.png?_wi=3"},
            {
              id: "testimonial-3",              name: "Anaya Patel",              role: "Wellness Enthusiast",              company: "Wellness Haven",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-serene-professional-portrait-of-a-fema-1773869149553-d57a1478.png?_wi=4"},
            {
              id: "testimonial-4",              name: "Rohan Singh",              role: "Fitness Enthusiast",              company: "CrossFit Mumbai",              rating: 5,
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-dynamic-professional-portrait-of-a-mal-1773869151892-e27172db.png?_wi=3"},
          ]}
          kpiItems={[
            { value: "500+", label: "Events Hosted" },
            { value: "50K+", label: "Participants" },
            { value: "95%", label: "Satisfaction Rate" },
          ]}
          animationType="depth-3d"
          textboxLayout="default"
          useInvertedBackground={false}
          carouselMode="buttons"
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseCard
          logoText="FitnessaCollective"
          columns={footerColumns}
          copyrightText="© 2025 FitnessaCollective. All rights reserved. Transforming Mumbai's fitness culture."
        />
      </div>
    </ThemeProvider>
  );
}