import*as e from"@wordpress/interactivity";var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const r=(i={getContext:()=>e.getContext,store:()=>e.store},n={},t.d(n,i),n),{state:o}=(0,r.store)("buntywp/thread-item",{state:{imageUrl:"",isOpen:!1,get imageSrc(){return o.imageUrl},get isPopupOpen(){return o.isOpen}},actions:{showLightbox:()=>{const e=(0,r.getContext)();o.imageUrl=e.imageUrl,o.isOpen=!0},hideLightbox:()=>{o.imageUrl="",o.isOpen=!1}},callbacks:{setupLightbox:()=>{window.addEventListener("keydown",(e=>{"Escape"===e.key&&(0,r.store)("buntywp/thread-item").actions.hideLightbox()}))}}});var i,n;