import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{It as t,O as n,R as r,et as i,j as a}from"./vendor-vue-core-X6q-rGJs.js";import{J as o,v as s}from"./vendor-vueuse-B_IQhD9R.js";var c=[`src`,`alt`],l={key:1,class:`flex size-full items-center justify-center bg-modal-card-placeholder-background`},u=r({__name:`MediaImageTop`,props:{asset:{}},emits:[`image-loaded`,`view`],setup(e,{emit:r}){let u=r,{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,r)=>(i(),a(`div`,{class:`relative size-full overflow-hidden rounded bg-modal-card-placeholder-background`,onDblclick:r[0]||=e=>u(`view`)},[t(f)?(i(),a(`div`,l,r[1]||=[n(`i`,{class:`pi pi-image text-3xl text-muted-foreground`},null,-1)])):(i(),a(`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-CkUbzmtU.js.map