import { PackageOpen, Copy, FileArchive, FileCode, FileDown, CornerLeftUp, Pencil, Trash2 } from 'lucide-react'; import Can from '@/components/elements/Can'; import { DropdownMenuItem } from '@/components/elements/dropdown/DropdownMenu'; import { isFileObjectArchiveType, type FileObject } from '@/api/server/files/queries'; interface Props { file: FileObject; onRename: () => void; onMove: () => void; onChmod: () => void; onCopy: () => void; onUnarchive: () => void; onArchive: () => void; onDownload: () => void; onDelete: () => void; } export default function FileActionItems({ file, onRename, onMove, onChmod, onCopy, onUnarchive, onArchive, onDownload, onDelete, }: Props) { const { attributes } = file; return ( <> Rename Move Permissions {attributes.is_file && ( Copy )} {isFileObjectArchiveType(file) ? ( Unarchive ) : ( Archive )} {attributes.is_file && ( Download )} Delete ); }