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 EclFileTranslationsItem$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.theme = 'ec';
    this.styleClass = undefined;
    this.variant = 'default';
    this.meta = undefined;
    this.fileTitle = undefined;
    this.downloadLink = undefined;
    this.downloadLabel = undefined;
    this.language = undefined;
  }
  getClass() {
    const styleClasses = [
      `ecl-file__translation-item`,
      `sc-ecl-file-${this.theme}`,
      this.styleClass
    ];
    return styleClasses.join(' ');
  }
  getChildrenClass() {
    return `ecl-file__translation-${this.variant === 'default' ? 'info' : 'detail'}`;
  }
  getTitle() {
    return h("div", { class: `ecl-file__translation-title sc-ecl-file-${this.theme}`, lang: this.language }, this.fileTitle);
  }
  getMeta() {
    return h("div", { class: `ecl-file__translation-meta sc-ecl-file-${this.theme}` }, this.meta);
  }
  render() {
    return (h("li", { class: this.getClass() }, this.variant == 'thumbnail' ?
      h("div", { class: `ecl-file__translation-detail sc-ecl-file-${this.theme}` }, this.getTitle()) : '', this.variant == 'thumbnail' ?
      h("div", { class: `ecl-file__translation-info sc-ecl-file-${this.theme}` }, this.getMeta()) :
      h("div", { class: `ecl-file__translation-info sc-ecl-file-${this.theme}` }, this.getTitle(), this.getMeta()), h("ecl-link", { path: this.downloadLink, variant: "standalone", styleClass: `ecl-file__translation-download sc-ecl-file-${this.theme}`, theme: this.theme }, this.downloadLabel, h("ecl-icon", { slot: "icon-after", size: "fluid", icon: "download", theme: this.theme }))));
  }
}, [0, "ecl-file-translations-item", {
    "theme": [1],
    "styleClass": [1, "style-class"],
    "variant": [1],
    "meta": [1],
    "fileTitle": [1, "file-title"],
    "downloadLink": [1, "download-link"],
    "downloadLabel": [1, "download-label"],
    "language": [1]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["ecl-file-translations-item", "ecl-icon", "ecl-link"];
  components.forEach(tagName => { switch (tagName) {
    case "ecl-file-translations-item":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, EclFileTranslationsItem$1);
      }
      break;
    case "ecl-icon":
      if (!customElements.get(tagName)) {
        defineCustomElement$3();
      }
      break;
    case "ecl-link":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
  } });
}

const EclFileTranslationsItem = EclFileTranslationsItem$1;
const defineCustomElement = defineCustomElement$1;

export { EclFileTranslationsItem, defineCustomElement };

//# sourceMappingURL=ecl-file-translations-item.js.map