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