import React, { useState, useRef, useEffect } from 'react'; import { Button } from './ui/button'; import { Card, CardContent } from './ui/card'; import { Badge } from './ui/badge'; import { Input } from './ui/input'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './ui/select'; import { ImageWithFallback } from './figma/ImageWithFallback'; import { PrimaryCTAButton } from './PrimaryCTAButton'; import { navigateTo } from './Router'; import { Search, Calendar, Clock, Users, Play, Filter, Grid, List, ChevronLeft, ChevronRight, X, TrendingUp, Award, Globe } from 'lucide-react'; // Comprehensive webinar data const webinarsData = [ { id: '1', slug: 'leadership-in-digital-age', title: 'Leadership in the Digital Age: Navigating Change and Innovation', description: 'Discover how modern leaders can adapt and thrive in an increasingly digital world. This comprehensive webcast covers digital transformation strategies, leading remote teams, and fostering innovation.', presenter: 'Dr. Sarah Mitchell', presenterTitle: 'Chief Digital Transformation Officer', company: 'Global Leadership Institute', date: '2024-02-15', time: '2:00 PM EST', duration: '90 minutes', attendees: '2,400+', category: 'Digital Transformation', tags: ['Leadership', 'Digital Strategy', 'Innovation', 'Change Management'], thumbnail: 'https://images.unsplash.com/photo-1560472355-536de3962603?w=600&h=400&fit=crop', status: 'Available', featured: true, level: 'Advanced', format: 'Hybrid', rating: 4.8, price: 'Free' }, { id: '2', slug: 'building-resilient-teams', title: 'Building Resilient Teams: Strategies for Sustainable Performance', description: 'Learn proven methodologies for creating teams that can withstand challenges and maintain high performance under pressure.', presenter: 'Marcus Rodriguez', presenterTitle: 'Director of Organizational Development', company: 'Excellence Consulting', date: '2024-02-08', time: '1:00 PM EST', duration: '75 minutes', attendees: '1,850+', category: 'Team Development', tags: ['Team Building', 'Resilience', 'Performance', 'Leadership'], thumbnail: 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=600&h=400&fit=crop', status: 'Available', featured: true, level: 'Intermediate', format: 'In Person', rating: 4.9, price: 'Free' }, { id: '3', slug: 'strategic-decision-making', title: 'Strategic Decision Making: Tools and Frameworks for Leaders', description: 'Master the art of strategic thinking and decision-making with proven frameworks and methodologies used by top executives.', presenter: 'Dr. Emily Chen', presenterTitle: 'Strategic Leadership Consultant', company: 'Strategy First', date: '2024-01-25', time: '3:00 PM EST', duration: '60 minutes', attendees: '3,200+', category: 'Strategy', tags: ['Strategic Thinking', 'Decision Making', 'Leadership', 'Planning'], thumbnail: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=600&h=400&fit=crop', status: 'Available', featured: false, level: 'Advanced', format: 'Virtual', rating: 4.7, price: 'Free' }, { id: '4', slug: 'emotional-intelligence-workplace', title: 'Emotional Intelligence in the Workplace: Leading with Empathy', description: 'Explore the critical role of emotional intelligence in effective leadership and learn practical techniques for developing empathy and emotional awareness.', presenter: 'Jennifer Adams', presenterTitle: 'Executive Coach & EQ Specialist', company: 'Empathy Leadership Group', date: '2024-01-18', time: '2:30 PM EST', duration: '85 minutes', attendees: '2,100+', category: 'Personal Development', tags: ['Emotional Intelligence', 'Empathy', 'Communication', 'Leadership'], thumbnail: 'https://images.unsplash.com/photo-1559027615-cd4628902d4a?w=600&h=400&fit=crop', status: 'Recorded', featured: false, level: 'Intermediate', format: 'Hybrid', rating: 4.6, price: 'Free' }, { id: '5', slug: 'crisis-leadership-management', title: 'Crisis Leadership: Managing Through Uncertainty and Change', description: 'Learn essential crisis leadership skills and strategies for guiding organizations through challenging times and uncertainty.', presenter: 'David Park', presenterTitle: 'Crisis Management Expert', company: 'Risk Management Solutions', date: '2024-01-10', time: '1:30 PM EST', duration: '70 minutes', attendees: '2,800+', category: 'Crisis Management', tags: ['Crisis Leadership', 'Change Management', 'Communication', 'Strategy'], thumbnail: 'https://images.unsplash.com/photo-1552664730-d307ca884978?w=600&h=400&fit=crop', status: 'Live', featured: false, level: 'Advanced', format: 'Virtual', rating: 4.8, price: 'Free' }, { id: '6', slug: 'future-workplace-trends', title: 'The Future of Work: Preparing for Tomorrow\'s Workplace', description: 'Discover emerging workplace trends and learn how to prepare your organization and teams for the future of work.', presenter: 'Lisa Thompson', presenterTitle: 'Future of Work Analyst', company: 'Tomorrow Institute', date: '2024-01-05', time: '4:00 PM EST', duration: '80 minutes', attendees: '1,950+', category: 'Future of Work', tags: ['Future Trends', 'Workplace Evolution', 'Technology', 'Leadership'], thumbnail: 'https://images.unsplash.com/photo-1600880292203-757bb62b4baf?w=600&h=400&fit=crop', status: 'Upcoming', featured: false, level: 'Beginner', format: 'Hybrid', rating: 4.5, price: 'Free' }, { id: '7', slug: 'ai-leadership-transformation', title: 'AI-Powered Leadership: Transforming Decision Making', description: 'Explore how artificial intelligence is reshaping leadership practices and learn to leverage AI tools for better decision-making.', presenter: 'Dr. Alex Kim', presenterTitle: 'AI Strategy Director', company: 'AI Leadership Labs', date: '2024-03-15', time: '2:00 PM EST', duration: '75 minutes', attendees: '3,500+', category: 'Technology Leadership', tags: ['Artificial Intelligence', 'Decision Making', 'Technology', 'Innovation'], thumbnail: 'https://images.unsplash.com/photo-1677442136019-21780ecad995?w=600&h=400&fit=crop', status: 'Upcoming', featured: true, level: 'Advanced', format: 'Virtual', rating: 4.9, price: 'Free' }, { id: '8', slug: 'sustainable-leadership-live', title: 'Sustainable Leadership: Building for the Future - LIVE SESSION', description: 'Join us LIVE as we discuss sustainable leadership practices and environmental responsibility in business leadership.', presenter: 'Maria Santos', presenterTitle: 'Sustainability Leadership Expert', company: 'Green Leadership Council', date: '2024-02-20', time: '1:00 PM EST', duration: '90 minutes', attendees: '2,200+', category: 'Sustainable Leadership', tags: ['Sustainability', 'Environmental Leadership', 'Future Business', 'Corporate Responsibility'], thumbnail: 'https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?w=600&h=400&fit=crop', status: 'Live', featured: true, level: 'Intermediate', format: 'Virtual', rating: 4.7, price: 'Free' }, { id: '9', slug: 'cross-cultural-leadership', title: 'Cross-Cultural Leadership: Leading Global Teams Effectively', description: 'Develop the skills needed to lead diverse, multicultural teams across different time zones and cultural contexts.', presenter: 'Dr. Raj Patel', presenterTitle: 'Global Leadership Specialist', company: 'International Business Academy', date: '2024-02-25', time: '11:00 AM EST', duration: '65 minutes', attendees: '1,750+', category: 'Global Leadership', tags: ['Cross-Cultural', 'Global Teams', 'Diversity', 'Communication'], thumbnail: 'https://images.unsplash.com/photo-1573164713714-d95e436ab8d6?w=600&h=400&fit=crop', status: 'Available', featured: false, level: 'Intermediate', format: 'Virtual', rating: 4.6, price: 'Free' } ]; // Filter configurations const categories = ['All Categories', 'Digital Transformation', 'Team Development', 'Strategy', 'Personal Development', 'Crisis Management', 'Future of Work', 'Technology Leadership', 'Sustainable Leadership', 'Global Leadership']; const formats = ['All Formats', 'Virtual', 'Hybrid', 'In Person']; const levels = ['All Levels', 'Beginner', 'Intermediate', 'Advanced']; const statuses = ['All Status', 'Available', 'Live', 'Upcoming', 'Recorded', 'Featured']; const sortOptions = [ { value: 'Most Popular', label: 'Most Popular' }, { value: 'newest', label: 'Newest First' }, { value: 'oldest', label: 'Oldest First' }, { value: 'title', label: 'Title A-Z' }, { value: 'duration', label: 'Duration' }, { value: 'rating', label: 'Highest Rated' } ]; export function WebinarsPage() { const [searchTerm, setSearchTerm] = useState(''); const [selectedCategory, setSelectedCategory] = useState('All Categories'); const [selectedFormat, setSelectedFormat] = useState('All Formats'); const [selectedLevel, setSelectedLevel] = useState('All Levels'); const [selectedStatus, setSelectedStatus] = useState('All Status'); const [sortBy, setSortBy] = useState('Most Popular'); const [viewType, setViewType] = useState<'grid' | 'list'>('grid'); const [currentPage, setCurrentPage] = useState(1); const webinarsPerPage = 9; const containerRef = useRef(null); // Filter and sort webinars const filteredWebinars = webinarsData.filter(webinar => { const matchesSearch = webinar.title.toLowerCase().includes(searchTerm.toLowerCase()) || webinar.description.toLowerCase().includes(searchTerm.toLowerCase()) || webinar.presenter.toLowerCase().includes(searchTerm.toLowerCase()) || webinar.tags.some(tag => tag.toLowerCase().includes(searchTerm.toLowerCase())); const matchesCategory = selectedCategory === 'All Categories' || webinar.category === selectedCategory; const matchesFormat = selectedFormat === 'All Formats' || webinar.format === selectedFormat; const matchesLevel = selectedLevel === 'All Levels' || webinar.level === selectedLevel; const matchesStatus = selectedStatus === 'All Status' || webinar.status === selectedStatus || (selectedStatus === 'Featured' && webinar.featured); return matchesSearch && matchesCategory && matchesFormat && matchesLevel && matchesStatus; }).sort((a, b) => { switch (sortBy) { case 'newest': return new Date(b.date).getTime() - new Date(a.date).getTime(); case 'oldest': return new Date(a.date).getTime() - new Date(b.date).getTime(); case 'title': return a.title.localeCompare(b.title); case 'duration': return parseInt(b.duration) - parseInt(a.duration); case 'rating': return b.rating - a.rating; default: return 0; } }); // Statistics const stats = { total: webinarsData.length, available: webinarsData.filter(w => w.status === 'Available').length, live: webinarsData.filter(w => w.status === 'Live').length, upcoming: webinarsData.filter(w => w.status === 'Upcoming').length, recorded: webinarsData.filter(w => w.status === 'Recorded').length, featured: webinarsData.filter(w => w.featured).length, avgRating: (webinarsData.reduce((sum, w) => sum + w.rating, 0) / webinarsData.length).toFixed(1) }; // Paginate results const totalPages = Math.ceil(filteredWebinars.length / webinarsPerPage); const currentWebinars = filteredWebinars.slice((currentPage - 1) * webinarsPerPage, currentPage * webinarsPerPage); const formatDate = (dateString: string) => { return new Date(dateString).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }); }; const clearAllFilters = () => { setSearchTerm(''); setSelectedCategory('All Categories'); setSelectedFormat('All Formats'); setSelectedLevel('All Levels'); setSelectedStatus('All Status'); setSortBy('Most Popular'); }; const hasActiveFilters = searchTerm || selectedCategory !== 'All Categories' || selectedFormat !== 'All Formats' || selectedLevel !== 'All Levels' || selectedStatus !== 'All Status'; const renderStars = (rating: number) => { return Array.from({ length: 5 }, (_, i) => ( )); }; return (
{/* Hero Section with Background Image */}
{/* Background Image */}
{/* Hero Content */}
Expert Leadership Insights

Transform Your Leadership
Through Expert Webcasts

Access world-class leadership development content from industry experts. Join thousands of leaders who are advancing their skills through our comprehensive webcast library.

{ const filtersSection = document.getElementById('webinars-filters'); if (filtersSection) { filtersSection.scrollIntoView({ behavior: 'smooth' }); } }} className="cta-text-black" />
{/* Statistics Strip at Bottom */}
{stats.total}+
Expert Webcasts
{stats.live + stats.upcoming}
Live & Upcoming
25K+
Total Attendees
{stats.avgRating}/5
Average Rating
{/* Search and Controls Section */}
{/* Search and View Controls */}
{/* 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' }} />
{/* Controls */}
{/* View Toggle */}
{/* Sort */}
{/* Filters */}
{hasActiveFilters && ( )}
Showing {currentWebinars.length} of {filteredWebinars.length} webcasts
{/* Webinars Content */}
{currentWebinars.length === 0 ? (

No webcasts found

Try adjusting your filters or search terms to find relevant content.

) : ( <> {/* Grid View */} {viewType === 'grid' && (
{currentWebinars.map((webinar) => ( navigateTo(`/webinar/${webinar.slug}`)} >
{/* Status Badge */}
{webinar.status === 'Live' && ( LIVE )} {webinar.status === 'Upcoming' && ( Upcoming )} {webinar.status === 'Recorded' && ( Replay Available )}
{webinar.featured && (
Featured
)} {/* Play Button Overlay */}
{/* Meta Info */}
{webinar.format} {webinar.level}
{renderStars(webinar.rating)} {webinar.rating}

{webinar.title}

{webinar.description}

{/* Presenter Info */}
{webinar.presenter}
{webinar.presenterTitle}
{/* Details */}
{webinar.duration}
{webinar.attendees}
{webinar.format}
{/* Date and Price */}
{formatDate(webinar.date)}
{webinar.price}
))}
)} {/* List View */} {viewType === 'list' && (
{currentWebinars.map((webinar) => ( navigateTo(`/webinar/${webinar.slug}`)} >
{webinar.featured && (
Featured
)}
{webinar.format} {webinar.level} {webinar.status === 'Live' && ( LIVE )} {webinar.status === 'Upcoming' && ( Upcoming )} {webinar.status === 'Recorded' && ( Replay Available )}
{renderStars(webinar.rating)} {webinar.rating}

{webinar.title}

{webinar.description}

{webinar.duration}
{webinar.attendees}
By {webinar.presenter}
{formatDate(webinar.date)}
{webinar.price}
))}
)} {/* Pagination */} {totalPages > 1 && (
{Array.from({ length: Math.min(totalPages, 7) }, (_, i) => { let page; if (totalPages <= 7) { page = i + 1; } else if (currentPage <= 4) { page = i + 1; } else if (currentPage >= totalPages - 3) { page = totalPages - 6 + i; } else { page = currentPage - 3 + i; } return ( ); })}
)} )}
{/* CTA Section */}

Ready to Transform Your Leadership?

Join thousands of professionals who are advancing their careers through our expert-led webcasts. Start your leadership transformation today.

navigateTo('/contact?topic=leadership-development')} className="cta-text-black" />
); }