'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-6b50a234.js');
const KlevuDomEvents = require('./KlevuDomEvents-f5b92150.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) {
    index.registerInstance(this, hostRef);
    this.klevuLastSearchUpdate = index.createEvent(this, "klevuLastSearchUpdate", 7);
    this.klevuFilterSelectionUpdate = index.createEvent(this, "klevuFilterSelectionUpdate", 7);
    this.klevuFiltersApplied = index.createEvent(this, "klevuFiltersApplied", 7);
    this.klevuClickEventSent = index.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.KlevuDomEvents.ClickEventSent, __classPrivateFieldGet(this, _KlevuUtilDomEvents_clickSendEventHandler, "f"));
    document.addEventListener(KlevuDomEvents.KlevuDomEvents.FiltersApplied, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filtersAppliedEventHandler, "f"));
    document.addEventListener(KlevuDomEvents.KlevuDomEvents.FilterSelectionUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filterSelectionUpdateEventHandler, "f"));
    document.addEventListener(KlevuDomEvents.KlevuDomEvents.LastSearchUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_lastSearchUpdateEventHandler, "f"));
  }
  disconnectedCallback() {
    document.removeEventListener(KlevuDomEvents.KlevuDomEvents.ClickEventSent, __classPrivateFieldGet(this, _KlevuUtilDomEvents_clickSendEventHandler, "f"));
    document.removeEventListener(KlevuDomEvents.KlevuDomEvents.FiltersApplied, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filtersAppliedEventHandler, "f"));
    document.removeEventListener(KlevuDomEvents.KlevuDomEvents.FilterSelectionUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_filterSelectionUpdateEventHandler, "f"));
    document.removeEventListener(KlevuDomEvents.KlevuDomEvents.LastSearchUpdate, __classPrivateFieldGet(this, _KlevuUtilDomEvents_lastSearchUpdateEventHandler, "f"));
  }
  render() {
    return (index.h(index.Host, null, index.h("slot", null)));
  }
};
_KlevuUtilDomEvents_clickSendEventHandler = new WeakMap(), _KlevuUtilDomEvents_filtersAppliedEventHandler = new WeakMap(), _KlevuUtilDomEvents_filterSelectionUpdateEventHandler = new WeakMap(), _KlevuUtilDomEvents_lastSearchUpdateEventHandler = new WeakMap();

exports.klevu_util_dom_events = KlevuUtilDomEvents;

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