export default function ConfirmModal({ title, message, confirmText, cancelText, onConfirm, onCancel, variant = 'danger' }) {
  const confirmBtnClass = variant === 'danger' ? 'btn btn-destructive' : 'btn btn-primary'

  return (
    <div className="modal-backdrop fade-in" onClick={onCancel}>
      <div className="modal fade-in-scale max-w-md" onClick={(e) => e.stopPropagation()}>
        <div className="p-6">
          <h2 className="text-lg font-semibold text-white mb-2">{title}</h2>
          <p className="text-neutral-400 mb-6">{message}</p>

          <div className="flex gap-3 justify-end">
            <button onClick={onCancel} className="btn btn-ghost">
              {cancelText || 'Abbrechen'}
            </button>
            <button onClick={onConfirm} className={confirmBtnClass}>
              {confirmText || 'Bestätigen'}
            </button>
          </div>
        </div>
      </div>
    </div>
  )
}
