"use client"; import { ImageFile, ConversionSettings } from "@/types"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Download, Trash2 } from "lucide-react"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; import { ImageListItem } from "./image-list-item"; import { useTranslations } from "next-intl"; interface ImageListProps { images: ImageFile[]; settings: ConversionSettings; onClearAll: () => void; onDownloadAll: () => void; onDownloadSingle: (index: number) => void; onRemove: (index: number) => void; onFilenameChange: (index: number, newName: string) => void; isConverting: boolean; convertingIndex: number | null; } export function ImageList({ images, settings, onClearAll, onDownloadAll, onDownloadSingle, onRemove, onFilenameChange, isConverting, convertingIndex, }: ImageListProps) { const t = useTranslations("ImageList"); if (images.length === 0) { return null; } const isProcessing = isConverting || convertingIndex !== null; return (
{t('title')}

{t('clearAllTooltip')}

{t('downloadAllTooltip')}

{images.map((image, index) => ( ))}
); }