"use strict";var e=Object.defineProperty,s=Object.defineProperties,a=Object.getOwnPropertyDescriptors,t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,c=(s,a,t)=>a in s?e(s,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[a]=t,n=require("../../../../../../common/vendor.js"),i=require("../../../../../../common/assets.js");const g=n.defineComponent({props:{data:{type:Object,default:()=>({})}},setup(e,i){const g=n.index.$TUIKit.TUIChatServer,l=n.reactive({message:{}});n.watchEffect((()=>{l.message=e.data}));return d=((e,s)=>{for(var a in s||(s={}))r.call(s,a)&&c(e,a,s[a]);if(t)for(var a of t(s))o.call(s,a)&&c(e,a,s[a]);return e})({},n.toRefs(l)),s(d,a({handleMseeage:async e=>{switch(e){case"revoke":await g.revokeMessage(l.message).catch((e=>{(e.code=20016)&&n.index.showToast({title:"消息超过了 2 分钟",icon:"error"})})),l.dialogID="";break;case"delete":await g.deleteMessage([l.message]),l.dialogID="";break;case"resend":await g.resendMessage(l.message),l.dialogID=""}}}));var d}});var l=n._export_sfc(g,[["render",function(e,s,a,t,r,o){return n.e({a:"out"===e.message.flow&&"success"===e.message.status},"out"===e.message.flow&&"success"===e.message.status?{b:i._imports_0$3,c:n.o((s=>e.handleMseeage("revoke")))}:{},{d:"success"===e.message.status},"success"===e.message.status?{e:i._imports_1$1,f:n.o((s=>e.handleMseeage("delete")))}:{},{g:"out"===e.message.flow&&"fail"===e.message.status},"out"===e.message.flow&&"fail"===e.message.status?{h:i._imports_2,i:n.o((s=>e.handleMseeage("resend")))}:{})}],["__scopeId","data-v-011ec2cf"]]);wx.createComponent(l);
