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