// components/HeaderClient.tsx "use client"; import React, { useState } from "react"; import Link from "next/link"; import Image from "next/image"; import { usePathname } from "next/navigation"; // Import usePathname import { FiChevronDown, FiClipboard, FiMenu, FiX, FiUsers, FiCpu, FiBox, } from "react-icons/fi"; import ThemeToggle from "./ThemeToggle"; const omsLogoUrl = "/oms-logo.svg"; type DropdownLinkProps = { href: string; children: React.ReactNode; onClick?: () => void; }; const DropdownLink = ({ href, children, onClick }: DropdownLinkProps) => ( {children} ); const HeaderClient = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); const toggleMenu = () => setIsMenuOpen((open) => !open); const handleMobileLinkClick = () => setIsMenuOpen(false); const [servicesDropdownOpen, setServicesDropdownOpen] = useState(false); const [productsDropdownOpen, setProductsDropdownOpen] = useState(false); //const [joinUsDropdownOpen, setJoinUsDropdownOpen] = useState(false); const handleServicesMouseEnter = () => setServicesDropdownOpen(true); const handleServicesMouseLeave = () => setServicesDropdownOpen(false); const handleProductsMouseEnter = () => setProductsDropdownOpen(true); const handleProductsMouseLeave = () => setProductsDropdownOpen(false); // const handleJoinUsMouseEnter = () => setJoinUsDropdownOpen(true); // const handleJoinUsMouseLeave = () => setJoinUsDropdownOpen(false); const pathname = usePathname(); // Get current path // Helper function to check if a path is active (exact match for simple links, startsWith for base paths) const isActive = (href: string, exact = false) => { if (exact) { return pathname === href; } // Handle root path specifically if (href === "/") { return pathname === "/"; } return pathname.startsWith(href); }; const megaMenuTriggerClasses = ` relative inline-flex items-center text-sm font-medium text-primary-foreground hover:opacity-90 transition-opacity duration-150 ease-in-out pb-1 after:content-[''] after:absolute after:left-0 after:bottom-0 after:h-[2px] after:w-0 after:bg-primary-foreground/80 after:transition-all after:duration-300 after:ease-out `; const megaMenuItemClasses = ` flex items-center p-3 -m-3 rounded-lg hover:bg-secondary transition-colors duration-150 ease-in-out `; const megaMenuIconClasses = `flex-shrink-0 h-6 w-6 text-primary mr-4`; const megaMenuTextWrapperClasses = `text-sm`; const megaMenuTitleClasses = `font-semibold text-card-foreground`; return (
{/* Top Row */}
OMS Logo Owethu Managed Services
Request OBSE Demo
{/* Secondary Row w/ Mega Menus */}
{/* Wrap nav and link in a flex container */}
{/* ← Here’s the Explore Our Offerings link, back in its original spot Explore Our Offerings */}
{" "} {/* Close the new flex container */}
{/* Mobile Menu */}
); }; export default HeaderClient; //
// //
//
//
// // {" "} // {/* Apply active class */} // //
//

// Current Vacancies //

//
// // // {" "} // {/* Apply active class */} // //
//

// Recruitment Portal //

//
// //
//
//
//