'use client'; import * as React from 'react'; import { usePathname } from 'next/navigation'; import { TransitionLink } from '@/components/ui/TransitionLink'; import { Home, Briefcase, Users, Mail } from 'lucide-react'; import { motion } from 'framer-motion'; export interface NavLink { label: string; url: string; } interface MobileBottomNavProps { navLinks: NavLink[]; currentLocale: string; } export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProps) { const pathname = usePathname() || '/'; // Construct our bottom nav items based on the passed links const items = React.useMemo(() => { const homeUrl = `/${currentLocale}`; // Find the specific links from the provided navLinks (which might be translated) // We do a simple match based on index or keywords if needed, but since we know the order: // 0: Kompetenzen, 1: Über uns, 2: Karriere, 3: Messen const competenciesUrl = navLinks[0]?.url || `/${currentLocale}/kompetenzen`; const aboutUrl = navLinks[1]?.url || `/${currentLocale}/ueber-uns`; const contactUrl = `/${currentLocale}/${currentLocale === 'de' ? 'kontakt' : 'contact'}`; return [ { label: currentLocale === 'de' ? 'Start' : 'Home', url: homeUrl, icon: , exactMatch: true }, { label: navLinks[0]?.label || (currentLocale === 'de' ? 'Kompetenzen' : 'Competencies'), url: competenciesUrl, icon: }, { label: navLinks[1]?.label || (currentLocale === 'de' ? 'Über uns' : 'About Us'), url: aboutUrl, icon: }, { label: currentLocale === 'de' ? 'Kontakt' : 'Contact', url: contactUrl, icon: } ]; }, [currentLocale, navLinks]); return (
); }