import React, { useState } from 'react' import NovaSelect from '../ui/NovaSelect' const actions = [ { value: 'publish', label: 'Publish', icon: 'fa-eye', danger: false }, { value: 'unpublish', label: 'Unpublish (draft)', icon: 'fa-eye-slash', danger: false }, { value: 'archive', label: 'Archive', icon: 'fa-box-archive', danger: false }, { value: 'unarchive', label: 'Unarchive', icon: 'fa-rotate-left', danger: false }, { value: 'delete', label: 'Delete', icon: 'fa-trash', danger: true }, { value: 'change_category', label: 'Change category', icon: 'fa-folder', danger: false }, { value: 'add_tags', label: 'Add tags', icon: 'fa-tag', danger: false }, { value: 'remove_tags', label: 'Remove tags', icon: 'fa-tags', danger: false }, ] export default function BulkActionsBar({ count, onExecute, onClearSelection }) { const [action, setAction] = useState('') if (count === 0) return null const handleExecute = () => { if (!action) return onExecute(action) setAction('') } const selectedAction = actions.find((a) => a.value === action) return (
{count} {count === 1 ? 'artwork' : 'artworks'} selected
({ value: a.value, label: a.label }))} value={action || null} onChange={(val) => setAction(val ?? '')} placeholder="Choose action…" searchable={false} />
) }