"use client"; import { AnimatePresence, motion } from "motion/react"; import Image from "next/image"; import { type ReactNode, useRef, useState } from "react"; import { FALLBACK_HOTEL_NAME } from "@/lib/brand"; import { mobileMenuVariants } from "@/lib/motion"; interface MobileNavProps { children: ReactNode; menuLabel?: string; closeLabel?: string; brandLabel?: string; } export function MobileNav({ children, menuLabel = "Open menu", closeLabel = "Close menu", brandLabel = FALLBACK_HOTEL_NAME, }: MobileNavProps) { const [open, setOpen] = useState(false); const detailsRef = useRef(null); return (
{open && (
{brandLabel} {closeLabel}
{children}
)}
); }