import { FC } from 'react';
import { twx } from '@/lib/utils';

export const ActionButton: FC<{
  label: string;
  onClick: () => void;
  className?: string;
  disabled?: boolean;
  isVisible?: boolean;
}> = ({ label, onClick, className, disabled, isVisible = true }) => {
  return (
    <button
      className={twx(
        'text-red-500 hover:underline  bg-white',
        className,
        !isVisible && 'hidden',
      )}
      onClick={onClick}
      disabled={disabled}
    >
      {label}
    </button>
  );
};
