'use client'; import { Dialog, DialogContent, DialogHeader, DialogTitle, } from '@/components/ui/dialog'; import { ScrollArea } from '@/components/ui/scroll-area'; import { Button } from '@/components/ui/button'; import { MessageSquare } from 'lucide-react'; import type { Conversation } from '@/app/page'; type ChatHistoryModalProps = { conversations: Conversation[]; onSelectChat: (id: string) => void; isOpen: boolean; onOpenChange: (isOpen: boolean) => void; isLoading: boolean; }; export function ChatHistoryModal({ conversations, onSelectChat, isOpen, onOpenChange, isLoading, }: ChatHistoryModalProps) { const handleSelect = (id: string) => { onSelectChat(id); onOpenChange(false); // Close modal on selection }; return ( Your Conversations
{conversations.length > 0 ? ( conversations.map((convo) => ( )) ) : (

No conversations yet.

)}
); }