"use strict";const e=require("../../../../../common/vendor.js");require("../../../../adapter-vue.js");const t=155,s=e.defineComponent({__name:"message-image",props:{content:{default:()=>({})},messageItem:{default:()=>({})}},emits:["previewImage"],setup(s,{emit:a}){const n=a,o=s,r=e.ref({width:"auto",height:"auto"}),i=e=>{const{width:s,height:a}=e;if(0===s||0===a)return;let n=0,o=0;s>=a?(n=t,o=t*a/s):(n=t*s/a,o=t),r.value.width=n+"px",r.value.height=o+"px"};e.watchEffect((()=>{i(o.content)}));const u=e=>{i(e.detail)},c=()=>{var e;"success"!==(null==(e=o.messageItem)?void 0:e.status)&&1!==o.messageItem.progress||n("previewImage")};return(t,s)=>({a:o.content.url,b:e.unref(r).width,c:e.unref(r).height,d:e.o$1(u),e:e.o$1(c)})}}),a=e._export_sfc(s,[["__scopeId","data-v-b011a1d6"]]);wx.createComponent(a);
