import { useState } from 'react'; import { Globe2, Download, Copy, Youtube, Instagram, Loader2 } from 'lucide-react'; export default function VideoTranscriber() { const [url, setUrl] = useState(''); const [language, setLanguage] = useState('en'); const [transcription, setTranscription] = useState(''); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const languages = { en: 'English', pt: 'Portuguese (Portugal)', es: 'Spanish', fr: 'French', de: 'German' }; const handleSubmit = async (e) => { e.preventDefault(); setError(''); if (!url) { setError('Please enter a video URL'); return; } setLoading(true); // Simulate transcription process setTimeout(() => { setTranscription("This is a simulated transcription of the video content. In a real application, this would be the actual transcribed text from the video's audio. The transcription would be processed through a backend service that handles the video download and audio extraction."); setLoading(false); }, 2000); }; const handleCopy = () => { navigator.clipboard.writeText(transcription); }; const handleDownload = () => { const blob = new Blob([transcription], { type: 'text/plain' }); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'transcription.txt'; a.click(); window.URL.revokeObjectURL(url); }; return (