"use client"; import { useState } from "react"; // import Link from "next/link"; import { AnimatePresence, motion } from "framer-motion"; // --- Navigation temporarily disabled ------------------------------------- // Non-navigating stub replaces next/link so mobile menu items still render and // still close the drawer (their onClick={onClose} runs) but go nowhere. // Restore the import above to re-enable navigation. const Link = ({ href, onClick, children, ...props }) => ( { e.preventDefault(); onClick?.(e); }} {...props} > {children} ); // ------------------------------------------------------------------------- import { mainNav, headerCta } from "@/config/navigation"; import { serviceCategories } from "@/data/services"; import { cn } from "@/lib/utils"; import { ChevronDown } from "@/components/ui/icons"; /** * Mobile slide-down navigation drawer. Each menu with children becomes an * accordion; Services expands into its categories → service links. */ export default function MobileNav({ open, onClose }) { const [expanded, setExpanded] = useState(null); const toggle = (title) => setExpanded((cur) => (cur === title ? null : title)); return ( {open && (
{mainNav.map((item) => { const hasMenu = item.type === "mega" || item.type === "dropdown"; if (!hasMenu) { return ( {item.title} ); } const isOpen = expanded === item.title; return (
{isOpen && (
{item.type === "mega" ? serviceCategories.map((cat) => (

{cat.title}

{cat.services.map((svc) => ( {svc.name} ))}
)) : item.items.map((link) => ( {link.title} ))}
)}
); })} {headerCta.title}
)}
); }