import React, { useState } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { motion } from 'framer-motion'; import { Menu, X, Building2, ChevronDown } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; const PublicHeader = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); const location = useLocation(); const services = [ { name: 'Virtual Office Dubai', href: '/addresses' }, { name: 'Mail Forwarding', href: '/services/mail' }, { name: 'Phone Services', href: '/services/phone' }, { name: 'Business Setup', href: '/business-setup' }, ]; const company = [ { name: 'About Us', href: '/about' }, { name: 'Our Addresses', href: '/addresses' }, { name: 'Blog', href: '/blog' }, { name: 'FAQ', href: '/faq' }, { name: 'Contact Us', href: '/contact' }, ]; const navigation = [ { name: 'Home', href: '/' }, { name: 'Pricing', href: '/pricing' }, ]; const isActive = (path) => location.pathname === path; const isPartiallyActive = (path) => location.pathname.startsWith(path); return (
Virtual Office Dubai
{isMenuOpen && (
{navigation.map((item) => ( setIsMenuOpen(false)} className={`text-base font-medium transition-colors ${isActive(item.href) ? 'text-red-400' : 'text-gray-200 hover:text-red-400'}`}> {item.name} ))}

Services

{services.map((item) => ( setIsMenuOpen(false)} className="block py-2 text-base font-medium text-gray-200 hover:text-red-400"> {item.name} ))}

Company

{company.map((item) => ( setIsMenuOpen(false)} className="block py-2 text-base font-medium text-gray-200 hover:text-red-400"> {item.name} ))}
setIsMenuOpen(false)}> setIsMenuOpen(false)}>
)}
); }; export default PublicHeader;