import { isVideoFile } from '../lib/utils.ts'; import { FiFile, FiFolder } from 'react-icons/fi'; interface TorrentFile { index: number; name: string; length: number; type: string; } interface FileSelectorProps { files: TorrentFile[]; selectedIndex: number; onSelect: (index: number) => void; compact?: boolean; } export default function FileSelector({ files, selectedIndex, onSelect, compact }: FileSelectorProps) { const videoFiles = files.filter((f) => f.type === 'video'); if (videoFiles.length <= 1) return null; return (
{!compact &&

Files

}
{videoFiles.map((file) => ( ))}
); }