import { useState, useEffect } from "react"; import { Menu, X, Phone, ChevronUp } from "lucide-react"; import { Button } from "./ui/button"; export function MobileNav() { const [isOpen, setIsOpen] = useState(false); const [showScrollTop, setShowScrollTop] = useState(false); useEffect(() => { const handleScroll = () => { setShowScrollTop(window.scrollY > 500); }; window.addEventListener("scroll", handleScroll); return () => window.removeEventListener("scroll", handleScroll); }, []); const scrollToSection = (id: string) => { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: "smooth" }); setIsOpen(false); } }; const scrollToTop = () => { window.scrollTo({ top: 0, behavior: "smooth" }); }; const menuItems = [ { label: "О нас", id: "about" }, { label: "Услуги", id: "services" }, { label: "Преимущества", id: "advantages" }, { label: "Локации", id: "locations" }, { label: "Отзывы", id: "reviews" }, { label: "Контакты", id: "contact" }, ]; return ( <> {/* Mobile Navigation Bar */} {/* Scroll to Top Button */} {showScrollTop && ( )} ); }