import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{$ as t,A as n,D as r,Ft as i,L as a}from"./vendor-vue-core-D3IvUUeM.js";import{J as o,v as s}from"./vendor-vueuse-ChSVzIZz.js";var c=[`src`,`alt`],l={key:1,class:`flex size-full items-center justify-center bg-modal-card-placeholder-background`},u=a({__name:`MediaImageTop`,props:{asset:{}},emits:[`image-loaded`,`view`],setup(e,{emit:a}){let u=a,{state:d,error:f,isReady:p}=s({src:e.asset.src??``,alt:e.asset.name});return o(()=>p.value&&d.value?.naturalWidth&&d.value?.naturalHeight,()=>u(`image-loaded`,d.value.naturalWidth,d.value.naturalHeight)),(e,a)=>(t(),n(`div`,{class:`relative size-full overflow-hidden rounded bg-modal-card-placeholder-background`,onDblclick:a[0]||=e=>u(`view`)},[i(f)?(t(),n(`div`,l,a[1]||=[r(`i`,{class:`pi pi-image text-3xl text-muted-foreground`},null,-1)])):(t(),n(`img`,{key:0,src:e.asset.src,alt:e.asset.name,class:`size-full object-contain transition-transform duration-300 group-hover:scale-105 group-data-[selected=true]:scale-105`},null,8,c))],32))}});export{u as default};
//# sourceMappingURL=MediaImageTop-BH_7NewX.js.map