'use client';
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import {
AppBar,
Toolbar,
IconButton,
Typography,
Drawer,
List,
ListItem,
ListItemButton,
ListItemIcon,
ListItemText,
Avatar,
Box,
Divider,
} from '@mui/material';
import {
Menu as MenuIcon,
Home,
Timeline,
Chat,
Insights,
Settings,
ChildCare,
Group,
Logout,
} from '@mui/icons-material';
export const MobileNav = () => {
const [drawerOpen, setDrawerOpen] = useState(false);
const router = useRouter();
const menuItems = [
{ label: 'Dashboard', icon: , path: '/' },
{ label: 'Track Activity', icon: , path: '/track' },
{ label: 'AI Assistant', icon: , path: '/ai-assistant' },
{ label: 'Insights', icon: , path: '/insights' },
{ label: 'Children', icon: , path: '/children' },
{ label: 'Family', icon: , path: '/family' },
{ label: 'Settings', icon: , path: '/settings' },
];
const handleNavigate = (path: string) => {
router.push(path);
setDrawerOpen(false);
};
return (
<>
setDrawerOpen(true)}
>
Maternal
U
setDrawerOpen(false)}
>
U
User Name
user@example.com
{menuItems.map((item) => (
handleNavigate(item.path)}>
{item.icon}
))}
handleNavigate('/logout')}>
>
);
};