import React, { memo } from 'react'; import { useI18n } from '../../application/i18n/I18nProvider'; import { cn } from '../../lib/utils'; import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '../ui/dialog'; interface SystemPanelConfirmDialogProps { open: boolean; title: string; message: string; confirmLabel: string; busy?: boolean; destructive?: boolean; onOpenChange: (open: boolean) => void; onConfirm: () => void; } /** * In-app confirm dialog. Prefer this over window.confirm() in Electron side panels: * native confirms can leave focus/modal state broken on Windows, which blocks * subsequent Radix dialogs (e.g. tmux "new session" right after detach). */ export const SystemPanelConfirmDialog = memo(function SystemPanelConfirmDialog({ open, title, message, confirmLabel, busy = false, destructive = false, onOpenChange, onConfirm, }: SystemPanelConfirmDialogProps) { const { t } = useI18n(); return ( {title}

{message}

); });