import { BadgeCheck, BarChart3, Briefcase, ClipboardList, Clock3, FileText, Folder, Globe2, HelpCircle, LayoutDashboard, Settings, Sparkles, Star, Users, } from "lucide-react"; import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "@/components/ui/breadcrumb"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarTrigger, } from "@/components/ui/sidebar"; import { cn } from "@/lib/utils"; type NavItem = { label: string; icon: React.ComponentType>; href: string; isActive?: boolean; children?: NavItem[]; }; type NavGroup = { title: string; items: NavItem[]; defaultOpen?: boolean; }; type SidebarData = { logo: { src: string; alt: string; title: string; description: string; }; navGroups: NavGroup[]; footerGroup: NavGroup; }; const sidebarData: SidebarData = { logo: { src: "/block-media/shadcnblocks/block/logos/ShadcnBlocks-logo.svg", alt: "کمپین‌پرو", title: "کمپین‌پرو", description: "اتوماسیون بازاریابی", }, navGroups: [ { title: "نمای کلی", defaultOpen: true, items: [ { label: "داشبورد", icon: LayoutDashboard, href: "#", isActive: true, }, { label: "کمپین‌ها", icon: ClipboardList, href: "#" }, { label: "تقویم محتوا", icon: BarChart3, href: "#" }, ], }, { title: "مخاطبین", defaultOpen: true, items: [ { label: "لیست‌های فعال", icon: Briefcase, href: "#", children: [ { label: "سگمنت سازمانی", icon: FileText, href: "#" }, { label: "سگمنت SMB", icon: FileText, href: "#" }, { label: "سگمنت آزمایشی", icon: FileText, href: "#" }, ], }, { label: "بایگانی", icon: Folder, href: "#", children: [ { label: "آرشیو ۱۴۰۳", icon: FileText, href: "#" }, { label: "آرشیو ۱۴۰۲", icon: FileText, href: "#" }, ], }, ], }, { title: "تیم بازاریابی", defaultOpen: false, items: [ { label: "اعضای تیم بازاریابی", icon: Users, href: "#" }, { label: "اسپرینت محتوا", icon: Clock3, href: "#" }, { label: "تأیید محتوا", icon: BadgeCheck, href: "#" }, { label: "بازبینی کمپین", icon: Star, href: "#" }, ], }, { title: "فضای کار", defaultOpen: false, items: [ { label: "یکپارچه‌سازی‌ها", icon: Globe2, href: "#" }, { label: "جریان‌های اتوماسیون", icon: Sparkles, href: "#" }, ], }, ], footerGroup: { title: "پشتیبانی", items: [ { label: "مرکز راهنما", icon: HelpCircle, href: "#" }, { label: "تنظیمات", icon: Settings, href: "#" }, ], }, }; const SidebarLogo = ({ logo }: { logo: SidebarData["logo"] }) => { return (
{logo.alt}
{logo.title} {logo.description}
); }; const NavMenuItem = ({ item }: { item: NavItem }) => { const Icon = item.icon; const hasChildren = item.children && item.children.length > 0; return ( {item.label} {hasChildren && ( {item.children!.map((child) => ( {child.label} ))} )} ); }; const AppSidebar = ({ ...props }: React.ComponentProps) => { return ( {sidebarData.navGroups.map((group) => ( {group.title} {group.items.map((item) => ( ))} ))} {sidebarData.footerGroup.title} {sidebarData.footerGroup.items.map((item) => ( ))} ); }; interface Sidebar3Props { className?: string; } const Sidebar3 = ({ className }: Sidebar3Props) => { return (
نمای کلی داشبورد
); }; export { Sidebar3 };