import{p as t,H as e,h as i,t as l}from"./p-BHHBMN0G.js";import{d as s}from"./p-C1DHlsEo.js";import{d as a}from"./p-Bmv0DoO8.js";import{d as n}from"./p-CvotSt5y.js";const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.variant="default",this.downloadAttribute=!1}getClass(){return["ecl-file__translation-item","sc-ecl-file-"+this.theme,this.styleClass].join(" ")}getChildrenClass(){return"ecl-file__translation-"+("default"===this.variant?"info":"detail")}getTitle(){return i("div",{class:"ecl-file__translation-title sc-ecl-file-"+this.theme,lang:this.language,id:this.parentId+"-lang"},this.fileTitle)}getMeta(){return i("div",{class:"ecl-file__translation-meta sc-ecl-file-"+this.theme},this.meta)}componentWillLoad(){var t;this.theme=null!==(t=document.documentElement.getAttribute("data-ecl-theme"))&&void 0!==t?t:this.theme||"ec"}componentDidLoad(){const t=this.el.closest(".ecl-file");t&&(this.parentId=t.id,this.downloadAttribute=t.hasAttribute("download-attribute"))}render(){return i("li",{key:"23764b3fbef06dbe1c2066bac073ec636c8f1d09",class:this.getClass()},"thumbnail"==this.variant?i("div",{class:"ecl-file__translation-detail sc-ecl-file-"+this.theme},this.getTitle()):"","thumbnail"==this.variant?i("div",{class:"ecl-file__translation-info sc-ecl-file-"+this.theme},this.getMeta()):i("div",{class:"ecl-file__translation-info sc-ecl-file-"+this.theme},this.getTitle(),this.getMeta()),i("div",{key:"c93de33506c208cdd6051ed061ae333f4db17a8f",class:"ecl-file__translation-action sc-ecl-file-"+this.theme},i("ecl-link",Object.assign({key:"d3252a42c74807648c1723fcf503acf2bfd4f520",path:this.downloadLink,variant:"standalone",styleClass:"ecl-file__translation-download sc-ecl-file-"+this.theme,theme:this.theme,"aria-labelledby":`${this.parentId}-label ${this.parentId}-title ${this.parentId}-link`,id:this.parentId+"-link"},this.downloadAttribute?{download:!0}:{}),this.downloadLabel,i("ecl-icon",{key:"21e52be1752d43ac107d4cb83436ad0a8dd6055c",slot:"icon-after",size:"fluid",icon:"download",theme:this.theme}))))}get el(){return this}},[0,"ecl-file-translations-item",{theme:[1025],styleClass:[1,"style-class"],variant:[1],meta:[1],parentId:[1025,"parent-id"],fileTitle:[1,"file-title"],downloadLink:[1,"download-link"],downloadLabel:[1,"download-label"],downloadAttribute:[1028,"download-attribute"],language:[1]}]),o=c,d=function(){"undefined"!=typeof customElements&&["ecl-file-translations-item","ecl-icon","ecl-indicator","ecl-link"].forEach((t=>{switch(t){case"ecl-file-translations-item":customElements.get(l(t))||customElements.define(l(t),c);break;case"ecl-icon":customElements.get(l(t))||s();break;case"ecl-indicator":customElements.get(l(t))||a();break;case"ecl-link":customElements.get(l(t))||n()}}))};export{o as EclFileTranslationsItem,d as defineCustomElement}