import { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from 'ui' import { Admonition } from 'ui-patterns/admonition' import type { JitUserRule } from './JitDbAccess.types' interface JitDbAccessDeleteDialogProps { user: JitUserRule | null isDeleting: boolean error?: string | null onClose: () => void onConfirm: () => unknown } export function JitDbAccessDeleteDialog({ user, isDeleting = false, error, onClose, onConfirm, }: JitDbAccessDeleteDialogProps) { const userDisplayName = user?.name?.trim() || user?.email || 'this user' return ( !open && !isDeleting && onClose()}> Delete temporary access rule

Remove the temporary access rule for{' '} {userDisplayName}?

This revokes any assigned database roles for this member and removes their temporary access configuration.

{error && ( )} Cancel Delete rule
) }