import React, { useState } from 'react'; import { navigateTo } from './Router'; import { Card, CardContent } from './ui/card'; import { PrimaryCTAButton } from './PrimaryCTAButton'; import { CheckCircle, Target, ChevronLeft, ChevronRight } from 'lucide-react'; // Types for the reusable carousel export interface CarouselItem { title: string; description: string; icon: React.ComponentType; features?: string[]; outcome?: string; // Additional flexible properties for different content types [key: string]: any; } export interface CarouselConfig { eyebrowText: string; title: string; description: string; ctaText: string; ctaAction: () => void; ctaAriaLabel: string; } export interface ReusableCarouselProps { items: CarouselItem[]; config: CarouselConfig; className?: string; cardWidth?: string; // Default: "70%" cardSpacing?: string; // Default: "mr-7" (28px) featuresTitle?: string; // Default: "Key Features & Benefits:" outcomesTitle?: string; // Default: "Expected Outcomes:" customCardRenderer?: (item: CarouselItem, index: number) => React.ReactNode; } export function ReusableCarousel({ items, config, className = "", cardWidth = "70%", cardSpacing = "mr-7", featuresTitle = "Key Features & Benefits:", outcomesTitle = "Expected Outcomes:", customCardRenderer }: ReusableCarouselProps) { const [currentIndex, setCurrentIndex] = useState(0); const nextSlide = () => { setCurrentIndex((prev) => (prev + 1) % items.length); }; const prevSlide = () => { setCurrentIndex((prev) => (prev - 1 + items.length) % items.length); }; const renderDefaultCard = (item: CarouselItem, index: number) => ( {/* Service Icon & Header - Inline Layout */}
{React.createElement(item.icon, { className: "w-7 h-7 text-primary" })}

{item.title}

{/* Divider Line */}
{/* Description */}

{item.description}

{/* Key Features */} {item.features && item.features.length > 0 && (

{featuresTitle}

{item.features.map((feature: string, featureIndex: number) => (
{feature}
))}
)} {/* Expected Outcomes */} {item.outcome && (

{outcomesTitle}

{item.outcome}
)}
); return (
{/* Header Section */}
{/* Left Side - Eyebrow Text, Header & Subtext */}
{config.eyebrowText}

{config.title}

{config.description}

{/* Navigation Controls - Bottom Right of Header */}
{String(currentIndex + 1).padStart(2, '0')} / {String(items.length).padStart(2, '0')}
{/* Main Carousel Content */}
{/* Carousel Container */}
{items.map((item, index) => (
{customCardRenderer ? customCardRenderer(item, index) : renderDefaultCard(item, index)}
))}
{/* CTA Button - Right Bottom with 40px spacing */}
); } // Pre-configured carousel variants for common use cases export function ConsultingServicesCarousel({ consultingServices }: { consultingServices: CarouselItem[] }) { const config: CarouselConfig = { eyebrowText: "CONSULTING & ADVISORY SERVICES", title: "Our Services", description: "Comprehensive consulting solutions designed to drive organizational transformation and leadership excellence across all levels of your business.", ctaText: "Explore Consulting Services", ctaAction: () => navigateTo('/services/consulting'), ctaAriaLabel: "Explore our consulting services" }; return ( ); } export function LeadershipProgramsCarousel({ leadershipPrograms }: { leadershipPrograms: CarouselItem[] }) { const config: CarouselConfig = { eyebrowText: "LEADERSHIP DEVELOPMENT PROGRAMS", title: "Our Programs", description: "Comprehensive leadership development programs designed to build capabilities and drive organizational transformation with measurable impact.", ctaText: "Explore Leadership Programs", ctaAction: () => navigateTo('/services/leadership-development'), ctaAriaLabel: "Explore our leadership development programs" }; return ( ); } export function ExpertServicesCarousel({ expertServices }: { expertServices: CarouselItem[] }) { const config: CarouselConfig = { eyebrowText: "EXPERT CONSULTATION & SERVICES", title: "Expert Services", description: "Personalized guidance from industry thought leaders and senior practitioners who bring decades of real-world experience.", ctaText: "Connect with Experts", ctaAction: () => navigateTo('/services/executive-coaching'), ctaAriaLabel: "Connect with our expert consultants" }; return ( ); } export function PlatformFeaturesCarousel({ platformFeatures }: { platformFeatures: CarouselItem[] }) { const config: CarouselConfig = { eyebrowText: "DIGITAL PLATFORM FEATURES", title: "Platform Capabilities", description: "State-of-the-art digital learning platform with cutting-edge technology and interactive experiences for modern learning.", ctaText: "Explore Platform", ctaAction: () => navigateTo('/learning-online'), ctaAriaLabel: "Explore our online learning platform" }; return ( ); }