import type { FileSummary } from "../../lib/api"; interface FileListProps { files: FileSummary[]; loading: boolean; onSelect: (id: string) => void; onDelete: (id: string) => void; onCreate: () => void; } function formatDuration(seconds: number | null): string { if (seconds === null) return "-"; const mins = Math.floor(seconds / 60); const secs = Math.floor(seconds % 60); return `${mins}:${secs.toString().padStart(2, "0")}`; } function formatDate(dateStr: string): string { const date = new Date(dateStr); return date.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric", hour: "2-digit", minute: "2-digit", }); } export function FileList({ files, loading, onSelect, onDelete, onCreate, }: FileListProps) { if (loading) { return (