"use strict";const e=require("../../../../common/vendor.js");require("../../../adapter-vue.js");const n=require("../../../utils/type-check.js"),o=require("../../../../common/assets.js"),t=require("../../../components/TUIChat/offlinePushInfoManager/index.js"),s=require("../../../components/TUIChat/offlinePushInfoManager/const.js");Math||r();const r=()=>"../../../components/common/Icon.js",a=e.defineComponent({__name:"message-call-c2c",props:{message:{type:Object,default:()=>({})},signalingInfo:{type:Object,default:()=>({})},customContent:{type:Object,default:()=>({})}},setup(r){const a=r,l=e.ref(e.qt.TYPES),u=e.computed((()=>null!=a.signalingInfo)),c=e.computed((()=>{var e,t;switch(null==(t=n.JSONToObject(null==(e=a.signalingInfo)?void 0:e.data))?void 0:t.call_type){case 1:return{type:1,icon:o.callVoiceSVG};case 2:return{type:2,icon:o.callVideoSVG}}return{type:0,icon:""}})),i=e.computed((()=>{var e;return null==(e=a.message)?void 0:e.conversationType})),f=e.computed((()=>{var e;return null==(e=a.customContent)?void 0:e.custom})),m=()=>{var n,o,r,l;if(i.value===e.qt.TYPES.CONV_C2C){const u="out"===(null==(n=a.message)?void 0:n.flow)?null==(o=a.message)?void 0:o.to:null==(r=a.message)?void 0:r.from;e.R.callService({serviceName:e.E.TUICalling.SERVICE.NAME,method:e.E.TUICalling.SERVICE.METHOD.START_CALL,params:{userIDList:[u],type:null==(l=null==c?void 0:c.value)?void 0:l.type,callParams:{offlinePushInfo:t.OfflinePushInfoManager.getOfflinePushInfo(s.PUSH_SCENE.CALL)}}})}};return(n,o)=>e.e({a:e.unref(u)&&e.unref(i)===e.unref(l).CONV_C2C},e.unref(u)&&e.unref(i)===e.unref(l).CONV_C2C?{b:e.p({file:e.unref(c).icon}),c:e.n("out"===r.message.flow&&2===e.unref(c).type&&"icon-reverse"),d:e.t(e.unref(f)),e:e.n("call-"+e.unref(i)),f:e.n("out"===r.message.flow&&"call-reverse"),g:e.o$1(m)}:{})}}),l=e._export_sfc(a,[["__scopeId","data-v-dd4801ae"]]);wx.createComponent(l);
