import React, { useState, useRef, useEffect } from 'react'; import { Button } from './ui/button'; import { Badge } from './ui/badge'; import { Tabs, TabsContent, TabsList, TabsTrigger } from './ui/tabs'; import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; import { Input } from './ui/input'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select'; import { Play, Users, Clock, ChevronRight, ChevronLeft, GraduationCap, MessageCircle, Zap, Video, Smartphone, Award, Building2, BookOpen, Star, Globe, Target, TrendingUp, Lightbulb, CheckCircle, ArrowRight, Calendar, Search, Filter, Grid, List, X, DollarSign, ShoppingCart, ArrowLeft } from 'lucide-react'; import { motion } from 'motion/react'; import { navigateTo } from './Router'; import { ImageWithFallback } from './figma/ImageWithFallback'; import { BrandedTag } from './about/BrandedTag'; import { PrimaryCTAButton } from './PrimaryCTAButton'; import { CourseCard } from './CourseCard'; import { CartPopup, CartItem } from './CartPopup'; import { useCart } from './CartContext'; // Course Categories const courseCategories = [ 'Leadership Fundamentals', 'Decision Making & Strategy', 'Perspective & Risk', 'Communication & Influence', 'Change & Innovation' ]; // Featured Courses Data - Updated with Rupee pricing const featuredCourses = [ { id: '1', title: 'Strategic Leadership Foundations', thumbnail: 'https://images.unsplash.com/photo-1552664730-d307ca884978?w=400&h=250&fit=crop', duration: '12 hours', level: 'Intermediate', format: 'Self-paced', rating: 4.8, participants: '2,400+', category: 'Leadership Fundamentals', description: 'Master the core principles of strategic leadership and organizational vision.', price: '₹24,817', originalPrice: '₹33,117' }, { id: '2', title: 'Data-Driven Decision Making', thumbnail: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=250&fit=crop', duration: '8 hours', level: 'Advanced', format: 'Cohort-based', rating: 4.9, participants: '1,800+', category: 'Decision Making & Strategy', description: 'Learn to make strategic decisions using data analytics and business intelligence.', price: '₹37,267', originalPrice: '₹45,567' }, { id: '3', title: 'Risk Assessment & Management', thumbnail: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=250&fit=crop', duration: '10 hours', level: 'Intermediate', format: 'Self-paced', rating: 4.7, participants: '3,200+', category: 'Perspective & Risk', description: 'Develop expertise in identifying, analyzing, and mitigating organizational risks.', price: '₹28,967', originalPrice: '₹37,267' }, { id: '4', title: 'Influential Communication', thumbnail: 'https://images.unsplash.com/photo-1556761175-b413da4baf72?w=400&h=250&fit=crop', duration: '6 hours', level: 'Beginner', format: 'Self-paced', rating: 4.8, participants: '5,100+', category: 'Communication & Influence', description: 'Master the art of persuasive communication and stakeholder engagement.', price: '₹16,517', originalPrice: '₹20,667' }, { id: '5', title: 'Leading Innovation & Change', thumbnail: 'https://images.unsplash.com/photo-1542744173-8e7e53415bb0?w=400&h=250&fit=crop', duration: '14 hours', level: 'Advanced', format: 'Cohort-based', rating: 4.9, participants: '1,950+', category: 'Change & Innovation', description: 'Drive organizational transformation and foster a culture of innovation.', price: '₹45,567', originalPrice: '₹53,867' }, { id: '6', title: 'Digital Leadership Essentials', thumbnail: 'https://images.unsplash.com/photo-1551434678-e076c223a692?w=400&h=250&fit=crop', duration: '9 hours', level: 'Intermediate', format: 'Self-paced', rating: 4.6, participants: '2,800+', category: 'Leadership Fundamentals', description: 'Navigate the digital transformation as a modern leader.', price: '₹23,157', originalPrice: '₹28,967' }, { id: '7', title: 'Crisis Leadership Strategies', thumbnail: 'https://images.unsplash.com/photo-1584697964358-3e14ca57658b?w=400&h=250&fit=crop', duration: '7 hours', level: 'Advanced', format: 'Cohort-based', rating: 4.7, participants: '1,200+', category: 'Leadership Fundamentals', description: 'Navigate uncertainty and lead your team through challenging situations with confidence.', price: '₹33,117', originalPrice: '₹41,417' }, { id: '8', title: 'Emotional Intelligence for Leaders', thumbnail: 'https://images.unsplash.com/photo-1559027615-cd4628902d4a?w=400&h=250&fit=crop', duration: '5 hours', level: 'Beginner', format: 'Self-paced', rating: 4.9, participants: '4,300+', category: 'Communication & Influence', description: 'Develop emotional intelligence to enhance your leadership effectiveness.', price: '₹14,857', originalPrice: '₹19,007' }, { id: '9', title: 'Strategic Risk Analysis', thumbnail: 'https://images.unsplash.com/photo-1560472355-536de3962603?w=400&h=250&fit=crop', duration: '11 hours', level: 'Advanced', format: 'Self-paced', rating: 4.8, participants: '1,500+', category: 'Perspective & Risk', description: 'Master advanced risk analysis techniques for strategic decision-making.', price: '₹39,757', originalPrice: '₹49,717' } ]; // Learning Methodology Points const methodologyPoints = [ { icon: Target, title: 'Self-awareness through leadership orientations', description: 'Understand your natural leadership style and how to adapt it for different situations and team dynamics.' }, { icon: BookOpen, title: 'Research-backed frameworks', description: 'Learn from proven methodologies based on decades of leadership research and real-world application.' }, { icon: Zap, title: 'Practice-oriented skill development', description: 'Apply concepts immediately through interactive exercises, simulations, and hands-on projects.' }, { icon: MessageCircle, title: 'Expert-led conversations', description: 'Engage with seasoned leaders and industry experts through live sessions and mentoring opportunities.' } ]; export function LearningOnline() { const [searchTerm, setSearchTerm] = useState(''); const [selectedCategory, setSelectedCategory] = useState('All Categories'); const [selectedLevel, setSelectedLevel] = useState('All Levels'); const [selectedFormat, setSelectedFormat] = useState('All Formats'); const [selectedPriceRange, setSelectedPriceRange] = useState('All Prices'); const [selectedDuration, setSelectedDuration] = useState('All Durations'); const [selectedRating, setSelectedRating] = useState('All Ratings'); const [sortBy, setSortBy] = useState('Most Popular'); const [viewMode, setViewMode] = useState<'grid' | 'list'>('grid'); const [currentPage, setCurrentPage] = useState(1); const coursesPerPage = 9; // Cart functionality - using global cart context const { addToCart } = useCart(); const [isCartPopupOpen, setIsCartPopupOpen] = useState(false); const [recentlyAddedItem, setRecentlyAddedItem] = useState(null); // Get unique values for filters - Updated for Rupees const categories = ['All Categories', ...courseCategories]; const levels = ['All Levels', ...Array.from(new Set(featuredCourses.map(course => course.level)))]; const formats = ['All Formats', ...Array.from(new Set(featuredCourses.map(course => course.format)))]; const priceRanges = ['All Prices', 'Under ₹20,000', '₹20,000 - ₹35,000', '₹35,000 - ₹50,000', 'Over ₹50,000']; const durations = ['All Durations', 'Under 6 hours', '6-10 hours', '10-15 hours', 'Over 15 hours']; const ratings = ['All Ratings', '4.5+ Stars', '4.0+ Stars', '3.5+ Stars']; const sortOptions = [ { value: 'Most Popular', label: 'Most Popular' }, { value: 'newest', label: 'Newest First' }, { value: 'title', label: 'Title A-Z' }, { value: 'price_low', label: 'Price: Low to High' }, { value: 'price_high', label: 'Price: High to Low' }, { value: 'rating', label: 'Highest Rated' }, { value: 'duration', label: 'Duration' } ]; // Helper function to parse rupee price const parseRupeePrice = (priceStr: string) => { return parseFloat(priceStr.replace('₹', '').replace(/,/g, '')); }; // Filter and sort courses const filteredCourses = featuredCourses.filter(course => { const matchesSearch = course.title.toLowerCase().includes(searchTerm.toLowerCase()) || course.description.toLowerCase().includes(searchTerm.toLowerCase()) || course.category.toLowerCase().includes(searchTerm.toLowerCase()); const matchesCategory = selectedCategory === 'All Categories' || course.category === selectedCategory; const matchesLevel = selectedLevel === 'All Levels' || course.level === selectedLevel; const matchesFormat = selectedFormat === 'All Formats' || course.format === selectedFormat; // Price filter - Updated for Rupees const price = parseRupeePrice(course.price); const matchesPrice = selectedPriceRange === 'All Prices' || (selectedPriceRange === 'Under ₹20,000' && price < 20000) || (selectedPriceRange === '₹20,000 - ₹35,000' && price >= 20000 && price <= 35000) || (selectedPriceRange === '₹35,000 - ₹50,000' && price >= 35000 && price <= 50000) || (selectedPriceRange === 'Over ₹50,000' && price > 50000); // Duration filter const durationHours = parseInt(course.duration); const matchesDuration = selectedDuration === 'All Durations' || (selectedDuration === 'Under 6 hours' && durationHours < 6) || (selectedDuration === '6-10 hours' && durationHours >= 6 && durationHours <= 10) || (selectedDuration === '10-15 hours' && durationHours >= 10 && durationHours <= 15) || (selectedDuration === 'Over 15 hours' && durationHours > 15); // Rating filter const matchesRating = selectedRating === 'All Ratings' || (selectedRating === '4.5+ Stars' && course.rating >= 4.5) || (selectedRating === '4.0+ Stars' && course.rating >= 4.0) || (selectedRating === '3.5+ Stars' && course.rating >= 3.5); return matchesSearch && matchesCategory && matchesLevel && matchesFormat && matchesPrice && matchesDuration && matchesRating; }).sort((a, b) => { switch (sortBy) { case 'Most Popular': return parseInt(b.participants.replace(/[^\d]/g, '')) - parseInt(a.participants.replace(/[^\d]/g, '')); case 'newest': return a.id.localeCompare(b.id); // Assuming newer courses have higher IDs case 'title': return a.title.localeCompare(b.title); case 'price_low': return parseRupeePrice(a.price) - parseRupeePrice(b.price); case 'price_high': return parseRupeePrice(b.price) - parseRupeePrice(a.price); case 'rating': return b.rating - a.rating; case 'duration': return parseInt(a.duration) - parseInt(b.duration); default: return 0; } }); // Paginate results const totalPages = Math.ceil(filteredCourses.length / coursesPerPage); const startIndex = (currentPage - 1) * coursesPerPage; const currentCourses = filteredCourses.slice(startIndex, startIndex + coursesPerPage); const clearAllFilters = () => { setSearchTerm(''); setSelectedCategory('All Categories'); setSelectedLevel('All Levels'); setSelectedFormat('All Formats'); setSelectedPriceRange('All Prices'); setSelectedDuration('All Durations'); setSelectedRating('All Ratings'); setSortBy('Most Popular'); }; const hasActiveFilters = searchTerm || selectedCategory !== 'All Categories' || selectedLevel !== 'All Levels' || selectedFormat !== 'All Formats' || selectedPriceRange !== 'All Prices' || selectedDuration !== 'All Durations' || selectedRating !== 'All Ratings'; // Cart functions - using global cart context const handleAddToCart = (item: CartItem) => { addToCart(item); setRecentlyAddedItem(item); setIsCartPopupOpen(true); }; const handleCloseCartPopup = () => { setIsCartPopupOpen(false); setRecentlyAddedItem(null); }; return (
{/* Hero Banner – Digital Learning - Blog Style */}
{/* Back Navigation */}

Grow as a Leader, Anytime

Our Leadership Courses are designed to build your leadership abilities through targeted, structured packages. Each course increases self-awareness of your leadership style and provides practical insights to strengthen your skills. Courses feature curated content focused on specific abilities, including our proprietary Leadership Profilers, conceptual videos, leader webcasts, and supplemental resources.

navigateTo('/contact?topic=management-development')} ariaLabel="Talk to us about management development" className="primary-cta-button-blue cta-text-white" />
{/* Search and Controls Section */}
{/* Search Bar */}
setSearchTerm(e.target.value)} className="pl-10 pr-4 py-3 text-body rounded-lg border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all duration-200 w-full bg-gray-50" style={{ fontSize: 'var(--font-body)', fontFamily: 'var(--font-family-base)', height: '48px' }} />
{/* View Toggle and Sort */}
{/* Main Content Section with Sidebar */}
{/* Left Sidebar - Sticky Filters */}
{/* Filter Header */}

Filters

{hasActiveFilters && ( )}
{/* Filter Content */}
{/* Category Filter */}
{/* Level Filter */}
{/* Format Filter */}
{/* Price Range Filter */}
{/* Duration Filter */}
{/* Rating Filter */}
{/* Right Content Area - Scrollable Courses */}
Showing {currentCourses.length} of {filteredCourses.length} courses
{/* Courses Results */} {currentCourses.length === 0 ? (

No courses found matching your criteria.

) : ( <> {/* Grid View */} {viewMode === 'grid' && (
{currentCourses.map((course) => (
))}
)} {/* List View */} {viewMode === 'list' && (
{currentCourses.map((course) => ( navigateTo(`/course/${course.id}`)} >
{course.category}
{course.level}

{course.title}

{course.description}

{course.duration}
{course.participants}
{course.rating}
{course.price} {course.originalPrice && ( {course.originalPrice} )}
))}
)} {/* Pagination */} {totalPages > 1 && (
{Array.from({ length: totalPages }, (_, i) => i + 1).map((page) => ( ))}
)} )}
{/* Cart Popup */} { }} // Not used anymore recentlyAddedItem={recentlyAddedItem} /> {/* Our Approach Section - Standard Design Pattern */}
{/* Left Side - Title & Description */}

Orientation-Based Learning

Our unique methodology focuses on understanding your natural leadership orientation and building skills that align with your authentic style while expanding your capabilities across all dimensions.

{/* Key Stats */}
95%
Leader Effectiveness
20+
Years Research
{/* Primary CTA Button */}
navigateTo('/assessment')} icon={Target} />
{/* Right Side - Methodology Points */}
{methodologyPoints.map((point, index) => { const IconComponent = point.icon; return (

{point.title}

{point.description}

); })}
{/* Corporate Solutions CTA */} {/* CTA Banner Section - Enterprise Solutions */}
{/* Left Column - CTA Content */}

Scale Leadership Excellence Across Your Enterprise

Empower your leadership pipeline with our comprehensive online learning platform. Drive measurable results with scalable solutions designed for modern organizations.

{/* Key Benefits */}
{[ { icon: Building2, text: 'Enterprise-grade platform' }, { icon: TrendingUp, text: 'Real-time analytics & ROI' }, { icon: Users, text: 'Custom learning cohorts' }, { icon: Globe, text: 'Global deployment ready' } ].map((benefit, index) => { const IconComponent = benefit.icon; return (
{benefit.text}
); })}
{/* Social Proof Stats */}
500+
Companies
10K+
Leaders
92%
Completion
4.8★
Rating
{/* CTA Button */}
navigateTo('/contact?topic=corporate-learning')} icon={Calendar} ariaLabel="Schedule an enterprise demo with our team" />
{/* Right Column - Hero Image */}
{/* Overlay with gradient */}
{/* Floating Badge */}
Live Training Session
{/* Bottom Achievement Badge */}
95%
Engagement Rate
{/* Individual Learning CTA Banner Section - Landing Page Style */}
{/* Background Image */}
{/* Subtle dark overlay for overall image */}
{/* Gradient overlay for better text readability */}
{/* Content Container */}
{/* CTA Content Block */}
{/* Branded Tag */} {/* Main Headline */}

Ready to transform your {" "}leadership?{" "}

{/* CTA Button - Yellow variant for online courses */} navigateTo('/assessment')} ariaLabel="Start your free leadership assessment" className="cta-banner-yellow" icon={Target} /> {/* Supporting Text */}

Connect with our leadership experts to discuss your organization's specific development needs.

); }