import { AlertTriangle } from 'lucide-react' interface CertificateCleanupDialogProps { onConfirm: (deleteCerts: boolean) => void onCancel: () => void certificates: Array<{ id: number; name: string; domain: string }> hostNames: string[] isBulk?: boolean } export default function CertificateCleanupDialog({ onConfirm, onCancel, certificates, hostNames, isBulk = false }: CertificateCleanupDialogProps) { const handleSubmit = (e: React.FormEvent) => { e.preventDefault() const formData = new FormData(e.currentTarget) const deleteCerts = formData.get('delete_certs') === 'on' onConfirm(deleteCerts) } return (
e.stopPropagation()} >

Delete {isBulk ? `${hostNames.length} Proxy Hosts` : 'Proxy Host'}?

{isBulk ? 'These hosts will be permanently deleted.' : 'This host will be permanently deleted.'}

{/* Host names */}

{isBulk ? 'Hosts to be deleted:' : 'Host to be deleted:'}

    {hostNames.map((name, idx) => (
  • {name}
  • ))}
{/* Certificate cleanup option */} {certificates.length > 0 && (

{certificates.length === 1 ? 'This custom/staging certificate will no longer be used by any hosts.' : 'These custom/staging certificates will no longer be used by any hosts.'}

    {certificates.map((cert) => (
  • {cert.name || cert.domain} ({cert.domain})
  • ))}
)} {/* Confirmation buttons */}
) }