import { useEffect, useRef } from "react"; import { Button } from "@/components/ui/button"; import { Trash2 } from "lucide-react"; export function SelectionBar({ count, allSelected, someSelected, onToggleAll, onDelete, deleting, label, }: { count: number; allSelected: boolean; someSelected: boolean; onToggleAll: () => void; onDelete: () => void; deleting: boolean; label: string; }) { const ref = useRef(null); useEffect(() => { if (ref.current) ref.current.indeterminate = !allSelected && someSelected; }, [allSelected, someSelected]); return (
{count > 0 && (
{count} selected
)}
); }