import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{Cr as n,Fr as r,Nn as i,Un as a,Xn as o,Xr as s,Zn as c,br as l,er as u,sr as d}from"./vendor-primevue-D50rA9nL.js";var f,p,m,h=t((()=>{i(),f=[`controls`,`poster`],p=[`src`],m=d({__name:`MediaVideoTop`,props:{asset:{}},emits:[`videoPlayingStateChanged`,`videoControlsChanged`],setup(e,{emit:t}){let i=t,d=s(!1),m=s(!1),h=o(()=>!m.value||d.value);r(h,e=>{i(`videoControlsChanged`,e)}),l(()=>{i(`videoControlsChanged`,h.value)});let onVideoPlay=()=>{m.value=!0,i(`videoPlayingStateChanged`,!0)},onVideoPause=()=>{m.value=!1,i(`videoPlayingStateChanged`,!1)},onVideoEnded=()=>{m.value=!1,i(`videoPlayingStateChanged`,!1)};return(e,t)=>(n(),u(`div`,{class:`relative size-full overflow-hidden rounded bg-black`,onMouseenter:t[1]||=e=>d.value=!0,onMouseleave:t[2]||=e=>d.value=!1},[c(`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]||=a(()=>{},[`stop`]),onPlay:onVideoPlay,onPause:onVideoPause,onEnded:onVideoEnded},[c(`source`,{src:e.asset.src||``},null,8,p)],40,f)],32))}})})),g;t((()=>{h(),h(),g=m}))();export{g as default};
//# sourceMappingURL=MediaVideoTop-C0DdXMtn.js.map