import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { d as defineCustomElement$3 } from './ecl-icon2.js';
import { d as defineCustomElement$2 } from './ecl-link2.js';

const EclPopoverItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.theme = 'ec';
    this.styleClass = undefined;
    this.path = undefined;
    this.icon = undefined;
    this.iconSprite = '';
    this.iconSize = 'fluid';
  }
  getClass() {
    const styleClasses = [
      `ecl-popover__item`,
      this.styleClass,
      `sc-ecl-popover-${this.theme}`,
    ];
    return styleClasses.join(' ');
  }
  getLinkClass() {
    const linkClasses = [
      'ecl-popover__link',
      `sc-ecl-popover-${this.theme}`,
    ];
    if (this.icon) {
      linkClasses.push('ecl-link--icon');
    }
    return linkClasses.join(' ');
  }
  render() {
    return (h("li", { class: this.getClass() }, h("ecl-link", { "style-class": `sc-ecl-popover-${this.theme} ecl-popover__link`, variant: "standalone", path: this.path }, this.icon ?
      h("ecl-icon", { "style-class": `sc-ecl-popover-${this.theme} ecl-link__icon`, icon: this.icon, slot: "icon-before", sprite: this.iconSprite || '', size: this.iconSize }) : '', h("slot", null))));
  }
}, [4, "ecl-popover-item", {
    "theme": [1],
    "styleClass": [1, "style-class"],
    "path": [1],
    "icon": [1],
    "iconSprite": [1, "icon-sprite"],
    "iconSize": [1, "icon-size"]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["ecl-popover-item", "ecl-icon", "ecl-link"];
  components.forEach(tagName => { switch (tagName) {
    case "ecl-popover-item":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, EclPopoverItem$1);
      }
      break;
    case "ecl-icon":
      if (!customElements.get(tagName)) {
        defineCustomElement$3();
      }
      break;
    case "ecl-link":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}

const EclPopoverItem = EclPopoverItem$1;
const defineCustomElement = defineCustomElement$1;

export { EclPopoverItem, defineCustomElement };

//# sourceMappingURL=ecl-popover-item.js.map