'use strict';

/*!
 * @techmely/utils
 * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
 * MIT Licensed
 */


// src/nextEvent.ts
function nextEvent(element, eventName) {
  return new Promise(
    (resolve) => element.addEventListener(eventName, (event) => resolve(event), { once: true })
  );
}

// src/transitionEnd.ts
function transitionEnd(element) {
  return nextEvent(element, "transitionend");
}

exports.transitionEnd = transitionEnd;
