import { X } from 'lucide-react'; import { pluralize } from '@/react/common/string-utils'; import { Badge } from '@@/Badge'; interface Props { selected: Set; removeFile: (path: string) => void; } export function SelectedPanel({ selected, removeFile }: Props) { const selectedPaths = Array.from(selected).sort(); return ( <>
{selected.size} Selected {pluralize(selected.size, 'File')}
{selectedPaths.length === 0 ? (

No files selected

) : ( selectedPaths.map((path) => ( removeFile(path)} /> )) )}
); } interface FileRowProps { path: string; onRemove: () => void; } function FileRow({ path, onRemove }: FileRowProps) { return (
File /{path}
); }