import { watch as o, onBeforeUnmount as u } from "vue";
function m(t, e, r) {
  o(
    () => t.value,
    (n) => {
      n && n.addEventListener(e, r);
    },
    { immediate: !0 }
  ), u(() => {
    t.value && t.value.removeEventListener(e, r);
  });
}
export {
  m as onCustomEvent
};
