"use client";

export function DeleteButton({ confirmText, label = "Sil" }: { confirmText: string; label?: string }) {
  return (
    <button
      type="submit"
      className="badge err"
      style={{ border: "none", cursor: "pointer" }}
      onClick={(e) => {
        if (!confirm(confirmText)) e.preventDefault();
      }}
    >
      {label}
    </button>
  );
}
