var g=Object.defineProperty;var t=(r,n)=>g(r,"name",{value:n,configurable:!0});import{bx 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-CSX7WseZ.js";const S=["controls","poster"],V=["src"],k=m({__name:"MediaVideoTop",props:{asset:{}},emits:["videoPlayingStateChanged","videoControlsChanged"],setup(r,{emit:n}){const o=n,l=i(!1),s=i(!1),d=C(()=>!s.value||l.value);h(d,a=>{o("videoControlsChanged",a)}),y(()=>{o("videoControlsChanged",d.value)});const v=t(()=>{s.value=!0,o("videoPlayingStateChanged",!0)},"onVideoPlay"),c=t(()=>{s.value=!1,o("videoPlayingStateChanged",!1)},"onVideoPause"),p=t(()=>{s.value=!1,o("videoPlayingStateChanged",!1)},"onVideoEnded");return(a,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:a.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:a.asset.src||""},null,8,V)],40,S)],32))}});export{k as default};
//# sourceMappingURL=MediaVideoTop-D2GQ_YxV.js.map
