import { Modal } from './modal.js'; interface ConfirmationDialogProps { action: 'start' | 'stop'; errorMessage?: string | null; isPending: boolean; onCancel(): void; onConfirm(): void; } export function ConfirmationDialog({ action, errorMessage = null, isPending, onCancel, onConfirm }: ConfirmationDialogProps) { const isStarting = action === 'start'; return ( Confirm action

{isStarting ? 'Start bot?' : 'Stop bot?'}

{isStarting ? 'The bot will resume automated processing.' : 'The bot will pause after its current operation.'}

{errorMessage ?

{errorMessage}

: null}
); }