import { useTranslation } from 'react-i18next'; import { Download, RotateCcw, Clock } from 'lucide-react'; import type { TaskResult } from '@/services/api'; import { formatFileSize } from '@/utils/textTools'; interface DownloadButtonProps { /** Task result containing download URL */ result: TaskResult; /** Called when user wants to start over */ onStartOver: () => void; } export default function DownloadButton({ result, onStartOver }: DownloadButtonProps) { const { t } = useTranslation(); if (!result.download_url) return null; return (
{t('result.conversionComplete')}
{t('result.downloadReady')}
{t('result.originalSize')}
{formatFileSize(result.original_size)}
{t('result.newSize')}
{formatFileSize(result.compressed_size)}
{t('result.reduction')}
{result.reduction_percent}%