import React, { useState, useEffect } from 'react'; import { Button } from './ui/button'; import { Avatar, AvatarFallback, AvatarImage } from './ui/avatar'; import { Badge } from './ui/badge'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownMenuSeparator, DropdownMenuLabel, } from './ui/dropdown-menu'; import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger, } from './ui/sheet'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/collapsible'; import { navigateTo } from './Router'; import { useAuth } from './AuthContext'; import { useCart } from './CartContext'; import { ImageWithFallback } from './figma/ImageWithFallback'; import { PrimaryCTAButton } from './PrimaryCTAButton'; import { StandardCTAButton } from './StandardCTAButton'; import klcLogo from 'figma:asset/e98caa8afd8d11246bbff1dde75bbaae6f6a0894.png'; import { Menu, ChevronDown, ChevronRight, Building2, User, Settings, LogOut, LayoutDashboard, Users, Target, Award, Lightbulb, GraduationCap, BookOpen, Video, FileText, Eye, Heart, MapPin, Calendar, Play, Home, Monitor, Headphones, Globe, Download, Clock, TrendingUp, Star, BookMarked, Podcast, Building, ShoppingCart, ArrowRight } from 'lucide-react'; interface NavigationProps { currentPage?: string; } interface NavLink { label: string; href?: string; items?: { label: string; href: string; description?: string; icon?: any }[]; icon?: any; } const navigationItems: NavLink[] = [ { label: 'Services', items: [ { label: 'Leadership Development', href: '/services/leadership-development', description: 'Executive and senior leadership programs', icon: Target }, { label: 'Management Development', href: '/services/management-development', description: 'Middle management and team leader training', icon: Users }, { label: 'Culture Competence', href: '/services/culture-competence', description: 'Building inclusive and high-performance cultures', icon: Heart }, { label: 'Consulting', href: '/services/consulting', description: 'Strategic organizational transformation', icon: Lightbulb }, { label: 'Executive Coaching', href: '/services/executive-coaching', description: 'Personalized leadership development', icon: GraduationCap } ] }, { label: 'About Us', items: [ { label: 'Our Vision', href: '/about/our-vision', description: 'Our mission to transform leadership globally', icon: Eye }, { label: 'Our Impact', href: '/about/our-impact', description: 'Real results and measurable outcomes', icon: TrendingUp }, { label: 'Our Expertise', href: '/about/our-expertise', description: 'Industry-leading knowledge and experience', icon: Star } ] }, { label: 'Learning Facility', href: '/services/learning-facility' }, { label: 'Resources', items: [ { label: 'Article Blog', href: '/learning/articles', description: 'Latest insights and thought leadership', icon: BookMarked }, { label: 'Webcast', href: '/learning/webcast', description: 'Live and recorded leadership sessions', icon: Podcast } ] }, { label: 'Online Courses', href: '/learning-online' }, { label: 'Contact Us', href: '/contact' } ]; const signInOptions = [ { label: 'Corporate HR', href: '/signin/corporate-hr', description: 'HR dashboard, team management, and bulk enrollment tools' }, { label: 'Corporate Learner', href: '/signin/corporate-learner', description: 'Employee learning dashboard and assigned programs' }, { label: 'Self-Learner', href: '/signin/self-learner', description: 'Individual professional development access' } ]; function NavLink({ item, isMobile = false }: { item: NavLink; isMobile?: boolean }) { const [isOpen, setIsOpen] = useState(false); if (item.href) { return ( ); } if (isMobile) { return ( {item.items?.map((subItem) => ( ))} ); } return ( {item.items?.map((subItem) => ( navigateTo(subItem.href)} className="flex items-start gap-3 p-4 cursor-pointer transition-all duration-300 hover:transform hover:-translate-y-1" style={{ fontFamily: 'var(--font-family-base)' }} > {subItem.icon && (
)}
{subItem.label}
{subItem.description && (
{subItem.description}
)}
))}
); } function ProfileDropdown({ user }: { user: any }) { const { signOut } = useAuth(); const handleSignOut = () => { signOut(); navigateTo('/'); }; return (
{user.corporateName}
{user.email}
navigateTo('/dashboard')} className="min-h-[44px]" style={{ fontSize: '14px', // Reduced from var(--font-body) by 2px fontFamily: 'var(--font-family-base)' }} > Dashboard navigateTo('/team')} className="min-h-[44px]" style={{ fontSize: '14px', // Reduced from var(--font-body) by 2px fontFamily: 'var(--font-family-base)' }} > Team Management navigateTo('/profile')} className="min-h-[44px]" style={{ fontSize: '14px', // Reduced from var(--font-body) by 2px fontFamily: 'var(--font-family-base)' }} > Profile navigateTo('/settings')} className="min-h-[44px]" style={{ fontSize: '14px', // Reduced from var(--font-body) by 2px fontFamily: 'var(--font-family-base)' }} > Settings Sign Out
); } function CartIcon() { const { cartCount } = useCart(); const handleCartClick = () => { navigateTo('/cart'); }; return ( ); } export function Navigation({ currentPage }: NavigationProps) { const [isScrolled, setIsScrolled] = useState(false); const { user, isAuthenticated, signOut } = useAuth(); useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 10); }; window.addEventListener('scroll', handleScroll); return () => { window.removeEventListener('scroll', handleScroll); }; }, []); const handleMobileSignOut = () => { signOut(); navigateTo('/'); }; return ( <> {/* Top notification bar - PRESERVED */}
Join Our Upcoming Leadership Webinars - Transform Your Leadership Journey
{/* Main navigation header - ENHANCED STICKY */}
); }