'use client'; import { Menu, X } from 'lucide-react'; import { usePathname } from 'next/navigation'; import { useTranslations } from 'next-intl'; import { useState } from 'react'; import { CompareFloatingBar } from '@/components/comparison/compare-floating-bar'; import { NotificationBell } from '@/components/notifications/notification-bell'; import { Button } from '@/components/ui/button'; import { LanguageSwitcher } from '@/components/ui/language-switcher'; import { Link } from '@/i18n/navigation'; import { useAuthStore } from '@/lib/auth-store'; import { cn } from '@/lib/utils'; export default function PublicLayout({ children }: { children: React.ReactNode }) { const pathname = usePathname(); const { user } = useAuthStore(); const t = useTranslations(); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); const navLinks = [ { href: '/' as const, label: t('nav.home'), isActive: pathname === '/' || !!pathname.match(/^\/(vi|en)\/?$/), }, { href: '/search' as const, label: t('nav.search'), isActive: pathname.includes('/search'), }, { href: '/du-an' as const, label: t('nav.projects'), isActive: pathname.includes('/du-an'), }, { href: '/khu-cong-nghiep' as const, label: t('nav.industrialParks'), isActive: pathname.includes('/khu-cong-nghiep'), }, { href: '/chuyen-nhuong' as const, label: t('nav.transfer'), isActive: pathname.includes('/chuyen-nhuong'), }, { href: '/pricing' as const, label: t('nav.pricing'), isActive: pathname.includes('/pricing'), }, ]; return (