"use client"; import { motion, AnimatePresence } from "framer-motion"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { House, CalendarDays, ScanLine, Coins, UserCircle } from "lucide-react"; import { useTheme } from "@/app/lib/ThemeContext"; const MotionLink = motion(Link); const LEFT_ITEMS = [ { href: "/", icon: House, label: "Home" }, { href: "/events", icon: CalendarDays, label: "Events" }, ]; const RIGHT_ITEMS = [ { href: "/store", icon: Coins, label: "Points" }, { href: "/settings", icon: UserCircle, label: "Profile" }, ]; const AUTH_PATHS = new Set(["/login", "/register", "/forgot-password", "/register/verify", "/reset-password"]); export default function BottomNav() { const pathname = usePathname(); const router = useRouter(); const { isDark } = useTheme(); if (AUTH_PATHS.has(pathname)) return null; const isActive = (href: string) => href === "/" ? pathname === "/" : pathname === href || pathname.startsWith(href + "/"); const inactiveColor = isDark ? "rgba(255,255,255,0.65)" : "#6B6B6B"; const NavBtn = ({ href, icon: Icon, label, }: { href: string; icon: typeof House; label: string; }) => { const active = isActive(href); return ( {active && ( )} {/* Scales with the device font up to 20px, then holds: four labels must still fit beside the check-in button on a 390px screen at 150–200% text. Line-height is unitless so it does not re-balloon with the root font size. */} {label} ); }; return ( ); }