import { TFileId, FileItem, TQueueItemOperation } from '@/components/fileupload/types'

const DELETE_SYMBOL = Symbol('deleteFile')

export const removeFileOperation = (onFileRemoved: (fileId: TFileId) => void): TQueueItemOperation => ({
  title: 'Slett',
  ariaLabel: 'Slett fil',
  onClick: (fileItem: FileItem) => onFileRemoved(fileItem.fileId),
  symbol: DELETE_SYMBOL,
})
