/** * @file app/(app)/layout.tsx * @description Main application layout component that manages responsive sidebars and drawer overlays. */ "use client"; import { useSidebarStore } from "@/lib/stores/useSidebarStore"; import { ServerSidebar } from "@/components/sidebar/ServerSidebar"; import { ChannelSidebar } from "@/components/sidebar/ChannelSidebar"; import { MemberSidebar } from "@/components/sidebar/MemberSidebar"; import { UserProfile } from "@/components/sidebar/UserProfile"; import { MobileDrawer } from "@/components/ui/MobileDrawer"; /** * Client component serving as the primary application layout, handling the server, channel, and member sidebars with mobile drawer support. * * @param {Object} props - The component props. * @param {React.ReactNode} props.children - The child layout or page content to render in the central main view. * @returns {JSX.Element} The application layout structure with responsive sidebars. */ export default function AppLayout({ children }: { children: React.ReactNode }) { const { isNavOpen, isMembersOpen, closeAll } = useSidebarStore(); return (
{/* Left Navigation: Server + Channels + User Profile */}
{/* Center: Main Area */}
{children}
{/* Right: List of Members */}
); }