//* PACKAGES import { Button } from "@/components/ui/button"; import { Link } from "@inertiajs/react"; import * as SheetPrimitive from "@radix-ui/react-dialog"; import { ChevronLeft, ChevronRight, Menu, X } from "lucide-react"; import { useState } from "react"; //* THEME import GoToSearchPage from "$/uwil/Header/GoToSearchPage"; import Logo from "$/uwil/Logo"; import { Sheet, SheetContent, SheetFooter, SheetHeader, SheetTrigger, } from "$/uwil/Sheet"; import SocialNetworks from "$/uwil/SocialNetworks"; import { cn } from "@/lib/utils"; import { FrontNavLinkProps } from "@/types/front"; function ConditionalLink({ title, external, href, className, }: FrontNavLinkProps & { className?: string }) { return external ? ( {title} ) : ( {title} ); } export default function MobileNav({ navLinks, }: { navLinks: FrontNavLinkProps[]; }) { const [activeMenu, setActiveMenu] = useState(null); const goBack = () => setActiveMenu(null); const headerClasses = "h-[140px] flex flex-row items-start justify-between relative pt-2"; return (
{/* Contenu menu */}
{!activeMenu && navLinks.map((link) => (
{link.children ? (
{link.title}
) : ( // eslint-disable-next-line react/jsx-props-no-spreading )}
))}
{activeMenu && (
{activeMenu.title}
    {activeMenu.children?.map((child) => (
  • ))}
)}
); }