'use client'; import { LogOut, Menu, X } from 'lucide-react'; import { usePathname } from 'next/navigation'; import { useTranslations } from 'next-intl'; import { useState } from 'react'; import { useTheme } from '@/components/providers/theme-provider'; 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 DashboardLayout({ children }: { children: React.ReactNode }) { const pathname = usePathname(); const { user, logout } = useAuthStore(); const { theme, toggleTheme } = useTheme(); const t = useTranslations(); const [sidebarOpen, setSidebarOpen] = useState(false); const navItems = [ { href: '/dashboard' as const, label: t('dashboard.title'), icon: '🏠' }, { href: '/listings' as const, label: t('dashboard.listings'), icon: '📋' }, { href: '/listings/new' as const, label: t('dashboard.createListing'), icon: '➕' }, { href: '/analytics' as const, label: t('dashboard.analytics'), icon: '📊' }, { href: '/dashboard/saved-searches' as const, label: t('dashboard.savedSearches'), icon: '🔖' }, { href: '/dashboard/valuation' as const, label: t('dashboard.aiValuation'), icon: '🤖' }, { href: '/dashboard/profile' as const, label: t('dashboard.profile'), icon: '👤' }, { href: '/dashboard/subscription' as const, label: t('dashboard.subscription'), icon: '💎' }, { href: '/dashboard/payments' as const, label: t('dashboard.payments'), icon: '💳' }, ]; return (