'use client'; import { useState } from 'react'; import ClientSelectionSection from './ClientSelectionSection'; import UserProfileSection from './UserProfileSection'; interface SidebarProps { isSidebarOpen: boolean; toggleSidebar: () => void; } export default function Sidebar({ isSidebarOpen, toggleSidebar }: SidebarProps) { const [openSidebarSubmenus, setOpenSidebarSubmenus] = useState>({}); // Sample user data for demonstration const sampleUserData = { email: 'user@example.com', person: { firstname: 'John', surname: 'Doe' } }; const sampleOnlineData = { userType: 'admin' }; // Sample client selection data const sampleClientData = { selectionList: [ { uu_id: '1', name: 'Acme Corp', description: 'Technology solutions' }, { uu_id: '2', name: 'Globex', description: 'Manufacturing' }, { uu_id: '3', name: 'Initech', description: 'Software development' } ] }; // Toggle submenu const toggleSubmenu = (itemName: string) => { setOpenSidebarSubmenus(prev => ({ ...prev, [itemName]: !prev[itemName] })); }; return ( <>
{/* Fixed header section */}
{/* Scrollable content section */}
{/* Client selection menu */} console.log('Selected client:', client)} /> {/* Add more scrollable content here if needed */}
{/* Overlay for mobile */} {isSidebarOpen && (
)} ); }