"use client"; import React from "react"; import { clsx } from "clsx"; interface FloatingActionBarProps { selectedAllocationCount: number; selectedResourceCount: number; onDelete: () => void; onAssign: () => void; onClear: () => void; isDeleting: boolean; } export function FloatingActionBar({ selectedAllocationCount, selectedResourceCount, onDelete, onAssign, onClear, isDeleting, }: FloatingActionBarProps) { const totalCount = selectedAllocationCount + selectedResourceCount; if (totalCount === 0) return null; const label = selectedAllocationCount > 0 && selectedResourceCount > 0 ? `${selectedAllocationCount} allocation${selectedAllocationCount !== 1 ? "s" : ""} + ${selectedResourceCount} resource${selectedResourceCount !== 1 ? "s" : ""} selected` : selectedAllocationCount > 0 ? `${selectedAllocationCount} allocation${selectedAllocationCount !== 1 ? "s" : ""} selected` : `${selectedResourceCount} resource${selectedResourceCount !== 1 ? "s" : ""} selected`; return (
{label} {selectedAllocationCount > 0 && ( )} {selectedResourceCount > 0 && ( )}
); }