'use client'; import { PlusIcon, MoreHorizontalIcon, TrashIcon } from 'lucide-react'; import { Sidebar, SidebarContent, SidebarHeader, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarMenuAction, } from '@/components/ui/sidebar'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { Button } from '@/components/ui/button'; export interface Chat { id: string; title: string; created_at: string; } interface ChatSidebarProps { chats: Chat[]; activeChatId: string | null; onSelectChat: (chatId: string) => void; onNewChat: () => void; onDeleteChat: (chatId: string) => void; } export function ChatSidebar({ chats, activeChatId, onSelectChat, onNewChat, onDeleteChat, }: ChatSidebarProps) { return ( Recent Chats {chats.map((chat) => ( onSelectChat(chat.id)} tooltip={chat.title} > {chat.title} onDeleteChat(chat.id)} className="" > Delete ))} ); }