"use strict";const e=require("../../../../../common/vendor.js");require("../../../../adapter-vue.js");const u=require("../../../../utils/env.js");Math||(o+l)();const l=()=>"../../../common/Dialog/index.js",o=()=>"../../../common/Transfer/index.js",r=e.defineComponent({__name:"index",props:{type:{type:String,default:""},currentConversation:{type:Object,default:()=>({})},isGroup:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(l,{expose:o,emit:r}){const t=l,a=r,n=e.ref(!1),i=e.ref(""),s=e.ref([]),v=e.ref([]),d=e.ref(""),c={voiceCall:"发起群语音",videoCall:"发起群视频"},p=e.computed((()=>c[t.type]?c[t.type]:""));e.Zt.getUserProfile().then((e=>{var u;(null==(u=null==e?void 0:e.data)?void 0:u.userID)&&(d.value=e.data.userID)})),e.watch((()=>{var e;return[null==(e=null==t?void 0:t.currentConversation)?void 0:e.conversationID,n.value]}),((u,l)=>{u&&u!==l&&(t.isGroup&&n.value?(i.value=t.currentConversation.groupProfile.groupID,e.es.getGroupMemberList({groupID:i.value}).then((e=>{var u,l;s.value=null==(l=null==(u=null==e?void 0:e.data)?void 0:u.memberList)?void 0:l.filter((e=>(null==e?void 0:e.userID)!==d.value)),v.value=s.value}))):(i.value="",s.value=[],v.value=s.value))}),{immediate:!0});const f=e=>{var u;const l=null==(u=s.value)?void 0:u.filter((u=>(null==u?void 0:u.userID)===e));v.value=(null==l?void 0:l.length)?l:s.value},m=e=>{const u=[];null==e||e.forEach((e=>{(null==e?void 0:e.userID)&&u.push(e.userID)})),"voiceCall"===t.type?a("submit",{userIDList:u,groupID:i.value,type:1}):"videoCall"===t.type&&a("submit",{userIDList:u,groupID:i.value,type:2}),v.value=s.value,g(!1)},D=()=>{v.value=s.value,a("cancel"),g(!1)},g=e=>{n.value=e};return o({toggleShow:g}),(l,o)=>({a:e.o$1(f),b:e.o$1(m),c:e.o$1(D),d:e.p({isSearch:!0,title:e.unref(p),list:e.unref(v),isH5:!e.unref(u.isPC),isRadio:!1}),e:e.o$1(g),f:e.p({show:e.unref(n),isH5:!e.unref(u.isPC),isHeaderShow:!1,isFooterShow:!1,background:!1})})}});wx.createComponent(r);
