import{p as e,H as t,h as l,t as i}from"./p-BHHBMN0G.js";import{d as s}from"./p-Dq2r_Sid.js";import{d as c}from"./p-C1DHlsEo.js";import{d as n}from"./p-Bmv0DoO8.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.elId="ecl-timeline-item-"+(Date.now().toString(16)+Math.random().toString(16).slice(2,10))}getClass(){const e=["ecl-timeline__item","sc-ecl-timeline-"+this.theme,this.styleClass];return"toggle"===this.type&&e.push("ecl-timeline__item--toggle"),"headline"===this.type&&e.push("ecl-timeline__item--headline"),e.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;e.querySelector("ecl-timeline__item--headline")&&e.parentElement.classList.add("ecl-timeline--has-headline");let l=e.previousElementSibling;for(;l;){if(l instanceof t&&"toggle"===l.getAttribute("type")){this.el.firstElementChild.classList.add("ecl-timeline__item--collapsed");break}l=l.previousElementSibling}}render(){return l("li",{key:"0b710c2817714299507570dfea63635d863d4af9",class:this.getClass(),id:this.elId},"toggle"!==this.type?l("div",{class:"ecl-timeline__tooltip sc-ecl-timeline-"+this.theme},l("div",{class:"ecl-timeline__tooltip-arrow sc-ecl-timeline-"+this.theme}),this.label?l("div",{class:"ecl-timeline__label sc-ecl-timeline-"+this.theme},this.label):"",this.itemTitle?l("div",{class:"ecl-timeline__title sc-ecl-timeline-"+this.theme},this.itemTitle):"",l("div",{class:"ecl-timeline__content sc-ecl-timeline-"+this.theme},l("slot",null))):"","toggle"===this.type?l("ecl-button",{theme:this.theme,variant:"secondary","data-ecl-timeline-button":!0,styleClass:"ecl-timeline__toggle sc-ecl-timeline-"+this.theme,"data-ecl-label-expanded":this.toggleLabelExpanded,"data-ecl-label-collapsed":this.toggleLabelCollapsed},l("ecl-icon",{styleClass:"ecl-button__icon--after sc-ecl-timeline-"+this.theme,icon:"corner-arrow",size:"xs",rotate:"180",slot:"icon-after"}),this.toggleLabelCollapsed):"")}get el(){return this}},[260,"ecl-timeline-item",{theme:[1025],styleClass:[1,"style-class"],label:[1],type:[1],elId:[1,"el-id"],itemTitle:[1,"item-title"],toggleLabelCollapsed:[1,"toggle-label-collapsed"],toggleLabelExpanded:[1,"toggle-label-expanded"]}]),a=o,m=function(){"undefined"!=typeof customElements&&["ecl-timeline-item","ecl-button","ecl-icon","ecl-indicator"].forEach((e=>{switch(e){case"ecl-timeline-item":customElements.get(i(e))||customElements.define(i(e),o);break;case"ecl-button":customElements.get(i(e))||s();break;case"ecl-icon":customElements.get(i(e))||c();break;case"ecl-indicator":customElements.get(i(e))||n()}}))};export{a as EclTimelineItem,m as defineCustomElement}