"use client"; import { cn } from "@/lib/utils"; import Link from "next/link"; import { useState } from "react"; import { IoIosMenu, IoIosClose } from "react-icons/io"; import { Logo } from "../Logo"; import { useMotionValueEvent, useScroll } from "framer-motion"; type NavItem = { title: string; link: string; target?: "_blank"; children?: NavItem[]; }; type Props = { navItems: NavItem[]; }; export const MobileNavbar = ({ navItems }: Props) => { const [open, setOpen] = useState(false); const { scrollY } = useScroll(); const [showBackground, setShowBackground] = useState(false); useMotionValueEvent(scrollY, "change", (value) => { if (value > 100) { setShowBackground(true); } else { setShowBackground(false); } }); return (