import{c as I,i as $,A as N,H as k,e as F,f as o,g as t,h as g,n as s,l as r,as as j,j as i,t as l,F as D,y as p,C as L,_ as S}from"./en-BH2p-VLM.js";import{n as b,o as B,Q as E,C as V}from"./main-BHmLaavD.js";const z=["onClick"],A=["onClick"],M=I({__name:"message-forward-dialog",emits:["select","confirm"],setup(P,{emit:f}){const{$tr:d}=$(N),c=f,{contactList:h}=b(),{namedChatList:_,currentChatId:C}=B(),m=k(""),y=F(()=>h.filter(e=>e.displayName.toLowerCase().includes(m.value.toLowerCase())&&!E.includes(e.id))),u=F(()=>_().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(j),{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(D,{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(L,{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(D,{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))}}),G="_messageForwardDialog_18j0f_1",H="_search_18j0f_9",K="_messageForwardDialogBody_18j0f_13",Q="_messageForwardDialogSubtitle_18j0f_20",T="_messageForwardDialogItem_18j0f_27",U="_messageForwardDialogItemName_18j0f_40",q="_messageForwardDialogEmpty_18j0f_53",J={messageForwardDialog:G,search:H,messageForwardDialogBody:K,messageForwardDialogSubtitle:Q,messageForwardDialogItem:T,messageForwardDialogItemName:U,messageForwardDialogEmpty:q},O={$style:J},X=S(M,[["__cssModules",O]]);export{X as default};
