"use strict";const e=require("../../../../../common/vendor.js");require("../../../../adapter-vue.js");const n=require("../../../../utils/type-check.js"),s=require("../../../../constant.js"),t=require("../../../../../common/assets.js"),r=require("../../../../../stores/counter.js");Math||u();const u=()=>"../../../common/Icon.js",f=e.defineComponent({__name:"message-custom",props:{messageItem:{default:void 0},content:{default:void 0}},setup(u){r.useCounterStore();const f=u,a=e.ref(),i=e.ref(),o=e.ref(),c=e.ref({businessID:""});e.watchEffect((()=>{a.value=f.content,i.value=f.messageItem;const{payload:e}=f.messageItem;c.value=e.data||"",c.value=n.JSONToObject(e.data),e.data===s.CHAT_MSG_CUSTOM_TYPE.SERVICE&&(o.value=n.JSONToObject(e.extension))}));return(r,u)=>e.e({a:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).SERVICE},e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).SERVICE?e.e({b:e.t(e.unref(o).title),c:e.unref(o).hyperlinks_text},e.unref(o).hyperlinks_text?{d:e.t(e.unref(o).hyperlinks_text.key),e:e.unref(o).hyperlinks_text.value}:{},{f:e.unref(o).item&&e.unref(o).item.length>0},e.unref(o).item&&e.unref(o).item.length>0?{g:e.f(e.unref(o).item,((s,t,r)=>e.e({a:e.unref(n.isUrl)(s.value)},e.unref(n.isUrl)(s.value)?{b:e.t(s.key),c:s.value}:{d:e.t(s.key)},{e:t})))}:{},{h:e.t(e.unref(o).description)}):e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).EVALUATE?{j:e.t(e.unref(e.Wt).t("message.custom.对本次服务评价")),k:e.f(Math.max(e.unref(c).score,0),((e,n,s)=>({a:"1c4aa8ca-0-"+s,b:n}))),l:e.p({file:e.unref(t.star)}),m:e.t(e.unref(c).comment)}:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).ORDER?{o:e.unref(c).imageUrl,p:e.t(e.unref(c).title),q:e.t(e.unref(c).description),r:e.t(e.unref(c).price),s:e.o$1((n=>{return s=e.unref(c).link,void window.open(s);var s}))}:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).LINK?{v:e.t(e.unref(c).text),w:e.t(e.unref(e.Wt).t("message.custom.查看详情>>")),x:e.unref(c).link}:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).PK?{z:e.unref(c).link,A:e.o$1((n=>function(n){const s=JSON.stringify(n);e.index.navigateTo({url:`/pages/PKMessageprocessing/PKMessageprocessing?customData=${s}`})}(e.unref(c))))}:{B:r.content.custom},{i:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).EVALUATE,n:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).ORDER,t:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).LINK,y:e.unref(c).businessID===e.unref(s.CHAT_MSG_CUSTOM_TYPE).PK})}}),a=e._export_sfc(f,[["__scopeId","data-v-1c4aa8ca"]]);wx.createComponent(a);
