"use client"; import Image from "next/image"; import Link from "next/link"; import { Button } from "@/components/ui/button"; import { ChevronDown, Lock, Menu, X } from "lucide-react"; import { useEffect, useState } from "react"; import { usePathname } from "next/navigation"; import { AnimatePresence, motion } from "framer-motion"; export default function Navbar() { const pathname = usePathname(); const [showProdukMenu, setShowProdukMenu] = useState(false); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const isActive = (path: string) => pathname === path || pathname.startsWith(path + "/"); useEffect(() => { const handleClickOutside = () => { setShowProdukMenu(false); }; window.addEventListener("click", handleClickOutside); return () => window.removeEventListener("click", handleClickOutside); }, []); const produkList = [ { name: "JAECOO J7 AWD", img: "/j7awd.png", link: "/produk/jaecoo7", }, { name: "JAECOO J7 SHS", img: "/j7shs.png", link: "/produk/jaecoo7", }, { name: "JAECOO J8 AWD", img: "/j8awd.png", link: "/produk/jaecoo8", }, ]; return ( ); }