import { CheckCircleIcon } from "lucide-react"; import { useState } from "react"; import { useUITranslation } from "@vertesia/ui/i18n"; /** * Props for the UploadResultCategory component */ export interface UploadResultCategoryProps { /** Category title */ title: string; /** Number of items in this category */ count: number; /** Icon to display next to the title */ icon?: React.ReactNode; /** List of items to display */ items: string[]; } /** * Displays a collapsible category of upload results * * @example * } * items={["document1.pdf", "document2.pdf", "document3.pdf"]} * /> */ export function UploadResultCategory({ title, count, icon = , items }: UploadResultCategoryProps) { const { t } = useUITranslation(); const [isExpanded, setIsExpanded] = useState(false); return (
setIsExpanded(!isExpanded)} >
{icon} {title} {count}
{isExpanded && (
{items.length > 0 ? (
    {items.map((item, index) => (
  • {item}
  • ))}
) : (
{t('upload.noItems')}
)}
)}
); }