'use client' import { useEffect, useState } from 'react' import { useTranslations } from 'next-intl' import { Link } from '@/i18n/navigation' import { ThemeToggle } from '@/components/theme-toggle' import LanguageSwitcher from '@/components/layout/LanguageSwitcher' import { GlitchButton } from '@/components/effects/glitch-button' export function Navbar() { const t = useTranslations('Navigation') const [isVisible, setIsVisible] = useState(true) const [lastScrollY, setLastScrollY] = useState(0) const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false) useEffect(() => { const handleScroll = () => { const currentScrollY = window.scrollY if (currentScrollY < 10) { setIsVisible(true) } else if (currentScrollY > lastScrollY) { setIsVisible(false) setIsMobileMenuOpen(false) } else { setIsVisible(true) } setLastScrollY(currentScrollY) } window.addEventListener('scroll', handleScroll, { passive: true }) return () => window.removeEventListener('scroll', handleScroll) }, [lastScrollY]) return ( ) }