import React, { useState, useEffect, useRef } from 'react'; import { Button } from './ui/button'; import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; import { Badge } from './ui/badge'; import { Input } from './ui/input'; import { Label } from './ui/label'; import { Textarea } from './ui/textarea'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './ui/accordion'; import { Tabs, TabsContent, TabsList, TabsTrigger } from './ui/tabs'; import { Separator } from './ui/separator'; import { Avatar, AvatarFallback, AvatarImage } from './ui/avatar'; import { Clock, Users, Award, Play, Download, ChevronRight, ChevronLeft, Star, Calendar, Globe, Building2, User, Mail, Phone, MessageCircle, CheckCircle, BookOpen, Target, TrendingUp, Lightbulb, ArrowRight, ExternalLink, Quote, X, AlertCircle } 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 { useCart } from './CartContext'; import { toast } from 'sonner@2.0.3'; // Mock data structure matching API contracts const mockProgrammeData = { id: 'exec-leadership-2024', title: 'Executive Leadership Development Programme', subtitle: 'Transform Your Leadership Impact & Drive Organizational Excellence', duration: '6 Months', level: 'Executive', format: 'Hybrid', price: '₹2,50,000', originalPrice: '₹3,00,000', currency: 'INR', published: true, enrollmentStatus: 'open', // open, closed, enrolled, waitlist spotsLeft: 12, maxCapacity: 30, startDate: '2024-03-15', endDate: '2024-09-15', thumbnail: 'https://images.unsplash.com/photo-1560472354-b33ff0c44a43?w=800&h=600&fit=crop', ctaEnroll: 'Enroll Now', ctaBrochure: 'Download Brochure', highlights: [ 'Harvard Business School Curriculum', '360-Degree Leadership Assessment', 'C-Suite Mentorship Program', 'Global Leadership Simulation', 'Executive Coaching Sessions' ], badges: ['Certified', 'Executive Level', 'Global Faculty'], previewVideoUrl: 'https://example.com/preview-video', deliveryMethods: ['In-Person Workshops', 'Virtual Sessions', 'Self-Paced Learning'], credentials: 'Executive Leadership Certificate from KLC & Harvard Business School', targetROI: '300% Leadership Effectiveness Improvement' }; const mockOutcomes = [ { title: 'Strategic Leadership Mastery', description: 'Develop advanced strategic thinking capabilities to lead organizational transformation and drive sustainable growth in complex business environments.' }, { title: 'Executive Presence & Communication', description: 'Master executive-level communication skills, build commanding presence, and influence stakeholders at all organizational levels.' }, { title: 'Digital Leadership & Innovation', description: 'Lead digital transformation initiatives, foster innovation culture, and navigate technological disruption with confidence.' }, { title: 'Global Team Management', description: 'Excel at managing diverse, cross-cultural teams and driving performance across global markets and virtual environments.' } ]; const mockCurriculum = [ { moduleNumber: 1, title: 'Leadership Foundations & Self-Mastery', duration: '2 Weeks', deliveryStyle: 'Hybrid', topics: [ 'Leadership Philosophy & Values', '360-Degree Assessment & Feedback', 'Emotional Intelligence in Leadership', 'Personal Leadership Brand Development' ] }, { moduleNumber: 2, title: 'Strategic Thinking & Decision Making', duration: '3 Weeks', deliveryStyle: 'In-Person', topics: [ 'Strategic Analysis Frameworks', 'Complex Problem Solving', 'Risk Assessment & Management', 'Data-Driven Decision Making' ] }, { moduleNumber: 3, title: 'Leading High-Performance Teams', duration: '3 Weeks', deliveryStyle: 'Virtual + Simulation', topics: [ 'Team Dynamics & Psychology', 'Performance Management Systems', 'Conflict Resolution Strategies', 'Building Trust & Accountability' ] }, { moduleNumber: 4, title: 'Organizational Transformation', duration: '4 Weeks', deliveryStyle: 'Hybrid', topics: [ 'Change Management Methodologies', 'Culture Transformation', 'Digital Leadership Strategies', 'Innovation & Disruption Management' ] } ]; const mockFaculty = [ { id: 1, name: 'Dr. Sarah Johnson', title: 'Executive Leadership Expert', organization: 'Harvard Business School', bio: 'Former CEO of Fortune 500 companies with 25+ years of executive leadership experience.', image: 'https://images.unsplash.com/photo-1494790108755-2616b10a6e0c?w=150&h=150&fit=crop&crop=face', linkedinUrl: 'https://linkedin.com/in/dr-sarah-johnson', credentials: ['PhD in Organizational Psychology', 'Former CEO, Tech Global Inc.'], expertise: ['Strategic Leadership', 'Digital Transformation'] }, { id: 2, name: 'Prof. Michael Chen', title: 'Strategic Management Professor', organization: 'Stanford Graduate School', bio: 'Renowned strategy expert and author of 5 bestselling business books.', image: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=150&h=150&fit=crop&crop=face', linkedinUrl: 'https://linkedin.com/in/prof-michael-chen', credentials: ['MBA, Wharton', 'Author of "Strategy Excellence"'], expertise: ['Strategic Planning', 'Business Innovation'] }, { id: 3, name: 'Dr. Priya Sharma', title: 'Organizational Psychology Expert', organization: 'KLC Faculty', bio: 'Leading expert in leadership psychology and behavioral change.', image: 'https://images.unsplash.com/photo-1580489944761-15a19d654956?w=150&h=150&fit=crop&crop=face', linkedinUrl: 'https://linkedin.com/in/dr-priya-sharma', credentials: ['PhD in Psychology', 'Certified Executive Coach'], expertise: ['Leadership Psychology', 'Executive Coaching'] } ]; const mockAudienceSegments = [ { title: 'Senior Executives', description: 'C-suite leaders, VPs, and Directors ready to elevate their strategic impact', icon: }, { title: 'High-Potential Leaders', description: 'Emerging leaders identified for executive-level responsibilities', icon: }, { title: 'Entrepreneurs', description: 'Business owners scaling their organizations and leadership capabilities', icon: } ]; const mockUseCases = [ 'Leading organizational transformation initiatives', 'Navigating complex stakeholder relationships', 'Building and scaling high-performance teams', 'Driving innovation and cultural change', 'Managing global and virtual teams', 'Developing next-generation leaders' ]; const mockTestimonials = [ { id: 1, type: 'video', name: 'Robert Martinez', title: 'CEO, TechVenture Inc.', company: 'TechVenture Inc.', content: 'This programme transformed my leadership approach completely. The 360-degree feedback and executive coaching helped me unlock new levels of performance.', videoThumbnail: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=300&h=200&fit=crop', videoUrl: 'https://example.com/testimonial-video-1', rating: 5, programmeCompleted: 'Executive Leadership 2023' }, { id: 2, type: 'text', name: 'Lisa Zhang', title: 'VP Strategy, Global Corp', company: 'Global Corp', content: 'The strategic thinking frameworks and real-world case studies provided immediate value. I applied the learnings to lead a $50M digital transformation project successfully.', rating: 5, programmeCompleted: 'Executive Leadership 2023' }, { id: 3, type: 'text', name: 'David Thompson', title: 'Founder & CEO, StartupX', company: 'StartupX', content: 'As a first-time CEO, this programme gave me the confidence and tools to scale my team from 10 to 100+ employees while maintaining our culture and performance.', rating: 5, programmeCompleted: 'Executive Leadership 2023' } ]; const mockEnrollmentOptions = [ { type: 'individual', title: 'Individual Enrollment', price: '₹2,50,000', originalPrice: '₹3,00,000', features: [ 'Complete programme access', 'Executive coaching sessions', 'Peer learning network', 'Digital resources & tools', 'Certificate upon completion' ], ctaText: 'Enroll Now', popular: false }, { type: 'corporate', title: 'Corporate Package (3+ enrollments)', price: '₹2,00,000', originalPrice: '₹2,50,000', priceNote: 'per person', features: [ 'Everything in Individual', 'Customized company case studies', 'Dedicated learning coordinator', 'Leadership assessment reports', 'Post-programme follow-up sessions' ], ctaText: 'Request Corporate Quote', popular: true }, { type: 'enterprise', title: 'Enterprise Solution (10+ enrollments)', price: 'Custom Pricing', features: [ 'Everything in Corporate', 'On-site delivery options', 'Custom curriculum modules', 'Executive advisory sessions', 'ROI measurement framework' ], ctaText: 'Schedule Consultation', popular: false } ]; const mockFAQs = [ { question: 'What are the programme timings and schedule?', answer: 'The programme runs over 6 months with 2-3 sessions per month. Each session is 2-3 hours, scheduled on weekends to accommodate working professionals. Specific dates are provided upon enrollment.' }, { question: 'What certification will I receive?', answer: 'You will receive an Executive Leadership Certificate jointly issued by KLC and Harvard Business School upon successful completion of all modules and assessments.' }, { question: 'Is there a refund policy?', answer: 'We offer a full refund if you cancel within 7 days of enrollment. After programme commencement, refunds are provided on a pro-rata basis for the first 30 days.' }, { question: 'What technology requirements are needed?', answer: 'You need a reliable internet connection, computer/laptop with camera and microphone for virtual sessions. We provide access to our learning management system and digital resources.' }, { question: 'Can I defer my enrollment to a later cohort?', answer: 'Yes, you can defer your enrollment to the next available cohort up to 6 months from your original start date without additional fees.' } ]; const mockRelatedProgrammes = [ { id: 'strategic-leadership', title: 'Strategic Leadership Mastery', level: 'Advanced', duration: '4 Months', price: '₹1,80,000', thumbnail: 'https://images.unsplash.com/photo-1552581234-26160f608093?w=400&h=300&fit=crop', category: 'Leadership', description: 'Advanced strategic thinking and planning for senior leaders' }, { id: 'digital-leadership', title: 'Digital Leadership Transformation', level: 'Executive', duration: '3 Months', price: '₹2,20,000', thumbnail: 'https://images.unsplash.com/photo-1551434678-e076c223a692?w=400&h=300&fit=crop', category: 'Digital', description: 'Leading digital transformation and innovation initiatives' }, { id: 'global-leadership', title: 'Global Leadership Programme', level: 'Executive', duration: '8 Months', price: '₹3,50,000', thumbnail: 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=300&fit=crop', category: 'Global', description: 'Leading across cultures and global markets' } ]; interface ProgrammeDetailProps { slug?: string; } export function ProgrammeDetail({ slug }: ProgrammeDetailProps) { const [activeTab, setActiveTab] = useState('overview'); const [selectedFaculty, setSelectedFaculty] = useState(0); const [showVideoModal, setShowVideoModal] = useState(false); const [selectedVideo, setSelectedVideo] = useState(null); const [isSticky, setIsSticky] = useState(false); const [showBrochureForm, setShowBrochureForm] = useState(false); const [isSubmitting, setIsSubmitting] = useState(false); const [brochureFormData, setBrochureFormData] = useState({ name: '', email: '', phone: '', company: '', designation: '' }); const heroRef = useRef(null); const { addToCart } = useCart(); // Sticky CTA logic useEffect(() => { const handleScroll = () => { if (heroRef.current) { const heroBottom = heroRef.current.offsetTop + heroRef.current.offsetHeight; setIsSticky(window.scrollY > heroBottom); } }; window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); // Mock API calls (replace with real API calls) const programme = mockProgrammeData; const outcomes = mockOutcomes; const curriculum = mockCurriculum; const faculty = mockFaculty; const testimonials = mockTestimonials; const faqs = mockFAQs; const relatedProgrammes = mockRelatedProgrammes; // Handle enrollment based on status const handleEnrollment = (type: string = 'individual') => { if (programme.enrollmentStatus === 'enrolled') { navigateTo(`/dashboard/course/${programme.id}`); return; } if (programme.spotsLeft === 0) { // Handle waitlist toast.success('Added to waitlist! We\'ll notify you when spots become available.'); return; } if (type === 'individual') { addToCart({ id: programme.id, title: programme.title, thumbnail: programme.thumbnail, price: programme.price, originalPrice: programme.originalPrice, category: 'Executive Programme', level: programme.level }); navigateTo('/cart'); } else if (type === 'corporate') { navigateTo(`/contact?topic=corporate&programme=${programme.id}`); } else if (type === 'enterprise') { navigateTo(`/contact?topic=enterprise&programme=${programme.id}`); } }; // Handle brochure download const handleBrochureDownload = async (e: React.FormEvent) => { e.preventDefault(); setIsSubmitting(true); try { // Mock API call - replace with real endpoint // await fetch(`/api/leads/programme-brochure?programmeId=${programme.id}`, { // method: 'POST', // body: JSON.stringify(brochureFormData) // }); // Simulate API delay await new Promise(resolve => setTimeout(resolve, 1000)); toast.success('Brochure download started! Check your email for additional resources.'); setShowBrochureForm(false); setBrochureFormData({ name: '', email: '', phone: '', company: '', designation: '' }); } catch (error) { toast.error('Unable to process request. Please try again later.'); } finally { setIsSubmitting(false); } }; // Handle 404 for unpublished programmes if (!programme.published) { return (

Programme Not Found

The programme you're looking for is not available or has been unpublished.

); } return (
{/* Enhanced Sticky CTA Bar */} {isSticky && (
{/* Left: Programme Information */}
{/* Programme Thumbnail */}
{/* Quality Badge */}
{/* Programme Details */}

{programme.title}

{/* Meta Information - All Using Same Blue Color */}
{programme.duration}
{programme.level}
{programme.spotsLeft} spots left
{/* Price Display */}
{programme.price} {programme.originalPrice && ( {programme.originalPrice} )}
{/* Right: Action Buttons */}
{/* Secondary Action Button - No Shadow */} {/* Primary CTA Button - No Shadow */}
handleEnrollment()} className="cta-text-black h-12 px-8 transition-all duration-200" /> {/* Urgency Indicator */} {programme.spotsLeft <= 5 && programme.spotsLeft > 0 && (
Only {programme.spotsLeft} left!
)}
{/* Subtle Bottom Accent Line */}
)} {/* Hero Section */}
{/* Left: Programme Info - REDESIGNED */}
{/* Keep as requested: BrandedTag (eyebrow text) */} {/* Keep as requested: Title */}

{programme.title}

{/* Keep as requested: Subtitle */}

{programme.subtitle}

{/* REDESIGNED: Programme Meta Information as Pills */}
Duration: {programme.duration} Level: {programme.level} Format: {programme.format} Spots Left: {programme.spotsLeft}
{/* REDESIGNED: Professional Badges Section */}

Programme Features

{programme.badges.map((badge, index) => ( {badge} ))}
{/* REDESIGNED: Enhanced Pricing Section */}

Programme Investment

{programme.price} {programme.originalPrice && ( {programme.originalPrice} )}
Best Value

Transform your leadership future with this comprehensive development programme

{/* REDESIGNED: Professional CTA Buttons Layout */}
handleEnrollment()} className="cta-text-black flex-1 justify-center" />
{/* Right: Programme Snapshot */}
{/* Preview Video */}
{/* Key Highlights */}

Programme Highlights

    {programme.highlights.map((highlight, index) => (
  • {highlight}
  • ))}
{/* Delivery Methods */}

Delivery Methods

{programme.deliveryMethods.map((method, index) => ( {method} ))}
{/* Credentials */}

Certification

{programme.credentials}

{/* Enhanced Programme Content Tabs */}
{/* Enhanced Tabs List */} Overview Curriculum Faculty Reviews FAQ Enroll {/* Enhanced Learning Outcomes */}
{/* Section: Learning Outcomes */}

Learning Outcomes

Transform your leadership capabilities through our comprehensive curriculum designed for today's business challenges.

{outcomes.map((outcome, index) => (
{outcome.title}

{outcome.description}

))}
{/* Section: Who Should Attend */}

Who Should Attend

This programme is designed for leaders at various stages of their career journey.

{mockAudienceSegments.map((segment, index) => (
{segment.icon}

{segment.title}

{segment.description}

))}
{/* Section: Use Cases */}

Key Use Cases

Apply your learning to real-world leadership challenges and opportunities across diverse organizational contexts.

01

Organizational Transformation

Leading large-scale organizational change initiatives and digital transformation projects

02

Team Development

Building high-performance teams and developing next-generation leaders within your organization

03

Strategic Planning

Developing and implementing strategic initiatives that drive sustainable business growth

04

Global Leadership

Managing diverse, cross-cultural teams and leading in international business environments

05

Innovation Management

Fostering innovation culture and leading creative problem-solving initiatives

06

Performance Excellence

Driving operational excellence and achieving breakthrough performance results

{/* Enhanced Curriculum Structure */}

Programme Curriculum

A comprehensive curriculum designed to build strategic leadership capabilities through progressive modules.

{curriculum.map((module, index) => (
{module.moduleNumber}
{module.title}
{module.duration} {module.deliveryStyle}
    {module.topics.map((topic, topicIndex) => (
  • {topic}
  • ))}
))}
{/* Enhanced Faculty Profiles */}

World-Class Faculty

Learn from industry leaders and renowned academics with decades of executive experience.

{faculty.map((member, index) => ( {member.name.split(' ').map(n => n[0]).join('')}

{member.name}

{member.title}

{member.organization}

{member.bio}

{member.credentials.map((credential, credIndex) => ( {credential} ))}
{member.expertise.map((skill, skillIndex) => ( {skill} ))}
))}
{/* Enhanced Testimonials - Landing Page Design */}

What Our Graduates Say

Hear from leaders who have transformed their careers through our programme.

{/* Landing Page Testimonials Design */}
{/* Testimonials Cards Container */}
{testimonials.map((testimonial, index) => ( {testimonial.type === 'video' ? (
{ setSelectedVideo(testimonial.videoUrl!); setShowVideoModal(true); }} > {/* Video Overlay with Gradient */}
{/* Play Button - Compact Design */}
{/* Video Label - Compact Style */}
🎥 Video
{/* Profile Info - Bottom Section */}

{testimonial.name}

{testimonial.title} {testimonial.company && ` • ${testimonial.company}`}

{/* Star Rating */}
{[1, 2, 3, 4, 5].map((star) => ( ))}
) : ( /* Text Testimonials - Compact Design */
{/* Header Section */}

{testimonial.name}

{testimonial.title}

{testimonial.company && (

{testimonial.company}

)}
{/* Star Rating - Top Right */}
{[1, 2, 3, 4, 5].map((star) => ( ))}
{/* Quote Section - Compact Typography */}
" {testimonial.content}
{/* Bottom Section */}
{testimonial.programmeCompleted}
)} ))}
{/* Enhanced FAQ */}

Frequently Asked Questions

Find answers to common questions about the programme structure, requirements, and enrollment process.

{faqs.map((faq, index) => (
{faq.question}

{faq.answer}

))}
{/* Enhanced Enrollment Options */}

Choose Your Enrollment Option

Select the enrollment option that best fits your learning needs and organizational requirements.

{mockEnrollmentOptions.map((option, index) => ( {option.popular && (
Most Popular
)}

{option.title}

{option.price} {option.originalPrice && ( {option.originalPrice} )}
{option.priceNote && (

{option.priceNote}

)}
    {option.features.map((feature, featureIndex) => (
  • {feature}
  • ))}
))}
{/* Enhanced Related Programmes */}

You Might Also Like

Explore related programmes to continue your leadership journey and expand your expertise across different domains.

{relatedProgrammes.map((related, index) => (
{/* Top Badges */}
{related.category} {related.level}

{related.title}

{related.description}

{/* Metadata Section */}
{related.duration} 1,500+
{[1, 2, 3, 4, 5].map((star) => ( ))} 4.8
{/* Pricing Section */}
{related.price} ₹49,999 Save 25%
{/* Action Buttons */}
))}
{/* Focused CTA Banner - Blue Box Design */}
{/* Background Image */}
{/* Blue Content Box */}
{/* Badge */}
⭐ START NOW
{/* Headline */}

Ready to Lead?{' '} Join Today

{/* Description */}

Transform your leadership potential with expert guidance and proven frameworks.

{/* CTA Button */}
navigateTo(`/contact?topic=programme&programme=${programme.id}`)} className="cta-banner-yellow" />
{/* Support Text */}

Speak with our experts • Free consultation • Custom solutions

{/* Brochure Download Modal */} {showBrochureForm && (

Download Programme Brochure

setBrochureFormData({...brochureFormData, name: e.target.value})} />
setBrochureFormData({...brochureFormData, email: e.target.value})} />
setBrochureFormData({...brochureFormData, phone: e.target.value})} />
setBrochureFormData({...brochureFormData, company: e.target.value})} />
setBrochureFormData({...brochureFormData, designation: e.target.value})} />
)} {/* Video Modal */} {showVideoModal && selectedVideo && (