import{u as w}from"./vue-i18n-90d534a9.js";import{u as D}from"./vue-router-7f882520.js";import{o as G,z as R,I as $,q as v,A as N,_ as C}from"./index-ae60edf9.js";import{_ as T}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{A as e}from"./data-6aa94e54.js";import{f as y}from"./open-im-sdk-wasm-f19f04ec.js";import{d as U,k as m,o as d,c as _,$ as s,u as p,a as o,aX as a,P as h}from"./@vue-cb50a1c4.js";import{B}from"./index-e4a7d928.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"./index-597402db.js";import"./arrows_left-f963ef62.js";const M={class:"page_container"},j={class:"bg-white"},E={class:"flex items-center px-[22px] pt-4 pb-4"},L={class:"ml-2 max-w-[160px] truncate"},V={key:0,class:"ml-2 max-w-[160px] truncate text-sm"},q={class:"text-sub-text"},z={class:"text-primary"},J={class:"mx-[22px] h-[80px] overflow-hidden rounded-md bg-[#F7F7F7] border border-[#DEDEDE]"},K={class:"px-4 py-2"},P={class:"py-3 px-[22px] text-right text-[13px] text-[#666]"},Q={key:0},X={class:"mb-4 flex flex-row items-center justify-around px-4"},H=U({__name:"index",props:{type:null,application:null},setup(c){const t=c,g=[e.RecivedFriendApplication,e.SentFriendApplication],{t:n}=w(),A=D(),F=g.includes(t.type)?n("contactMenu.newFriends"):n("contactMenu.newGroup"),b=m(()=>{switch(t.type){case e.RecivedFriendApplication:return t.application.fromNickname;case e.SentFriendApplication:return t.application.toNickname;case e.RecivedGroupApplication:return t.application.nickname;case e.SentGroupApplication:return t.application.groupName;default:return""}}),k=m(()=>{switch(t.type){case e.RecivedFriendApplication:return t.application.fromFaceURL;case e.SentFriendApplication:return t.application.toFaceURL;case e.RecivedGroupApplication:return t.application.userFaceURL;case e.SentGroupApplication:return t.application.groupFaceURL;default:return""}}),l=t.type===e.SentGroupApplication||t.type===e.RecivedGroupApplication,I=m(()=>t.application.joinSource===y.Invitation?n("groupMemberApply"):t.application.joinSource===y.Search?n("searchGroupID"):n("scanQrCode")),f=i=>{R({duration:0,forbidClick:!0,message:n("loading")}),$[l?`${i?"accept":"refuse"}GroupApplication`:`${i?"accept":"refuse"}FriendApplication`]({groupID:t.application.groupID,fromUserID:t.application.userID,toUserID:t.application.fromUserID,handleMsg:""}).then(()=>{v({onClose:A.back})}).catch(u=>v({error:u})).finally(N)};return(i,r)=>{const u=T,x=B;return d(),_("div",M,[s(u,{title:p(F)},null,8,["title"]),o("div",j,[o("div",E,[s(G,{size:48,src:p(k)},null,8,["src"]),o("div",null,[o("div",L,a(p(b)),1),p(l)?(d(),_("div",V,[o("span",q,a(i.$t("applyJoin"))+":",1),o("span",z,a(c.application.groupName),1)])):h("",!0)])]),o("div",J,[o("div",K,a(c.application.reqMsg),1)]),o("div",P,[p(l)?(d(),_("span",Q,a(i.$t("source"))+":"+a(p(I)),1)):h("",!0)]),o("div",X,[s(x,{class:"w-[160px]",type:"default",text:i.$t("buttons.reject"),onClick:r[0]||(r[0]=S=>f(!1))},null,8,["text"]),s(x,{class:"w-[160px]",type:"primary",text:i.$t("buttons.accept"),onClick:r[1]||(r[1]=S=>f(!0))},null,8,["text"])])])])}}});const kt=C(H,[["__scopeId","data-v-c65ac70f"]]);export{kt as default};
