showLoading = (buttonToReplace) => {
  let popup = dom.getPopup()
  if (!popup) {
    new Swal()
  }
  popup = dom.getPopup()
  if (!popup) {
    return
  }
  const loader = dom.getLoader()

  if (dom.isToast()) {
    dom.hide(dom.getIcon())
  } else {
    replaceButton(popup, buttonToReplace)
  }
  dom.show(loader)

  popup.setAttribute('data-loading', 'true')
  popup.setAttribute('aria-busy', 'true')
  popup.focus()
}
Shows loader (spinner), this is useful with AJAX requests.
By default the loader be shown instead of the "Confirm" button.

@param {HTMLButtonElement | null} [buttonToReplace]