import { useState, useEffect } from "react"; import { Button } from "@/components/ui/button"; import { Menu, X, Globe } from "lucide-react"; import { useI18n } from "@/i18n/context"; import { localeLabels, type Locale } from "@/i18n/translations"; import type { TranslationKeys } from "@/i18n/translations"; const navLinks: { key: TranslationKeys; href: string }[] = [ { key: "nav_technology", href: "#technology" }, { key: "nav_performance", href: "#performance" }, { key: "nav_pricing", href: "#pricing" }, { key: "nav_faq", href: "#faq" }, ]; const locales: Locale[] = ["en", "ru", "zh"]; export function Navbar() { const [scrolled, setScrolled] = useState(false); const [mobileOpen, setMobileOpen] = useState(false); const [langOpen, setLangOpen] = useState(false); const { t, locale, setLocale } = useI18n(); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 20); window.addEventListener("scroll", onScroll); return () => window.removeEventListener("scroll", onScroll); }, []); return ( ); }