// Minimal debounce helper to avoid bundling external lodash in the plugin package.
export const debounce = (func, wait = 0) => {
  let timeout;
  return (...args) => {
    if (timeout) {
      clearTimeout(timeout);
    }
    timeout = setTimeout(() => func(...args), wait);
  };
};
