// Click limit times to callback
function triggerClickLimit(element) {
  var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
  var callback = arguments.length > 2 ? arguments[2] : undefined;
  if (!element || element !== null && element !== void 0 && element.hasEventListener) return;
  var clickCount = 0;
  element.hasEventListener = true;
  element.addEventListener('click', function () {
    clickCount++;
    if (clickCount > limit) {
      callback && callback();
    }
  });
}
export default triggerClickLimit;