'use strict';

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

const index = require('./index-b7293b2f.js');

const comboBoxConnectorCss = "";

const ComboBoxConnector = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.luNewComboBoxConnectorSearchRequest = index.createEvent(this, "luNewComboBoxConnectorSearchRequest", 7);
    this.luUpdatedComboBoxSearchResults = index.createEvent(this, "luUpdatedComboBoxSearchResults", 7);
    /**
     * Provided search results
     */
    this.searchResults = [];
  }
  onSearchResultsChange() {
    this.luUpdatedComboBoxSearchResults.emit(this.searchResults);
  }
  onLuNewSearchResultRequested(ev) {
    const data = ev.detail;
    if (data.purpose && data.purpose.toLowerCase() === this.purpose.toLowerCase()) {
      this.luNewComboBoxConnectorSearchRequest.emit({
        searchText: data.searchText,
        comboBoxId: data.comboBoxId
      });
    }
  }
  static get watchers() { return {
    "searchResults": ["onSearchResultsChange"]
  }; }
};
ComboBoxConnector.style = comboBoxConnectorCss;

exports.lu_combo_box_connector = ComboBoxConnector;

//# sourceMappingURL=lu-combo-box-connector.cjs.entry.js.map