import React from 'react' import { Loader2 } from 'lucide-react' import { HistoryCard } from './HistoryCard' import type { QueryHistorySummary } from '../types' interface HistoryListProps { items: QueryHistorySummary[] hasMore: boolean onLoadMore: () => void isLoadingMore: boolean onDelete: (id: number) => void isDeleting: boolean onClearAll: () => void isClearing: boolean } export const HistoryList: React.FC = ({ items, hasMore, onLoadMore, isLoadingMore, onDelete, isDeleting, onClearAll, isClearing, }) => { const handleClearAll = () => { if (window.confirm('Are you sure you want to clear all query history? This cannot be undone.')) { onClearAll() } } return (
{items.length > 0 && (
)}
{items.map((item) => ( ))}
{hasMore && (
)}
) }