import { createObserver } from "./chunk-AVLPSIKF.js"; import { forceUpdate } from "./chunk-IOZKU7B2.js"; // node_modules/@esri/calcite-components/dist/components/conditionalSlot.js var observed = /* @__PURE__ */ new Set(); var mutationObserver; var observerOptions = { childList: true }; function connectConditionalSlotComponent(component) { if (!mutationObserver) { mutationObserver = createObserver("mutation", processMutations); } mutationObserver.observe(component.el, observerOptions); } function disconnectConditionalSlotComponent(component) { observed.delete(component.el); processMutations(mutationObserver.takeRecords()); mutationObserver.disconnect(); for (const [element] of observed.entries()) { mutationObserver.observe(element, observerOptions); } } function processMutations(mutations) { mutations.forEach(({ target }) => { forceUpdate(target); }); } export { connectConditionalSlotComponent, disconnectConditionalSlotComponent }; /*! * All material copyright ESRI, All Rights Reserved, unless otherwise specified. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details. * v1.0.0-beta.97 */ //# sourceMappingURL=chunk-2FBWETRC.js.map