import{p as e,H as t,h as l,t as s}from"./p-BHHBMN0G.js";import{d as c}from"./p-Dq2r_Sid.js";import{d as i}from"./p-C1DHlsEo.js";import{d as a}from"./p-Bmv0DoO8.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.others=!1}getClass(){return["ecl-file__translation-container","sc-ecl-file-"+this.theme,this.styleClass].join(" ")}componentWillLoad(){var e;this.theme=null!==(e=document.documentElement.getAttribute("data-ecl-theme"))&&void 0!==e?e:this.theme||"ec"}componentDidRender(){const e=this.el.querySelectorAll(".ecl-file__translation-item").length,t=document.createTextNode(` (${e}) `);this.el.querySelector(".ecl-file__translation-toggle")&&this.el.querySelector(".ecl-file__translation-toggle .ecl-button__icon").before(t)}render(){return l("div",{key:"217c411335fdf9aaf79b9f90a168bc262a1030c5",class:this.getClass(),"data-ecl-file-translation-container":!0},l("ecl-button",{key:"e3f4f9ac27c432c97e4e2fd209311d2fdce70857",styleClass:"ecl-file__translation-toggle sc-ecl-file-"+this.theme,variant:"tertiary","data-ecl-file-translation-toggle":!0,theme:this.theme},this.toggleLabel,l("ecl-icon",{key:"c17979edc0afcb4afa62f103602ac146a8132f59",styleClass:"ecl-button__icon ecl-button__icon--after",icon:"corner-arrow",rotate:"180",size:"fluid"})),l("ul",{key:"cf9704b444d2063298f28532d7438a0346f49059",class:"ecl-file__translation-list sc-ecl-file-"+this.theme},l("slot",{key:"7edaa3370f47be8502f0debf8c780fb14cbe5dcc"}),this.others?l("li",{class:"ecl-file__translation-item ecl-file__translation-description sc-ecl-file-"+this.theme},l("slot",{name:"others"})):""))}get el(){return this}},[260,"ecl-file-translations",{theme:[1025],styleClass:[1,"style-class"],toggleLabel:[1,"toggle-label"],others:[4]}]),o=n,r=function(){"undefined"!=typeof customElements&&["ecl-file-translations","ecl-button","ecl-icon","ecl-indicator"].forEach((e=>{switch(e){case"ecl-file-translations":customElements.get(s(e))||customElements.define(s(e),n);break;case"ecl-button":customElements.get(s(e))||c();break;case"ecl-icon":customElements.get(s(e))||i();break;case"ecl-indicator":customElements.get(s(e))||a()}}))};export{o as EclFileTranslations,r as defineCustomElement}