import"./rolldown-runtime-DIIn1E2Q.js";import{O as e,R as t,Rt as n,et as r,j as i}from"./vendor-vue-core-DO0afONr.js";import{nt as a,x as o}from"./vendor-vueuse-DUMtJaL2.js";import{i as s}from"./assetMetadataUtils-Bi25nHoy.js";var c=[`src`,`alt`],l={key:1,class:`flex size-full items-center justify-center bg-modal-card-placeholder-background`},u=t({__name:`MediaImageTop`,props:{asset:{}},emits:[`image-loaded`,`view`],setup(t,{emit:u}){let d=u,{state:f,error:p,isReady:m}=o({src:t.asset.src??``,alt:s(t.asset)});return a(()=>m.value&&f.value?.naturalWidth&&f.value?.naturalHeight,()=>d(`image-loaded`,f.value.naturalWidth,f.value.naturalHeight)),(t,a)=>(r(),i(`div`,{class:`relative size-full overflow-hidden rounded-sm bg-modal-card-placeholder-background`,onDblclick:a[0]||=e=>d(`view`)},[n(p)?(r(),i(`div`,l,a[1]||=[e(`i`,{class:`pi pi-image text-3xl text-muted-foreground`},null,-1)])):(r(),i(`img`,{key:0,src:t.asset.src,alt:n(s)(t.asset),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-OjOebxOU.js.map