import React from "react";

export default function ConfirmDialog({ open, title, message, onCancel, onConfirm }) {
  if (!open) return null;
  return (
    <div className="swi-modal-backdrop" role="dialog" aria-modal="true">
      <div className="swi-modal">
        <div className="swi-modal__header"><h3>{title}</h3></div>
        <div className="swi-modal__body">
          <p>{message}</p>
          <div className="ptw-row-actions">
            <button type="button" className="swi-btn swi-btn--ghost" onClick={onCancel}>Cancel</button>
            <button type="button" className="swi-btn swi-btn--danger" onClick={onConfirm}>Confirm</button>
          </div>
        </div>
      </div>
    </div>
  );
}
