import * as Dialog from '@radix-ui/react-dialog' import CredentialsViewer from './CredentialsViewer' import type { DeviceRegistrationResponse } from '../types/api' interface DeviceCredentialsDialogProps { open: boolean onOpenChange: (open: boolean) => void credentials: DeviceRegistrationResponse | null deviceName?: string } export default function DeviceCredentialsDialog({ open, onOpenChange, credentials, deviceName }: DeviceCredentialsDialogProps) { if (!credentials) { return null } return ( {deviceName ? `${deviceName} Credentials` : 'Device Credentials'} Store these credentials securely. They are only shown once after issuing the certificate.
) }