/* ═══════════════════════════════════════════════════════════════════════════ * IMPHNEN Sidebar — Navigation command center * Minimal, collapsed by default, dengan Mascot yang playful. * Fokus: Guild Moderation Watcher untuk komunitas IMPHNEN. * ═══════════════════════════════════════════════════════════════════════════ */ import { motion } from "framer-motion"; import { LayoutDashboard, MessageSquare, Radio, } from "lucide-react"; import type { MessageRecord } from "../entities/message/types.js"; import type { DashboardTab } from "../entities/ui/types.js"; import { useMascotChat } from "../shared/hooks/useMascotChat"; import { cn } from "../shared/lib/utils"; import { MascotChatbot } from "./mascot/MascotChatbot"; import { MascotImage } from "./mascot/MascotImage"; const navItems: Array<{ id: DashboardTab; label: string; icon: typeof Radio; badge?: string; }> = [ { id: "messages", label: "Pesan & Moderasi", icon: MessageSquare, badge: "Live", }, { id: "live", label: "Voice & Media", icon: Radio, }, { id: "dashboard", label: "Dashboard Guild", icon: LayoutDashboard, }, ]; interface SidebarProps { activeTab: DashboardTab; onTabChange: (tab: DashboardTab) => void; collapsed?: boolean; recentMessages?: MessageRecord[]; guildId?: string; channelId?: string; flaggedCount?: number; } export function Sidebar({ activeTab, onTabChange, collapsed = false, recentMessages = [], guildId, channelId, flaggedCount = 0, }: SidebarProps) { const mascotChat = useMascotChat({ messageCount: recentMessages.length, activeParticipants: new Set( recentMessages.map((message) => message.user_id), ).size, lastActivity: recentMessages.length > 0 ? "Aktif" : "Idle", topicsDiscussed: ["Pesan", "Moderasi"], guildId, channelId, }); return ( <> {/* ── Mascot Chatbot Panel ────────────────────────────────────── */} mascotChat.setIsOpen(false)} onSendMessage={mascotChat.handleSendMessage} mascotName="Mascot IMPHNEN" className="fixed bottom-[170px] left-[80px] z-[9999]" /> ); }