import { isServer } from './chunk-ZVWX56RU.mjs';

// src/onClickOutside/index.ts
function onClickOutside(element, callback) {
  if (isServer())
    return;
  document.addEventListener("click", (e) => {
    if (!element.contains(e.target))
      callback();
  });
}

export { onClickOutside };
