import{r as I,i as $,X as N,$ as k,t as D,v as o,x as t,y as g,A as s,E as l,aN as L,z as i,B as r,M as F,N as p,C as j,L as B}from"./en-D2AdNj2c.js";import{e as S,f as b,t as E,C as V}from"./main-cVfPDKwP.js";const z=["onClick"],M=["onClick"],A=I({__name:"message-forward-dialog",emits:["select","confirm"],setup(P,{emit:f}){const{$tr:d}=$(N),c=f,{contactList:h}=S(),{namedChatList:_,currentChatId:C}=b(),m=k(""),y=D(()=>h.filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&!E.includes(e.id))),u=D(()=>_.filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&e.chatId!==C));function w({type:e,data:n}){c("select",{type:e,data:n}),c("confirm")}return(e,n)=>(o(),t("div",{class:s(e.$style.messageForwardDialog)},[g(l(L),{modelValue:m.value,"onUpdate:modelValue":n[0]||(n[0]=a=>m.value=a),icon:"round-search",clearable:"",class:s(e.$style.search)},null,8,["modelValue","class"]),i("div",{class:s(e.$style.messageForwardDialogBody)},[i("h4",{class:s(e.$style.messageForwardDialogSubtitle)},r(l(d)("chat.message.forward.dialog.chats.section.title")),3),u.value.length?(o(!0),t(F,{key:0},p(u.value,a=>(o(),t("div",{key:a.chatId,class:s(e.$style.messageForwardDialogItem),onClick:v=>w({type:"chat",data:a.chatId})},[g(j,{name:a.displayName,shape:a.members.length>2?"decagon":"circle",size:28},null,8,["name","shape"]),i("div",{class:s(e.$style.messageForwardDialogItemName)},r(a.displayName),3)],10,z))),128)):(o(),t("div",{key:1,class:s(e.$style.messageForwardDialogEmpty)},r(l(d)("chat.message.forward.dialog.chats.empty")),3)),i("h4",{class:s(e.$style.messageForwardDialogSubtitle)},r(l(d)("chat.message.forward.dialog.contacts.section.title")),3),y.value.length?(o(!0),t(F,{key:2},p(y.value,a=>(o(),t("div",{key:a.id,class:s(e.$style.messageForwardDialogItem),onClick:v=>w({type:"contact",data:a.mail})},[g(V,{name:a.displayName,size:28,readonly:!0},null,8,["name"]),i("div",{class:s(e.$style.messageForwardDialogItemName)},r(a.displayName),3)],10,M))),128)):(o(),t("div",{key:3,class:s(e.$style.messageForwardDialogEmpty)},r(l(d)("chat.message.forward.dialog.contacts.empty")),3))],2)],2))}}),X="_messageForwardDialog_18j0f_1",q="_search_18j0f_9",T="_messageForwardDialogBody_18j0f_13",U="_messageForwardDialogSubtitle_18j0f_20",G="_messageForwardDialogItem_18j0f_27",H="_messageForwardDialogItemName_18j0f_40",J="_messageForwardDialogEmpty_18j0f_53",K={messageForwardDialog:X,search:q,messageForwardDialogBody:T,messageForwardDialogSubtitle:U,messageForwardDialogItem:G,messageForwardDialogItemName:H,messageForwardDialogEmpty:J},O={$style:K},W=B(A,[["__cssModules",O]]);export{W as default};
