"use client"; import React, { useState } from "react"; import { Plus, MessageSquare, Trash2, BookOpen, Pill, Search, ChevronLeft, ChevronRight, ShieldCheck, Zap, } from "lucide-react"; import { cn } from "@duoc-thu/ui"; export interface ChatSession { id: string; title: string; updatedAt: string; } interface SidebarProps { currentSessionId: string; sessions: ChatSession[]; onSelectSession: (id: string) => void; onNewChat: () => void; onDeleteSession?: (id: string) => void; onQuickQuery: (query: string) => void; className?: string; } const QUICK_PROMPTS = [ { drug: "Paracetamol", label: "Liều dùng Paracetamol người lớn & trẻ em" }, { drug: "Amoxicillin", label: "Chống chỉ định & Thận trọng khi dùng Amoxicillin" }, { drug: "Metformin", label: "Liều lượng & Tương tác thuốc Metformin" }, { drug: "Aspirin", label: "Chỉ định & Tác dụng không mong muốn của Aspirin" }, { drug: "Ibuprofen", label: "Liều dùng Ibuprofen theo trọng lượng cơ thể" }, ]; export function Sidebar({ currentSessionId, sessions, onSelectSession, onNewChat, onDeleteSession, onQuickQuery, className, }: SidebarProps) { const [searchTerm, setSearchTerm] = useState(""); const [isCollapsed, setIsCollapsed] = useState(false); const filteredSessions = sessions.filter((s) => s.title.toLowerCase().includes(searchTerm.toLowerCase()) ); if (isCollapsed) { return ( ); } return ( ); }