applyCustomClass = (elem, params, className) => {
  removeCustomClasses(elem, params)

  if (!params.customClass) {
    return
  }

  const customClass = params.customClass[/** @type {keyof SweetAlertCustomClass} */ (className)]

  if (!customClass) {
    return
  }

  if (typeof customClass !== 'string' && !customClass.forEach) {
    warn(`Invalid type of customClass.${className}! Expected string or iterable object, got "${typeof customClass}"`)
    return
  }

  addClass(elem, customClass)
}
@param {HTMLElement} elem
@param {SweetAlertOptions} params
@param {string} className