toggleClass = (target, classList, condition) => {
  if (!target || !classList) {
    return
  }
  if (typeof classList === 'string') {
    classList = classList.split(/\s+/).filter(Boolean)
  }
  classList.forEach((className) => {
    if (Array.isArray(target)) {
      target.forEach((elem) => {
        if (condition) {
          elem.classList.add(className)
        } else {
          elem.classList.remove(className)
        }
      })
    } else {
      if (condition) {
        target.classList.add(className)
      } else {
        target.classList.remove(className)
      }
    }
  })
}
@param {HTMLElement | HTMLElement[] | null} target
@param {string | string[] | readonly string[] | undefined} classList
@param {boolean} condition