import { useState } from 'react'; import { useRouter } from 'next/router'; import Link from 'next/link'; import { useTheme } from '../lib/theme-context'; export default function Layout({ children, user = { email: 'me@randallstillwell.com', role: 'user' } }) { const router = useRouter(); const { theme, toggleTheme } = useTheme(); const [searchQuery, setSearchQuery] = useState(''); const navigation = [ { name: 'Dashboard', href: '/dashboard', icon: 'grid', active: router.pathname === '/dashboard' }, { name: 'My Collection', href: '/collections', icon: 'collection', active: router.pathname === '/collections', badge: '247' }, { name: 'Cards', href: '/cards', icon: 'card', active: router.pathname === '/cards' }, { name: 'Decks', href: '/decks', icon: 'deck', active: router.pathname === '/decks', badge: '12' }, { name: 'Analytics', href: '/analytics', icon: 'analytics', active: router.pathname === '/analytics' }, { name: 'Community', href: '/community', icon: 'community', active: router.pathname === '/community' }, { name: 'Settings', href: '/settings', icon: 'settings', active: router.pathname === '/settings' }, { name: 'Logout', href: '/logout', icon: 'logout', active: router.pathname === '/logout' } ]; const getIcon = (iconName) => { const icons = { grid: ( ), collection: ( ), card: ( ), deck: ( ), analytics: ( ), community: ( ), settings: ( ), logout: ( ) }; return icons[iconName] || icons.grid; }; return (
{/* Left Sidebar */}
TCG

TCG Vault

N
{/* Main Content */}
{/* Top Header */}
{/* Search Bar */}
setSearchQuery(e.target.value)} />
⌘F
{/* Right Side */}

{user.email}

{user.role}

{user.email.charAt(0).toUpperCase()}
{/* Page Content */}
{children}
); }