"use client";

import { revokeApiKey } from "@/lib/actions/admin";

export function RevokeApiKeyButton({ keyId }: { keyId: string }) {
  return (
    <button
      type="button"
      onClick={() => {
        if (confirm("Revoke this API key? Any integration using it will stop working.")) {
          revokeApiKey(keyId);
        }
      }}
      className="text-sm text-terracotta hover:underline"
    >
      Revoke
    </button>
  );
}
