import { useState } from 'react'; import { VOCAB } from '../lib/collection-vocabulary.js'; export default function BulkSelectionToolbar({ selectedCards, onClearSelection, onAddToCollection, onAddToDeck, onMarkAsOwned, onRemoveFromOwned, onBulkFavorite, onBulkDelete }) { const [showActions, setShowActions] = useState(false); const selectedCount = selectedCards.length; if (selectedCount === 0) return null; const handleAddToCollection = () => { onAddToCollection(selectedCards); }; const handleAddToDeck = () => { onAddToDeck(selectedCards); }; const handleMarkAsOwned = () => { onMarkAsOwned(selectedCards); }; const handleRemoveFromOwned = () => { onRemoveFromOwned(selectedCards); }; const handleBulkFavorite = () => { onBulkFavorite(selectedCards); }; const handleBulkDelete = () => { if (confirm(`Are you sure you want to delete ${selectedCount} selected cards?`)) { onBulkDelete(selectedCards); } }; return (
{/* Selection Count */}
{selectedCount}
{selectedCount} card{selectedCount !== 1 ? 's' : ''} selected {selectedCount}
{/* Divider - Hidden on mobile */}
{/* Quick Actions */}
{/* More Actions Button */}
{/* Dropdown Actions */} {showActions && (
)}
{/* Clear Selection */}
); }