import{r as e,h as l,a as c}from"./p-ytAlchvh.js";const t=class{constructor(l){e(this,l),this.styleClass="",this.thumbZoom=!1,this.type="image"}getClass(){return["ecl-gallery__item",`sc-ecl-gallery-${this.theme}`,this.styleClass].join(" ")}getThumbClass(){const e=["ecl-gallery__thumbnail",`sc-ecl-gallery-${this.theme}`];return this.thumbZoom&&e.push("ecl-picture--zoom"),e.join(" ")}getLinkAttr(){const e={"data-ecl-gallery-item":""};return this.mediaSharePath&&(e["data-ecl-gallery-item-share"]=this.mediaSharePath),this.mediaIframeHref&&(e["data-ecl-gallery-item-embed-src"]=this.mediaIframeHref),e}getId(){return this.elId?this.elId:`${this.el.closest(".ecl-gallery").id}-item-${Math.random().toString(36).slice(2,10)}`}componentWillLoad(){var e;this.theme=null!==(e=document.documentElement.getAttribute("data-ecl-theme"))&&void 0!==e?e:this.theme||"ec"}render(){return l("li",{key:"5d29be910a03137fd9ffb4883bf85dcc1a361e40",class:this.getClass(),id:this.getId()},l("a",Object.assign({key:"efe87c79ff285fd0ccfd7d62e495f9ce3d57cc18",href:this.mediaIframeHref?this.mediaIframeHref:this.mediaHref,class:`ecl-gallery__item-link sc-ecl-gallery-${this.theme}`},this.getLinkAttr()),l("figure",{key:"a07feeccb7c3a350c67f87b660ae8a0566bd6823",class:`ecl-gallery__image-container sc-ecl-gallery-${this.theme}`},this.thumbnail&&l("ecl-picture",{key:"e3f2934e8a3a57bdf9d91da595b9252de8e30626",image:this.thumbnail,"style-class":this.getThumbClass(),"img-class":`ecl-gallery__image sc-ecl-gallery-${this.theme}`},l("slot",{key:"f527944436b02da13bf377fa38afe34d91c90b41",name:"thumbnail-sources"})),l("slot",{key:"7dbcd256328b9ce20b71cc85f1cc1a1c0752c27d",name:"video"}),"html-video"!==this.type?l("ecl-picture",{image:this.mediaHref,"image-alt":this.imageAlt,styleClass:`ecl-gallery__picture sc-ecl-gallery-${this.theme}`,"img-class":`ecl-gallery__image sc-ecl-gallery-${this.theme}`,lazy:!0},l("slot",{name:"sources"})):"","image"!==this.type?l("div",{class:`ecl-gallery__item-icon-wrapper sc-ecl-gallery-${this.theme}`},l("ecl-icon",{"style-class":`ecl-gallery__item-icon sc-ecl-gallery-${this.theme}`,icon:"play-filled",size:"l",color:"inverted"})):"",l("figcaption",{key:"028b2c83cdcec0dc1f09f1f037602fd52d98da81",class:`ecl-gallery__description sc-ecl-gallery-${this.theme}`,"data-ecl-gallery-description":!0},this.icon?l("ecl-icon",{icon:this.icon,styleClass:"ecl-gallery__description-icon",size:"s"}):"",l("div",{key:"140dca7873b1d7e5fef5d942ba7f7810f08c0b6a",class:"ecl-gallery__title","data-ecl-gallery-title":!0,id:`${this.getId()}-title`},l("slot",{key:"78d2a40160102f802c2939ba1d991eee1fbe2b42"})),l("span",{key:"4a895cc138c66f382ca15f21a8b54a04c0c98fc3",class:`ecl-gallery__meta sc-ecl-gallery-${this.theme}`,"data-ecl-gallery-meta":!0},this.meta)))))}get el(){return c(this)}};t.style=".ecl-gallery__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}";export{t as ecl_gallery_item}