import { r as registerInstance, c as createEvent, h, H as Host } from './index-345463dd.js';
import { K as KlevuDomEvents } from './KlevuDomEvents-a1ecbf7c.js';

var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
    throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _KlevuUtilDomEvents_clickSendEventHandler, _KlevuUtilDomEvents_filtersAppliedEventHandler, _KlevuUtilDomEvents_filterSelectionUpdateEventHandler, _KlevuUtilDomEvents_lastSearchUpdateEventHandler;
const KlevuUtilDomEvents = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.klevuLastSearchUpdate = createEvent(this, "klevuLastSearchUpdate", 7);
    this.klevuFilterSelectionUpdate = createEvent(this, "klevuFilterSelectionUpdate", 7);
    this.klevuFiltersApplied = createEvent(this, "klevuFiltersApplied", 7);
    this.klevuClickEventSent = createEvent(this, "klevuClickEventSent", 7);
    _KlevuUtilDomEvents_clickSendEventHandler.set(this, (e) => {
      this.klevuClickEventSent.emit(e.detail);
    });
    _KlevuUtilDomEvents_filtersAppliedEventHandler.set(this, (e) => {
      this.klevuFiltersApplied.emit(e.detail);
    });
    _KlevuUtilDomEvents_filterSelectionUpdateEventHandler.set(this, (e) => {
      this.klevuFilterSelectionUpdate.emit(e.detail);
    });
    _KlevuUtilDomEvents_lastSearchUpdateEventHandler.set(this, (e) => {
      this.klevuLastSearchUpdate.emit(e.detail);
    });
  }
  connectedCallback() {
    document.addEventListener(KlevuDomEvents.ClickEventSent, __classPrivateFieldGet(this, _KlevuUtilDomEvents_clickSendEventHandler, "f"));
    document.addEventListener(KlevuDomEvents.FiltersApplied, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filtersAppliedEventHandler, "f"));
    document.addEventListener(KlevuDomEvents.FilterSelectionUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filterSelectionUpdateEventHandler, "f"));
    document.addEventListener(KlevuDomEvents.LastSearchUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_lastSearchUpdateEventHandler, "f"));
  }
  disconnectedCallback() {
    document.removeEventListener(KlevuDomEvents.ClickEventSent, __classPrivateFieldGet(this, _KlevuUtilDomEvents_clickSendEventHandler, "f"));
    document.removeEventListener(KlevuDomEvents.FiltersApplied, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filtersAppliedEventHandler, "f"));
    document.removeEventListener(KlevuDomEvents.FilterSelectionUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filterSelectionUpdateEventHandler, "f"));
    document.removeEventListener(KlevuDomEvents.LastSearchUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_lastSearchUpdateEventHandler, "f"));
  }
  render() {
    return (h(Host, null, h("slot", null)));
  }
};
_KlevuUtilDomEvents_clickSendEventHandler = new WeakMap(), _KlevuUtilDomEvents_filtersAppliedEventHandler = new WeakMap(), _KlevuUtilDomEvents_filterSelectionUpdateEventHandler = new WeakMap(), _KlevuUtilDomEvents_lastSearchUpdateEventHandler = new WeakMap();

export { KlevuUtilDomEvents as klevu_util_dom_events };

//# sourceMappingURL=klevu-util-dom-events.entry.js.map