import * as React from "react";

export interface ActionButtonProps {
  children: React.ReactNode;
  onClick?: () => void;
  variant?: "default" | "destructive";
  disabled?: boolean;
  type?: "button" | "submit";
  className?: string;
}

export function ActionButton({
  children,
  onClick,
  variant = "default",
  disabled,
  type = "button",
  className,
}: ActionButtonProps) {
  const classes = ["ads-action"];
  if (variant === "destructive") classes.push("ads-action--destructive");
  if (className) classes.push(className);
  return (
    <button type={type} className={classes.join(" ")} onClick={onClick} disabled={disabled}>
      {children}
    </button>
  );
}
