"use strict";const e=require("../../../../common/vendor.js");require("../../../adapter-vue.js");const t=require("../../../../common/assets.js"),n=require("../../../utils/env.js");Math||r();const r=()=>"../Icon.js",u=e.defineComponent({__name:"index",props:{list:{type:Array,default:()=>[]},selectedList:{type:Array,default:()=>[]},isSearch:{type:Boolean,default:!0},isRadio:{type:Boolean,default:!1},isCustomItem:{type:Boolean,default:!1},title:{type:String,default:""},type:{type:String,default:""},resultShow:{type:Boolean,default:!0},total:{type:Number,default:0},isHiddenBackIcon:{type:Boolean,default:!1}},emits:["search","submit","cancel","getMore"],setup(r,{emit:u}){const i=r,s=e.ref([]),a=e.ref(0),l=e.ref([]),f=e.ref(!0),o=e.ref(!1),c=e.ref(""),d=e.ref("");e.watchEffect((()=>{if(i.isCustomItem)for(let e=0;e<i.list.length;e++)i.list[e].conversationID.indexOf("@TIM#SYSTEM")>-1&&i.list.splice(e,1),s.value=i.list;else s.value=i.list;a.value=i.total?i.total:i.list.length,l.value=i.selectedList&&i.selectedList.length>0?i.selectedList:l.value,f.value=i.isSearch,o.value=i.isCustomItem,c.value=i.title}));const p=u,h=e.computed((()=>s.value.filter((e=>!e.isDisabled)))),m=e=>{d.value=e.target.value||e.detail.value,p("search",d.value)},g=e=>{if(e.isDisabled)return;let t=l.value;const n=t.indexOf(e);if(n>-1)return l.value.splice(n,1);i.isRadio&&(t=[]),t.push(e),l.value=t},v=()=>{l.value.length===h.value.length?l.value=[]:l.value=[...h.value]},I=()=>{p("submit",l.value),d.value=""},C=()=>{p("cancel"),d.value=""},b=()=>{p("getMore")};return(u,p)=>e.e({a:!e.unref(n.isPC)},e.unref(n.isPC)?{}:e.e({b:!i.isHiddenBackIcon},i.isHiddenBackIcon?{}:{c:e.p({file:e.unref(t.backIcon),width:"18px",height:"18px"}),d:e.o$1(C)},{e:e.t(e.unref(c))}),{f:e.unref(n.isPC)&&e.unref(f)},e.unref(n.isPC)&&e.unref(f)?{g:e.unref(d),h:e.unref(e.Wt).t("component.请输入userID"),i:e.n(e.unref(n.isUniFrameWork)?"left-uniapp-input":""),j:e.o$1(m)}:{},{k:!e.unref(n.isPC)&&e.unref(f)},!e.unref(n.isPC)&&e.unref(f)?{l:e.unref(e.Wt).t("component.请输入userID"),m:e.unref(d),n:e.n(e.unref(n.isUniFrameWork)?"left-uniapp-input":""),o:e.o$1(m),p:e.o$1(m)}:{},{q:e.unref(h).length>1&&!r.isRadio},e.unref(h).length>1&&!r.isRadio?e.e({r:e.unref(l).length===e.unref(h).length},e.unref(l).length===e.unref(h).length?{s:e.p({file:e.unref(t.selectedIcon),width:"18px",height:"18px"})}:{},{t:e.t(e.unref(e.Wt).t("component.全选")),v:e.o$1(v)}):{},{w:e.f(e.unref(s),((n,r,u)=>e.e({a:e.unref(l).indexOf(n)>-1},e.unref(l).indexOf(n)>-1?{b:e.n(n.isDisabled&&"disabled"),c:"878ae1c8-2-"+u,d:e.p({file:e.unref(t.selectedIcon),width:"18px",height:"18px"})}:{e:e.n(n.isDisabled&&"disabled")},e.unref(o)?{j:"left-"+u,k:e.r("left",{data:n},u)}:e.e({f:n.avatar||"https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",g:e.t(n.nick||n.userID),h:n.isDisabled},n.isDisabled?{i:e.t(e.unref(e.Wt).t("component.已在群中"))}:{}),{l:n.userID,m:e.o$1((e=>g(n)),n.userID)}))),x:!e.unref(o),y:e.unref(a)>e.unref(s).length},e.unref(a)>e.unref(s).length?{z:e.t(e.unref(e.Wt).t("component.查看更多")),A:e.o$1(b)}:{},{B:e.unref(n.isPC)},e.unref(n.isPC)?{C:e.t(e.unref(c))}:{},{D:r.resultShow},r.resultShow?e.e({E:e.unref(l).length>0&&e.unref(n.isPC)},e.unref(l).length>0&&e.unref(n.isPC)?{F:e.t(e.unref(e.Wt).t("component.已选中")),G:e.t(e.unref(l).length),H:e.t(e.unref(e.Wt).t("component.人"))}:{},{I:e.f(e.unref(l),((r,u,i)=>e.e(e.unref(o)?{d:"right-"+i,e:e.r("right",{data:r},i)}:e.e({a:r.avatar||"https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png",b:e.unref(n.isPC)},e.unref(n.isPC)?{c:e.t(r.nick||r.userID)}:{}),e.unref(n.isPC)?{f:"878ae1c8-3-"+i,g:e.p({file:e.unref(t.cancelIcon),width:"18px",height:"18px"}),h:e.o$1((e=>g(r)),u)}:{},{i:u}))),J:!e.unref(o),K:e.unref(n.isPC)}):{},{L:e.t(e.unref(e.Wt).t("component.取消")),M:e.o$1(C),N:e.unref(l).length>0},e.unref(l).length>0?{O:e.t(e.unref(e.Wt).t("component.完成")),P:e.o$1(I)}:{Q:e.t(e.unref(e.Wt).t("component.完成")),R:e.o$1(I)},{S:e.n(e.unref(n.isPC)?"":"transfer-h5"),T:e.n(e.unref(n.isWeChat)?"transfer-h5-wechat":"")})}}),i=e._export_sfc(u,[["__scopeId","data-v-878ae1c8"]]);wx.createComponent(i);
