import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import type { ReactNode } from "react";

interface TableIconButtonProps {
  label: string;
  icon: ReactNode;
  className?: string;
  onClick?: () => void;
}

export function TableIconButton({
  label,
  icon,
  className,
  onClick,
}: TableIconButtonProps) {
  return (
    <Button
      type="button"
      variant="outline"
      size="icon"
      aria-label={label}
      onClick={onClick}
      className={cn(
        "h-10 w-10 rounded-xl border-stroke bg-card text-muted-foreground hover:bg-primary-50 hover:text-foreground",
        className
      )}
    >
      {icon}
    </Button>
  );
}
