import { throttleTime } from '@/global/global';

export default {
  inserted: function (el, binding) {
    el.addEventListener('click', () => {
      if (!el.disabled) {
        el.disabled = true;

        setTimeout(() => {
          el.disabled = false;
        }, binding.value || throttleTime);
      }
    });
  }
};
