import { useRef } from 'react';
import { useLang } from '../LanguageContext';
export default function DocumentTranslationTab({
docFile, handleDocUpload,
docSrcLang, setDocSrcLang,
docTgtLang, setDocTgtLang,
isProcessingDoc, processDoc,
docResult,
}) {
const { t } = useLang();
const docFileInputRef = useRef(null);
return (
{docResult?.detected_src_lang && (
✨ {t('text.detected')}: {docResult.detected_src_lang}
)}
docFileInputRef.current.click()}
style={{ marginBottom: '1.5rem' }}
>
📄
{t('docs.browse')}
{t('docs.supported')}
{docFile && (
📄
{docFile.name} ({(docFile.size / (1024 * 1024)).toFixed(2)} MB)
)}
{docResult && (
)}
);
}