"use client"; import { useState, useEffect } from "react"; import { createPortal } from "react-dom"; import Link from "next/link"; import { NavIcon } from "./ui"; import { useTranslation } from "../../lib/i18n/context"; type NavItem = { href: "/" | "/books" | "/series" | "/authors" | "/libraries" | "/jobs" | "/tokens" | "/settings"; label: string; icon: "dashboard" | "books" | "series" | "authors" | "libraries" | "jobs" | "tokens" | "settings"; }; const HamburgerIcon = () => ( ); const XIcon = () => ( ); export function MobileNav({ navItems }: { navItems: NavItem[] }) { const { t } = useTranslation(); const [isOpen, setIsOpen] = useState(false); const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); const overlay = ( <> {/* Backdrop */}