// Atlas · Reusable confirmation modal // // A presentational, callback-driven yes/no dialog matching the app's modal // convention (modal-backdrop / modal / header / body / footer, as used by // UpgradeModal and SettingsModal). It holds no app knowledge — the caller passes // the copy and the onConfirm/onClose callbacks. Rendered at the app top level and // opened via app.jsx's requestConfirm({...}) helper (state-carried action pattern), // so any child component can request a confirmation without its own overlay. function ConfirmModal({ title = "Are you sure?", message = "", confirmLabel = "Confirm", cancelLabel = "Cancel", danger = false, onConfirm, onClose, }) { return (
{ if (e.target === e.currentTarget) onClose(); }}>

{title}

{message && (

{message}

)}
{/* cancelLabel={null} gives an OK-only notice. */} {cancelLabel && }
); } window.ConfirmModal = ConfirmModal;