import * as React from 'react'; import { Box, Drawer, AppBar, Toolbar, List, Typography, Divider, ListItem, ListItemButton, ListItemIcon, ListItemText, CssBaseline, IconButton } from '@mui/material'; import TableViewIcon from '@mui/icons-material/TableView'; import DashboardIcon from '@mui/icons-material/Dashboard'; import LogoutIcon from '@mui/icons-material/Logout'; import { ResourceConfig } from '../types/config'; const drawerWidth = 240; interface AdminLayoutProps { children: React.ReactNode; onSelectResource: (resourceName: string | null) => void; selectedResourceName: string | null; onLogout: () => void; username?: string; resources: ResourceConfig[]; } export default function AdminLayout({ children, onSelectResource, selectedResourceName, onLogout, username, resources, }: AdminLayoutProps) { return ( theme.zIndex.drawer + 1 }}> Admin Panel {username} onSelectResource(null)} > {resources.map((res) => ( onSelectResource(res.name)} > ))} {children} ); }