import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{D as t,Dt as n,O as r,R as i,Z as a,b as o,et as s,j as c,pt as l}from"./vendor-vue-core-CvBSzfTV.js";var u=[`controls`,`poster`],d=[`src`],f=i({__name:`MediaVideoTop`,props:{asset:{}},emits:[`videoPlayingStateChanged`,`videoControlsChanged`],setup(e,{emit:i}){let f=i,p=n(!1),m=n(!1),h=t(()=>!m.value||p.value);l(h,e=>{f(`videoControlsChanged`,e)}),a(()=>{f(`videoControlsChanged`,h.value)});let onVideoPlay=()=>{m.value=!0,f(`videoPlayingStateChanged`,!0)},onVideoPause=()=>{m.value=!1,f(`videoPlayingStateChanged`,!1)},onVideoEnded=()=>{m.value=!1,f(`videoPlayingStateChanged`,!1)};return(e,t)=>(s(),c(`div`,{class:`relative size-full overflow-hidden rounded bg-black`,onMouseenter:t[1]||=e=>p.value=!0,onMouseleave:t[2]||=e=>p.value=!1},[r(`video`,{controls:h.value,preload:`metadata`,muted:``,loop:``,playsinline:``,poster:e.asset.preview_url,class:`relative size-full object-contain transition-transform duration-300 group-hover:scale-105 group-data-[selected=true]:scale-105`,onClick:t[0]||=o(()=>{},[`stop`]),onPlay:onVideoPlay,onPause:onVideoPause,onEnded:onVideoEnded},[r(`source`,{src:e.asset.src||``},null,8,d)],40,u)],32))}});export{f as default};
//# sourceMappingURL=MediaVideoTop-CHWxEO_D.js.map