import{bx as u,er as c,d5 as m,c as t,d as s,by as g,e as v}from"./vendor-other-CSX7WseZ.js";const f=["src","alt"],p={key:1,class:"flex size-full items-center justify-center bg-modal-card-placeholder-background"},k=u({__name:"MediaImageTop",props:{asset:{}},emits:["image-loaded","view"],setup(l,{emit:n}){const r=n,{state:e,error:i,isReady:d}=c({src:l.asset.src??"",alt:l.asset.name});return m(()=>d.value&&e.value?.naturalWidth&&e.value?.naturalHeight,()=>r("image-loaded",e.value.naturalWidth,e.value.naturalHeight)),(o,a)=>(s(),t("div",{class:"relative size-full overflow-hidden rounded bg-modal-card-placeholder-background",onDblclick:a[0]||(a[0]=b=>r("view"))},[g(i)?(s(),t("div",p,a[1]||(a[1]=[v("i",{class:"pi pi-image text-3xl text-muted-foreground"},null,-1)]))):(s(),t("img",{key:0,src:o.asset.src,alt:o.asset.name,class:"size-full object-contain transition-transform duration-300 group-hover:scale-105 group-data-[selected=true]:scale-105"},null,8,f))],32))}});export{k as default};
//# sourceMappingURL=MediaImageTop-D4dbadoh.js.map
