import{t as I,q as $,A as N,Z as k,y as D,z as o,B as t,C as g,F as s,I as r,aN as L,E as i,G as l,P as F,R as p,D as j,O as B}from"./en-DoRaEZbE.js";import{e as S,f as b,w as E,C as V}from"./main-hqm5HLPr.js";const z=["onClick"],A=["onClick"],G=I({__name:"message-forward-dialog",emits:["select","confirm"],setup(H,{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(r(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)},l(r(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)},l(a.displayName),3)],10,z))),128)):(o(),t("div",{key:1,class:s(e.$style.messageForwardDialogEmpty)},l(r(d)("chat.message.forward.dialog.chats.empty")),3)),i("h4",{class:s(e.$style.messageForwardDialogSubtitle)},l(r(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)},l(a.displayName),3)],10,A))),128)):(o(),t("div",{key:3,class:s(e.$style.messageForwardDialogEmpty)},l(r(d)("chat.message.forward.dialog.contacts.empty")),3))],2)],2))}}),M="_messageForwardDialog_18j0f_1",q="_search_18j0f_9",K="_messageForwardDialogBody_18j0f_13",O="_messageForwardDialogSubtitle_18j0f_20",P="_messageForwardDialogItem_18j0f_27",R="_messageForwardDialogItemName_18j0f_40",T="_messageForwardDialogEmpty_18j0f_53",U={messageForwardDialog:M,search:q,messageForwardDialogBody:K,messageForwardDialogSubtitle:O,messageForwardDialogItem:P,messageForwardDialogItemName:R,messageForwardDialogEmpty:T},Z={$style:U},W=B(G,[["__cssModules",Z]]);export{W as default};
