import{d as I,i as L,j as N,r as b,u as x,m as B,b as h,H as S,o as s,e as t,s as n,q as i,X as $,p as d,t as o,v as f,I as p,C as j,J as z,_ as D}from"./index-ieCg8-dy.js";const F={class:"message-forward-dialog"},V={class:"message-forward-dialog__body"},X={class:"message-forward-dialog__section-title"},q=["onClick"],A={class:"message-forward-dialog__item-name"},E={key:1,class:"message-forward-dialog__empty"},H={class:"message-forward-dialog__section-title"},J=["onClick"],T={class:"message-forward-dialog__item-name"},U={key:3,class:"message-forward-dialog__empty"},G=I({__name:"message-forward-dialog",emits:["select","confirm"],setup(K,{emit:v}){const{$tr:l}=L(N),m=v,r=b(""),{contactList:y}=x(),{namedChatList:w,currentChatId:C}=B(),_=h(()=>y.filter(a=>a.displayName.toLowerCase().includes(r.value.toLowerCase())&&!S.includes(a.id))),g=h(()=>w().filter(a=>a.displayName.toLowerCase().includes(r.value.toLowerCase())&&a.chatId!==C)),u=({type:a,data:c})=>{m("select",{type:a,data:c}),m("confirm")};return(a,c)=>(s(),t("div",F,[n(i($),{value:r.value,"onUpdate:value":c[0]||(c[0]=e=>r.value=e),icon:"search",clearable:""},null,8,["value"]),d("div",V,[d("h4",X,o(i(l)("chat.message.forward.dialog.chats.section.title")),1),g.value.length?(s(!0),t(f,{key:0},p(g.value,e=>(s(),t("div",{key:e.chatId,class:"message-forward-dialog__item",onClick:k=>u({type:"chat",data:e.chatId})},[n(j,{name:e.displayName,shape:e.members.length>2?"decagon":"circle",size:28},null,8,["name","shape"]),d("div",A,o(e.displayName),1)],8,q))),128)):(s(),t("div",E,o(i(l)("chat.message.forward.dialog.chats.empty")),1)),d("h4",H,o(i(l)("chat.message.forward.dialog.contacts.section.title")),1),_.value.length?(s(!0),t(f,{key:2},p(_.value,e=>(s(),t("div",{key:e.id,class:"message-forward-dialog__item",onClick:k=>u({type:"contact",data:e.mail})},[n(z,{name:e.displayName,size:28,readonly:!0},null,8,["name"]),d("div",T,o(e.displayName),1)],8,J))),128)):(s(),t("div",U,o(i(l)("chat.message.forward.dialog.contacts.empty")),1))])]))}}),O=D(G,[["__scopeId","data-v-2440cd8e"]]);export{O as default};
