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

const eclAccordionItemCss = ".sc-ecl-accordion-item-h{display:block}";

const EclAccordionItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.styleClass = undefined;
    this.label = undefined;
    this.expanded = undefined;
    this.theme = 'ec';
  }
  getClass() {
    return [
      `ecl-accordion__item`,
      this.styleClass
    ].join(' ');
  }
  render() {
    return (h(Host, { class: this.getClass() }, h("h3", { class: "ecl-accordion__title" }, h("button", { "data-ecl-accordion-toggle": true, "aria-controls": `${this.el.id}-content`, class: "ecl-accordion__toggle", "aria-expanded": this.expanded ? 'true' : 'false' }, h("span", { class: "ecl-accordion__toggle-flex" }, h("span", { class: "ecl-accordion__toggle-indicator" }, h("ecl-icon", { icon: this.expanded ? "minus" : 'plus', theme: this.theme, size: "m", "style-class": "ecl-accordion__toggle-icon", "data-ecl-accordion-icon": true })), h("span", { class: "ecl-accordion__toggle-title" }, this.label)))), h("div", { class: "ecl-accordion__content", role: "region", id: `${this.el.id}-content`, hidden: this.expanded !== true }, h("slot", null))));
  }
  static get assetsDirs() { return ["build"]; }
  get el() { return this; }
  static get style() { return eclAccordionItemCss; }
}, [6, "ecl-accordion-item", {
    "styleClass": [1, "style-class"],
    "label": [1],
    "expanded": [516],
    "theme": [1]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["ecl-accordion-item", "ecl-icon"];
  components.forEach(tagName => { switch (tagName) {
    case "ecl-accordion-item":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, EclAccordionItem$1);
      }
      break;
    case "ecl-icon":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}

const EclAccordionItem = EclAccordionItem$1;
const defineCustomElement = defineCustomElement$1;

export { EclAccordionItem, defineCustomElement };

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