"use client"; import { useGSAP } from "@gsap/react"; import gsap from "gsap"; import { usePathname } from "next/navigation"; import { useRef } from "react"; import { isActivePath, navItems } from "@/lib/navigation"; import { cn } from "@/lib/utils"; if (typeof window !== "undefined") { gsap.registerPlugin(useGSAP); } function NavItem({ href, label, active, Icon, index, }: { href: string; label: string; active: boolean; Icon: React.ComponentType>; index: number; }) { return ( {/* Precision Micro-Indicator */} {active && ( )} {/* Tooltip on hover */} {label} ); } export function NavRail() { const pathname = usePathname(); const path = pathname ?? "/"; const railRef = useRef(null); useGSAP( () => { if (!railRef.current) return; const items = railRef.current.querySelectorAll(".nav-dock-item"); gsap.fromTo( items, { opacity: 0, x: -6 }, { opacity: 1, x: 0, duration: 0.3, stagger: 0.025, ease: "power2.out", clearProps: "transform", }, ); }, { scope: railRef }, ); return ( ); }