import{u as h}from"./vue-i18n-90d534a9.js";import{u as D}from"./vue-router-7f882520.js";import{I as p,q as m}from"./index-ae60edf9.js";import{F as I}from"./index-fc073ec7.js";import{_ as S}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{u as T}from"./useConversationToggle-dd6106ea.js";import{f as l}from"./open-im-sdk-wasm-f19f04ec.js";import{d as b,b as u,o as y,c as x,$ as c,bj as C,a as r,aX as d}from"./@vue-cb50a1c4.js";import"./@intlify-1c0af683.js";import"./dayjs-4460abc8.js";import"./@amap-aca98dec.js";import"./pinia-de4079f2.js";import"./axios-7d5a0a64.js";import"./form-data-497f8b5e.js";import"./uuid-a960c1f4.js";import"./date-fns-f56f60e6.js";import"./@babel-7fd5df1e.js";import"./mitt-f7ef348c.js";import"./@vueuse-19adab01.js";import"./livekit-client-ca552de3.js";import"./@livekit-3058dbe8.js";import"./loglevel-e40a507a.js";import"./rxjs-2154ddb2.js";import"./tslib-8dbab242.js";import"./@vuemap-5ebdc63e.js";import"./lodash-es-91418b19.js";import"./use-id-22cfdfcf.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";const G={class:"page_container"},$={class:"my-2 pl-[22px] text-sm text-[#999]"},k={class:"bg-white"},ae=b({__name:"index",props:{isGroup:null,sourceID:null,isScan:null,notNeedVerification:null,sessionType:null},setup(a){const e=a,{t:i}=h(),f=D(),{toSpecifiedConversation:g}=T(),t=u(""),n=u(!1),v=()=>{n.value=!0;let o;e.isGroup?o=p.joinGroup({groupID:e.sourceID,reqMsg:t.value,joinSource:e.isScan?l.QrCode:l.Search}):o=p.addFriend({toUserID:e.sourceID,reqMsg:t.value}),o.then(()=>{m({message:e.notNeedVerification?i("messageTip.joinedGroup"):i("messageTip.sendSuccess")}),setTimeout(()=>{e.notNeedVerification?g({sourceID:e.sourceID,sessionType:e.sessionType}):f.back()},1e3)}).catch(s=>m({message:i("messageTip.sendFailed"),error:s})).finally(()=>n.value=!1)};return(o,s)=>{const _=I;return y(),x("div",G,[c(S,{title:a.isGroup?o.$t("groupVerificationDesc"):o.$t("friendVerification")},{default:C(()=>[r("span",{class:"px-2",onClick:v},d(o.$t("buttons.send")),1)]),_:1},8,["title"]),r("div",$,d(o.$t("buttons.sendVerification")),1),r("div",k,[c(_,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=V=>t.value=V),autosize:{minHeight:112},type:"textarea",maxlength:"20","show-word-limit":""},null,8,["modelValue"])])])}}});export{ae as default};
