import { type PropsWithChildren } from 'react' import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from 'ui' interface SSLEnforcementConfirmDialogProps { isSubmitting: boolean onConfirm: () => void /** * Controlled mode for callers whose control can't act as the dialog trigger * (e.g. a switch, where a disabled control must never open the dialog). * Omit both, and pass `children`, to render the children as the trigger. */ open?: boolean onOpenChange?: (open: boolean) => void } export const SSLEnforcementConfirmDialog = ({ isSubmitting, onConfirm, open, onOpenChange, children, }: PropsWithChildren) => { return ( {children !== undefined && {children}} Enforce SSL on connections Any connections that aren’t using SSL will close immediately. Those clients will need to reconnect using SSL. Connections already using SSL will stay open. Cancel Enforce SSL ) }