'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { useState } from 'react'; import LanguageSwitcher from './LanguageSwitcher'; interface NavigationProps { t: { nav: { home: string; products: string; pricing: string; support: string; contact: string; }; }; currentLang: string; onLanguageChange: (lang: string) => void; isLoaded: boolean; } export default function Navigation({ t, currentLang, onLanguageChange, isLoaded, }: NavigationProps) { const pathname = usePathname(); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); // Navigation items with their corresponding paths const navItems = [ { key: 'home', label: t.nav.home, path: `/${currentLang}` }, { key: 'products', label: t.nav.products, path: `/${currentLang}/products` }, { key: 'pricing', label: t.nav.pricing, path: `/${currentLang}/pricing` }, { key: 'support', label: t.nav.support, path: `/${currentLang}/support` }, { key: 'contact', label: t.nav.contact, path: `/${currentLang}/contact` }, ]; // Function to check if current path is active const isActivePath = (path: string) => { if (path === `/${currentLang}`) { return pathname === path; } return pathname.startsWith(path); }; return ( ); }