import { useEffect as f } from "react";
function l(o, s) {
  f(() => {
    (() => {
      o.forEach((n) => {
        const e = document.getElementById(n);
        e && e.classList.add(s);
      });
    })();
    const c = new MutationObserver((n) => {
      n.forEach((e) => {
        e.addedNodes.forEach((t) => {
          t instanceof HTMLElement && o.some((r) => t.id === r) ? t.classList.add(s) : t instanceof HTMLElement && o.forEach((r) => {
            const i = t.querySelector(`#${r}`);
            i && i.classList.add(s);
          });
        });
      });
    });
    return c.observe(document.body, { childList: !0, subtree: !0 }), () => {
      c.disconnect();
    };
  }, [s]);
}
export {
  l as useAddClassToPortal
};
//# sourceMappingURL=useAddClassToPortal.js.map
