1import{a$ as R,b1 as T,bj as B,b0 as j,b2 as w,bf as $,bs as S,bk as z,aW as l,b5 as m,b6 as o,aY as n,aX as g,b9 as a,bb as E,b7 as y,bc as V,bd as G,bv as H,b8 as U,bn as Y,ba as D,d0 as F}from"./D6to6l-M.js";import{_ as K}from"./C0dlyU9B.js";import{_ as O}from"./DXbhFWnF.js";import{_ as W}from"./DUY1MMBq.js";import{u as X}from"./DUJWTUww.js";import{_ as q}from"./BW7QayG7.js";import{_ as J}from"./rDTo_0OM.js";import{_ as Q}from"./yQBMs3L8.js";import"./DsYuXTlo.js";import"./DCL6VHf2.js";import"./BBH5v2_Z.js";import"./D2v6QQPM.js";import"./YwkbYkMN.js";import"./CqaP2xId.js";import"./Bm_uIFUF.js";import"./GfRcb8dp.js";import"./BqzoA1zH.js";import"./CwWuGfmZ.js";import"./mWw2OjVS.js";import"./DQAq9Iem.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},f=new i.Error().stack;f&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[f]="e942a73e-9229-47c9-9bd4-1984e8fef46e",i._sentryDebugIdIdentifier="sentry-dbid-e942a73e-9229-47c9-9bd4-1984e8fef46e")}catch{}})();const Z={class:"flex flex-col h-screen relative"},ee={class:"absolute bottom-3 right-3"},te={class:"text-lg text-neutral-80 flex flex-row justify-between items-center p-3"},se={class:"px-2 flex-1 space-y-1 overflow-y-auto pb-10"},ae={class:"mb-4 flex justify-end"},oe={key:0,class:"text-neutral-60 text-center pt-[20vh]"},ne=["onClick"],ie={class:"flex-1 flex flex-col min-w-0"},re=["innerHTML"],le={key:0},me={key:1,class:"h-1 w-1 rounded-full bg-danger-default"},Me=R({__name:"conversationList",emits:["close"],setup(i,{emit:f}){const r=T(),x=X(),v=B(),I=f,{$dayjs:L,$segment:b}=j(),d=w(!1),u=w(!1),C=$(()=>r.state.community.membership.profile_displayed),k=$(()=>S.orderBy(r.getters["community/chat/getConversations"].map(t=>{var s,_,c,p,h;let e="...";return(s=t.last_message)!=null&&s.content?e=(_=t.last_message)==null?void 0:_.content.replace(/<[^>]*>/g,""):(c=t.last_message)!=null&&c.attachments&&t.last_message.attachments.length>0&&(e=`${(h=(p=t.last_message)==null?void 0:p.author)==null?void 0:h.given_name} a envoyé ${t.last_message.attachments.length} contenu${t.last_message.attachments.length>1?"s":""}`),{...t,lastMessagePreview:e}}),t=>{var e;return(e=t.last_message)!=null&&e.created_at?L(t.last_message.created_at).valueOf():0},"desc")),M=t=>{t&&(r.dispatch("community/chat/loadConversation",t),x.pushPage({type:"conversation"}))},N=()=>{x.pushPage({type:"archives"}),b.track("Clicked Archived Conversations",{tracking_version:"1.0",path:v.path})},A=()=>{r.getters["community/membership/partyConversationLimitReached"]?u.value=!0:(r.commit("community/chat/setActiveConversation"),d.value=!0),b.track("Clicked Button New group",{version:1,path:v.path})},P=()=>I("close");return z(()=>{b.page("Viewed Chat Page",{tracking_version:"1.0",path:v.path})}),(t,e)=>(l(),m("div",Z,[o("div",ee,[n(a(q),{disabled:a(C)},{content:g(()=>e[4]||(e[4]=[o("span",null," Afficher votre profil sur la communauté pour créer un groupe. ",-1)])),default:g(()=>[n(a(E),{icon:"user-group",disabled:!a(C),onClick:A},{default:g(()=>e[5]||(e[5]=[y(" Nouveau groupe ")])),_:1},8,["disabled"])]),_:1},8,["disabled"])]),o("div",te,[e[6]||(e[6]=y(" Messages ")),n(a(J),{name:"cross",onClick:P})]),o("div",se,[o("div",ae,[n(a(Q),{icon:"archive",size:"small",onClick:N},{default:g(()=>e[7]||(e[7]=[y(" Conversations archivées ")])),_:1})]),a(k).length==0?(l(),m("div",oe," Vous n'avez pas de conversation active. ")):V("",!0),(l(!0),m(G,null,H(a(k),(s,_)=>{var c,p;return l(),m("div",{key:_,class:"flex flex-row gap-1.5 items-center hover:bg-neutral-l transition px-1 py-0.5 rounded-lg cursor-pointer",onClick:h=>M(s.id)},[n(W,{conversation:s,size:5},null,8,["conversation"]),o("div",ie,[o("span",null,U(s.name),1),o("span",{class:"text-sm text-neutral-60 overflow-hidden text-ellipsis text-nowrap",innerHTML:s.lastMessagePreview},null,8,re)]),((c=s.user_membership)==null?void 0:c.status)==="pending"?(l(),m("div",le,[n(a(Y),{name:"chat-alt",color:"info"})])):(p=s.user_membership)!=null&&p.unread?(l(),m("div",me)):V("",!0)],8,ne)}),128))]),n(K,{modelValue:a(d),"onUpdate:modelValue":e[0]||(e[0]=s=>D(d)?d.value=s:null),onClose:e[1]||(e[1]=s=>d.value=!1)},null,8,["modelValue"]),n(O,{modelValue:a(u),"onUpdate:modelValue":e[2]||(e[2]=s=>D(u)?u.value=s:null),kind:a(F).PARTY,onClose:e[3]||(e[3]=s=>u.value=!1)},null,8,["modelValue","kind"])]))}});
1export{Me as default}; 2//# sourceMappingURL=DZIejvRj.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.