import { customElement } from "../../decorator.js";
import { unsafeCSS, LitElement, html } from "lit";
import compentStyle from "./app-menu.css.js";
import "../text-input-field/text-input-field.js";
import "../app-button/app-button.js";
import "../../icons/icon-search.js";
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = decorator(result) || result;
  return result;
};
let ObcAppMenu = class extends LitElement {
  /**
   * Handles input events from the search field and emits a `search` event with the current value.
   *
   * @param e - The input event from the search field.
   * @fires search {CustomEvent<string>} Fired when the search input value changes.
   */
  onSearchInput(e) {
    this.dispatchEvent(
      new CustomEvent("search", { detail: e.target.value })
    );
  }
  render() {
    return html`
      <div class="card">
        <obc-text-input-field
          placeholder="Search"
          @input=${this.onSearchInput}
          hasLeadingIcon
        >
          <obi-search slot="leading-icon"></obi-search>
        </obc-text-input-field>
        <div class="main-apps">
          <slot></slot>
        </div>
      </div>
    `;
  }
};
ObcAppMenu.styles = unsafeCSS(compentStyle);
ObcAppMenu = __decorateClass([
  customElement("obc-app-menu")
], ObcAppMenu);
export {
  ObcAppMenu
};
//# sourceMappingURL=app-menu.js.map
