import { AlertTriangle, CheckCircle2, KeyRound, X } from "lucide-react" import { Dialog } from "@/components/ui/dialog" import { Button } from "@/components/ui/button" import { CopyButton } from "@/components/ui/copy-button" import type { AccessKeyFull } from "../api/integration.types" interface NewKeyResultDialogProps { open: boolean onClose: () => void /** The fresh pair — or the new key plus the caller-provided secret for a rotation. */ created?: AccessKeyFull title: string } /** * Shows a freshly minted key pair with copy buttons. The secret cannot be shown again * after this dialog closes (except via Reveal). */ export function NewKeyResultDialog({ open, onClose, created, title }: NewKeyResultDialogProps) { return (
{/* Header */}

{title}

Copy the secret now — store it in your tool's config

{created && ( <>
Access Key ID
{created.accessKeyId}
Secret Access Key
{created.secretAccessKey}
Label {created.label} {created.expiresAt && ( <> {" "}— the previous key stops working after its grace period (up to 60s of edge-cache lag applies) )}
)}
{/* Footer */}
) }