import { Button } from "../ui/button";
import { Plus, Trash2 } from "lucide-react";
import { ReactNode } from "react";

interface ListActionsProps {
  onAdd?: () => void;
  addText?: string;
  selectedCount?: number;
  onBulkDelete?: () => void;
  additionalActions?: ReactNode;
}

export function ListActions({
  onAdd,
  addText = "등록",
  selectedCount = 0,
  onBulkDelete,
  additionalActions
}: ListActionsProps) {
  return (
    <div className="flex items-center gap-2">
      {additionalActions}
      {selectedCount > 0 && onBulkDelete && (
        <Button 
          variant="destructive"
          onClick={onBulkDelete}
        >
          <Trash2 className="h-4 w-4 mr-2" />
          선택 삭제 ({selectedCount})
        </Button>
      )}
      {onAdd && (
        <Button onClick={onAdd}>
          <Plus className="h-4 w-4 mr-2" />
          {addText}
        </Button>
      )}
    </div>
  );
}