import { ReactNode, useState } from 'react' import { Link, useLocation } from 'react-router-dom' import { ThemeToggle } from './ThemeToggle' import { Button } from './ui/Button' import { useAuth } from '../context/AuthContext' interface LayoutProps { children: ReactNode } export default function Layout({ children }: LayoutProps) { const location = useLocation() const [sidebarOpen, setSidebarOpen] = useState(false) const { logout } = useAuth() const navigation = [ { name: 'Dashboard', path: '/', icon: '📊' }, { name: 'Proxy Hosts', path: '/proxy-hosts', icon: '🌐' }, { name: 'Remote Servers', path: '/remote-servers', icon: '🖥️' }, { name: 'Certificates', path: '/certificates', icon: '🔒' }, { name: 'Import Caddyfile', path: '/import', icon: '📥' }, { name: 'Settings', path: '/settings', icon: '⚙️' }, ] return (
{/* Mobile Header */}

CPM+

{/* Sidebar */} {/* Overlay for mobile */} {sidebarOpen && (
setSidebarOpen(false)} /> )} {/* Main content */}
{children}
) }