"use client"; import { useState } from "react"; import Link from "next/link"; import { Menu, X } from "lucide-react"; import { motion } from "framer-motion"; import LanguageSwitcher from "./languageSwitcher"; import { useLanguage } from "@/context/language-context"; import Image from "next/image"; import { useProductStore } from "@/lib/productZustand"; interface NavLink { id: string; labelKey: string; href: string; } interface NavbarProps { logoText?: string; } export function Navbar({ logoText = "FIRMA" }: NavbarProps) { const [isOpen, setIsOpen] = useState(false); const { t } = useLanguage(); const resetProductName = useProductStore((state) => state.resetProductName); const navLinks: NavLink[] = [ { id: "about", labelKey: t.nav.about, href: "#about" }, { id: "products", labelKey: t.nav.products, href: "#products" }, { id: "faq", labelKey: t.nav.faq, href: "#faq" }, { id: "contact", labelKey: t.nav.contact, href: "#contact" }, ]; const handleScroll = (href: string) => { if (href.startsWith("#")) { const element = document.querySelector(href); if (element) { element.scrollIntoView({ behavior: "smooth" }); } } setIsOpen(false); }; return ( ); }