import { AlertTriangle, Check, Download, Trash2, Upload } from 'lucide-react'; import { CONFIRMATION_ACTION_LABELS, CONFIRMATION_BUTTON_CLASSES, CONFIRMATION_ICON_CLASSES, CONFIRMATION_ICON_CONTAINER_CLASSES, CONFIRMATION_TITLES, } from '../../constants/constants'; import type { ConfirmationRequest } from '../../types/types'; type ConfirmActionModalProps = { action: ConfirmationRequest | null; onCancel: () => void; onConfirm: () => void; }; function renderConfirmActionIcon(actionType: ConfirmationRequest['type']) { if (actionType === 'discard' || actionType === 'delete') { return ; } if (actionType === 'commit') { return ; } if (actionType === 'pull') { return ; } return ; } export default function ConfirmActionModal({ action, onCancel, onConfirm }: ConfirmActionModalProps) { if (!action) { return null; } return (
{renderConfirmActionIcon(action.type)}

{CONFIRMATION_TITLES[action.type]}

{action.message}

); }