"use client"; import { FolderOpen, PenSquare } from "lucide-react"; import { useTranslations } from "next-intl"; import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import type { ChatItem, NavItem, PageUsage, SearchSpace, User } from "../../types/layout.types"; import { ChatListItem } from "./ChatListItem"; import { NavSection } from "./NavSection"; import { PageUsageDisplay } from "./PageUsageDisplay"; import { SidebarCollapseButton } from "./SidebarCollapseButton"; import { SidebarHeader } from "./SidebarHeader"; import { SidebarSection } from "./SidebarSection"; import { SidebarUserProfile } from "./SidebarUserProfile"; interface SidebarProps { searchSpace: SearchSpace | null; isCollapsed?: boolean; onToggleCollapse?: () => void; navItems: NavItem[]; onNavItemClick?: (item: NavItem) => void; chats: ChatItem[]; sharedChats?: ChatItem[]; activeChatId?: number | null; onNewChat: () => void; onChatSelect: (chat: ChatItem) => void; onChatDelete?: (chat: ChatItem) => void; onChatArchive?: (chat: ChatItem) => void; onViewAllSharedChats?: () => void; onViewAllPrivateChats?: () => void; user: User; onSettings?: () => void; onManageMembers?: () => void; onUserSettings?: () => void; onLogout?: () => void; pageUsage?: PageUsage; theme?: string; setTheme?: (theme: "light" | "dark" | "system") => void; className?: string; } export function Sidebar({ searchSpace, isCollapsed = false, onToggleCollapse, navItems, onNavItemClick, chats, sharedChats = [], activeChatId, onNewChat, onChatSelect, onChatDelete, onChatArchive, onViewAllSharedChats, onViewAllPrivateChats, user, onSettings, onManageMembers, onUserSettings, onLogout, pageUsage, theme, setTheme, className, }: SidebarProps) { const t = useTranslations("sidebar"); return (
{t("no_shared_chats")}
)}{t("no_chats")}
)}