"use client"
import type React from "react"
import type { JSX } from "react"
import { ComponentContainer } from "@/components/ui/component-container"
import { SectionHeading } from "@/components/ui/section-heading"
import { Badge } from "@/components/ui/badge"
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Separator } from "@/components/ui/separator"
import { Button } from "@/components/ui/button"
import {
Calendar,
ChevronDown,
Command,
FileText,
Folder,
Home,
Inbox,
Mail,
PanelLeftClose,
PanelLeftOpen,
Settings,
Star,
Trash2,
User,
Users,
} from "lucide-react"
import { useState } from "react"
import { cn } from "@/lib/utils"
export function SidebarSection() {
const [isSidebarOpen, setIsSidebarOpen] = useState(true)
return (
{/* Sidebar */}
Application
Dashboard
Team
Calendar
Documents
Website Redesign
Mobile Application
API Integration
Legacy System
2023 Campaigns
Inbox
Starred
Sent
Trash
}>Work
}>Personal
}>
Important
}>
Planning
Settings
{/* Main Content Area */}
{/* Top Bar */}
{!isSidebarOpen && (
)}
Dashboard
{/* Content */}
)
}
// Sidebar Components
function Sidebar({ children, className }: React.HTMLAttributes) {
return (
{children}
)
}
function SidebarHeader({ children, className }: React.HTMLAttributes) {
return {children}
}
function SidebarContent({ children, className }: React.HTMLAttributes) {
return {children}
}
function SidebarFooter({ children, className }: React.HTMLAttributes) {
return {children}
}
function SidebarGroup({ children, title, className }: React.HTMLAttributes & { title?: string }) {
return (
{title && (
{title}
)}
{children}
)
}
function SidebarSeparator({ className }: React.HTMLAttributes) {
return
}
interface SidebarItemProps extends React.ButtonHTMLAttributes {
icon?: React.ElementType | (() => JSX.Element)
isActive?: boolean
badge?: string | number
indent?: boolean
}
function SidebarItem({
icon: Icon,
children,
isActive = false,
badge,
indent = false,
className,
...props
}: SidebarItemProps) {
return (
)
}
interface SidebarCollapsibleProps extends React.HTMLAttributes {
icon?: React.ElementType
label: string
defaultOpen?: boolean
}
function SidebarCollapsible({
icon: Icon,
label,
children,
defaultOpen = false,
className,
...props
}: SidebarCollapsibleProps) {
const [isOpen, setIsOpen] = useState(defaultOpen)
return (
{isOpen &&
{children}
}
)
}