import{getContext as e,store as o}from"@wordpress/interactivity";const{state:t}=o("twentig/modal",{state:{video:"",iframe:"",lightboxClassNames:"",get isVideoPlaying(){return""!==t.video},get isIframePlaying(){return""!==t.iframe}},actions:{openVideoModal:o=>{o.preventDefault();const{videoSrc:a,iframeSrc:i,lightboxClassNames:s}=e();t.video=a,t.iframe=i,t.lightboxClassNames=s;const d=document.getElementById("tw-modal-video");d&&d.showModal()},closeVideoModal:()=>{const e=document.getElementById("tw-modal-video");e&&e.close()},onCloseVideoModal(){t.video="",t.iframe="",t.lightboxClassNames=""}}});