"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 CommunitiesPage() {
  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="Join Thriving Fitness Communities in Mumbai"
          description="Connect with like-minded fitness enthusiasts, runners, yogis, and athletes. Find your tribe, participate in group activities, share experiences, and achieve your fitness goals together in vibrant Mumbai communities."
          background={{ variant: "rotated-rays-animated-grid" }}
          tag="Running Clubs & Communities"
          tagIcon={Zap}
          tagAnimation="blur-reveal"
          buttons={[
            { text: "Browse Communities", href: "/communities" },
            { text: "Create Community", href: "#" },
          ]}
          buttonAnimation="slide-up"
          carouselItems={[
            {
              id: "carousel-1",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-active-diverse-fitness-community-gath-1773869151738-b76b89ce.png?_wi=2",              imageAlt: "Active diverse fitness community gathering"},
            {
              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=4",              imageAlt: "Vibrant 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=3",              imageAlt: "Serene yoga community session"},
            {
              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=4",              imageAlt: "CrossFit community training session"},
            {
              id: "carousel-5",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-large-group-of-diverse-fitness-communi-1773869150904-d78f85ce.png?_wi=2",              imageAlt: "Large diverse fitness community gathering"},
            {
              id: "carousel-6",              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-professional-headshot-composition-of-m-1773869151120-62cf6f5a.png?_wi=2",              imageAlt: "Fitness community leaders and founders"},
          ]}
          autoPlay={true}
          autoPlayInterval={5000}
          ariaLabel="Communities carousel showcasing FitnessaCollective running clubs and fitness communities"
        />
      </div>

      <div id="features" data-section="features">
        <FeatureCardTwentyFour
          title="Active Communities Across Mumbai"
          description="Explore thriving fitness communities tailored to every interest and fitness level. Join runners, yogis, strength athletes, and wellness enthusiasts in building lasting connections and achieving shared fitness goals."
          tag="Community Highlights"
          tagIcon={Award}
          tagAnimation="blur-reveal"
          features={[
            {
              id: "feature-1",              title: "Mumbai Speed Runners Club",              author: "Running Community",              description: "A vibrant community of pace-focused runners organizing weekly track sessions, interval training, and speed work. Members range from competitive runners to those seeking to improve their pace. Regular meetups at Bandra grounds.",              tags: ["Running", "Weekly Meets", "Pace Training"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/a-vibrant-running-club-gathering-in-mumb-1773869151153-2a8e2d1b.png?_wi=5",              imageAlt: "Speed runners community training together"},
            {
              id: "feature-2",              title: "Mindful Yoga Collective",              author: "Wellness Community",              description: "A serene community dedicated to yoga, meditation, and holistic wellness. Join for daily sunrise yoga sessions, workshops on breathing techniques, and spiritual practices. Open to all levels of yoga experience.",              tags: ["Yoga", "Meditation", "Wellness"],
              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=4",              imageAlt: "Mindful yoga community session"},
            {
              id: "feature-3",              title: "Elite CrossFit Brotherhood",              author: "Strength Community",              description: "A high-intensity community for functional fitness enthusiasts. Participate in WODs (Workout of the Day), strength training, and competitive challenges. Build camaraderie with elite athletes pushing their limits daily.",              tags: ["CrossFit", "Strength", "Competitions"],
              imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B8SAGkNg6dDslfeJ9cLBIp5dqh/an-intense-crossfit-training-session-wit-1773869150783-19bdea1c.png?_wi=5",              imageAlt: "Elite CrossFit community training"},
          ]}
          animationType="slide-up"
          textboxLayout="split"
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardSixteen
          title="Community Members' Transformative Journeys"
          description="Discover how joining FitnessaCollective communities has transformed fitness journeys, built friendships, and created a sense of belonging for thousands of members across Mumbai."
          tag="Member 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=4"},
            {
              id: "testimonial-2",              name: "Arjun Kapoor",              role: "Community Leader",              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=4"},
            {
              id: "testimonial-3",              name: "Anaya Patel",              role: "Yoga Practitioner",              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=5"},
            {
              id: "testimonial-4",              name: "Rohan Singh",              role: "CrossFit 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=4"},
          ]}
          kpiItems={[
            { value: "150+", label: "Active Communities" },
            { value: "30K+", label: "Community Members" },
            { value: "8.9/10", label: "Member Rating" },
          ]}
          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>
  );
}