var g=Object.defineProperty;var t=(r,n)=>g(r,"name",{value:n,configurable:!0});import{a2 as m,r as i,E as C,w as h,o as y,c as P,d as w,e as u,I as M}from"./vendor-other-Dsj-QuOx.js";const S=["controls","poster"],V=["src"],E=m({__name:"MediaVideoTop",props:{asset:{}},emits:["videoPlayingStateChanged","videoControlsChanged"],setup(r,{emit:n}){const o=n,l=i(!1),a=i(!1),d=C(()=>!a.value||l.value);h(d,s=>{o("videoControlsChanged",s)}),y(()=>{o("videoControlsChanged",d.value)});const v=t(()=>{a.value=!0,o("videoPlayingStateChanged",!0)},"onVideoPlay"),c=t(()=>{a.value=!1,o("videoPlayingStateChanged",!1)},"onVideoPause"),p=t(()=>{a.value=!1,o("videoPlayingStateChanged",!1)},"onVideoEnded");return(s,e)=>(w(),P("div",{class:"relative size-full overflow-hidden rounded bg-black",onMouseenter:e[1]||(e[1]=f=>l.value=!0),onMouseleave:e[2]||(e[2]=f=>l.value=!1)},[u("video",{controls:d.value,preload:"metadata",autoplay:"",muted:"",loop:"",playsinline:"",poster:s.asset.preview_url,class:"relative size-full object-contain transition-transform duration-300 group-hover:scale-105 group-data-[selected=true]:scale-105",onClick:e[0]||(e[0]=M(()=>{},["stop"])),onPlay:v,onPause:c,onEnded:p},[u("source",{src:s.asset.src||""},null,8,V)],40,S)],32))}});export{E as default};
//# sourceMappingURL=MediaVideoTop-B5qFe2QW.js.map
