import{v as I,r as $,X as N,$ as k,y as D,z as o,A as t,B as g,E as s,H as l,aN as L,D as i,F as r,P as F,Q as p,C as j,O as B}from"./en-BGJTCDgq.js";import{e as S,f as b,w as E,C as V}from"./main-oA9njtMa.js";const z=["onClick"],A=["onClick"],M=I({__name:"message-forward-dialog",emits:["select","confirm"],setup(J,{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,A))),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",H="_messageForwardDialogBody_18j0f_13",O="_messageForwardDialogSubtitle_18j0f_20",P="_messageForwardDialogItem_18j0f_27",Q="_messageForwardDialogItemName_18j0f_40",T="_messageForwardDialogEmpty_18j0f_53",U={messageForwardDialog:X,search:q,messageForwardDialogBody:H,messageForwardDialogSubtitle:O,messageForwardDialogItem:P,messageForwardDialogItemName:Q,messageForwardDialogEmpty:T},G={$style:U},W=B(M,[["__cssModules",G]]);export{W as default};
