/** * FileManager — pluggable file browser for S3/MinIO files. * * Handles both input file selection and output file listing. * Used by timeline (assets + output), chunker (assets + chunk output), * and future tools. */ import type { ReactNode } from "react"; import { formatSize } from "../utils/format"; import "./FileManager.css"; export interface FileEntry { key: string; name: string; size?: number; meta?: string; } interface FileManagerProps { title: string; files: FileEntry[]; selectedKey?: string | null; onSelect?: (file: FileEntry) => void; onScan?: () => void; scanning?: boolean; emptyMessage?: string; renderActions?: (file: FileEntry) => ReactNode; disabled?: boolean; } export function FileManager({ title, files, selectedKey, onSelect, onScan, scanning = false, emptyMessage = "No files", renderActions, disabled = false, }: FileManagerProps) { return (

{title}

{onScan && ( )}
); }