import React from 'react'; import { Button } from '@/components/ui/button'; import { Tooltip } from '@/components/ui/tooltip'; import { CheckSquare, Square, Folder, Music, Image as ImageIcon, File, Share2, MoreVertical, Wand2, } from 'lucide-react'; import { cn } from '@/lib/utils'; import type { CloudFileNode } from './types'; export interface FileTableRowProps { file: CloudFileNode; selected: boolean; onToggleSelect: (id: string) => void; onFileClick: (file: CloudFileNode) => void; onAction?: (action: string, file: CloudFileNode) => void; isLoading?: boolean; } function FileTypeIcon({ type }: { type: CloudFileNode['type'] }) { if (type === 'folder') return ; if (type === 'audio') return ; if (type === 'image') return ; if (['document', 'archive', 'project'].includes(type)) { return ; } return ; } export function FileTableRow({ file, selected, onToggleSelect, onFileClick, onAction, isLoading = false, }: FileTableRowProps) { if (isLoading) { return (
); } return (
{file.tags?.map((t) => ( {t} ))}
{file.size} {file.modified}
{file.type === 'audio' && ( )}
); }