import{r as i,h as t,H as s}from"./p-3d23a42a.js";const a=class{constructor(t){i(this,t),this.openDialog=!1,this.transparent=!1}handleKeyDown(i){"Escape"===i.key&&(this.openDialog=!1)}handleScroll(){this.openDialog&&(this.openDialog=!1)}openImage(){this.openDialog=!0}render(){return t(s,null,t("a",{href:"javascript:void()",onClick:()=>this.openImage()},t("img",{src:this.src,alt:this.alt,width:this.width,height:this.height})),this.openDialog&&t("div",{class:"overlay "+(this.openDialog?"is-visible":"")+" "+(this.transparent?"is-transparent":"")},t("div",{class:"modal-window"},t("div",{class:"modal-window__content"},t("img",{src:this.src,alt:this.alt,width:this.width,height:this.height})))))}};a.style=":host{display:block}.overlay{opacity:0;visibility:hidden;position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(0, 0, 0, 0.7);-webkit-transition:opacity 0.5s, visibility 0s 0.5s;transition:opacity 0.5s, visibility 0s 0.5s;display:flex;align-items:center;justify-content:center;z-index:100}.is-visible{opacity:1;visibility:visible;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.is-transparent{opacity:0}.modal-window{border-radius:25px;width:75%;height:75%;padding:50px;display:flex;align-items:center;justify-content:center}.modal-window__content{width:100%;height:100%;display:flex;justify-content:center;align-items:center;animation-name:zoom;animation-duration:0.6s}@keyframes zoom{from{transform:scale(0)}to{transform:scale(1)}}";export{a as sparkle_modal_image}