import { ProgressCard } from "@/components/common/progress-card"; import { useTranslation } from "@/contexts/i18n-context"; import { useToolProcessor } from "@/hooks/use-tool-processor"; import { format } from "@/lib/format"; import { useFileStore } from "@/stores/file-store"; export function MergePdfSettings() { const { t } = useTranslation(); const s = t.toolSettings["merge-pdf"]; const { files } = useFileStore(); const { processFiles, processing, error, progress } = useToolProcessor("merge-pdf"); const hasEnough = files.length >= 2; const handleProcess = () => { processFiles(files, {}); }; return (
{files.length > 0 && (

{hasEnough ? format(s.orderHint, { count: files.length }) : s.needTwo}

)} {error &&

{error}

} {processing ? ( ) : ( )}
); }