"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import type { Locale } from "@/lib/site-content"; function localize(locale: Locale, path: string) { if (!path || path === "/") { return `/${locale}`; } return `/${locale}${path}`; } function isActive(pathname: string, href: string) { if (href === "/") { return pathname === href; } return pathname === href || pathname.startsWith(`${href}/`); } export function MainNav({ locale, labels, }: { locale: Locale; labels: { home: string; docs: string; skills: string; console: string; pricing: string; }; }) { const pathname = usePathname(); const items = [ { href: localize(locale, "/"), label: labels.home }, { href: localize(locale, "/docs"), label: labels.docs }, { href: localize(locale, "/skills"), label: labels.skills }, { href: localize(locale, "/console"), label: labels.console }, { href: localize(locale, "/pricing"), label: labels.pricing }, ]; return ( ); }