"use client"; import * as React from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; type NavTabBarProps = React.HTMLAttributes; export function NavTabBar({ className, children, ...props }: NavTabBarProps) { return ( ); } interface NavTabProps { href: string; icon?: React.ReactNode; children: React.ReactNode; /** When true, only an exact path match is treated as active. */ exact?: boolean; className?: string; } export function NavTab({ href, icon, children, exact, className, }: NavTabProps) { const pathname = usePathname(); const active = exact ? pathname === href : pathname === href || pathname?.startsWith(`${href}/`); return ( {icon ? {icon} : null} {children} ); }