1import{_ as B,a as M}from"./OWWYgf2Y.js";import{Q as z,e as D,c as a,b as i,a as e,k as n,F as _,r as p,g as V,o as s,N as l,w as c,j as f,Y as j,t as r,d as I,i as L,de as P}from"./Cny-jMUR.js";import{_ as F}from"./CIcK5AWm.js";import{_ as S}from"./CSHkLFmR.js";import{u as A}from"./CnWiBKLW.js";import{u as E}from"./Dkp9_4T-.js";import"./CByX21Df.js";import"./BGx-vc2c.js";import"./CXDzCsr7.js";import"./COjSgi5K.js";import"./BRdsWsvc.js";import"./B5rxJs06.js";import"./n8lNb2hy.js";import"./Bm98wYY5.js";import"./CRt-pR_f.js";import"./DRbcCXkf.js";import"./DmDz5m4l.js";import"./B7NayylV.js";import"./BcOQZI7O.js";import"./CUxeBhNB.js";import"./B-5qM8bm.js";import"./Cjn-UK2L.js";import"./YF0e3wke.js";import"./Bhcf4Zif.js";import"./CU6Mnxa5.js";import"./C9RKA-P2.js";const H={class:"min-h-screen bg-gray-50 dark:bg-gray-900"},Q={class:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-2 md:py-8 flex flex-col md:flex-row gap-4"},T={class:"md:min-w-1/4"},Y={class:"w-full"},q={key:0,class:"text-center text-sm text-gray-600 h-screen"},G={key:1},J={class:"flex flex-row items-center gap-4 justify-between"},K={class:"flex flex-row items-center gap-4"},O={class:"flex items-center gap-3"},R={class:"flex -space-x-2"},W=["title"],X={class:"flex flex-col"},Z={class:"font-medium text-neutral-950"},ee={class:"text-xs text-gray-500 truncate max-w-[220px]"},te={class:"flex items-center gap-2"},Ve=z({__name:"index",setup(se){const{profile:u,fetchProfile:g}=A(),{canMessage:x,checkCanMessage:h,conversations:y,fetchInboxConversations:v}=E(),m=V(!1);return D(async()=>{m.value=!0;try{await Promise.all([g(),h(),v()])}finally{m.value=!1}}),(oe,d)=>{const k=B,b=M,w=j,$=F,U=L,C=S,N=P;return s(),a("div",H,[i(k,{profile:n(u)},null,8,["profile"]),e("div",Q,[e("div",T,[i(b)]),e("div",Y,[n(x)?(s(),a("div",G,[d[0]||(d[0]=e("h2",{class:"text-2xl font-bold mb-4"},"Inbox",-1)),(s(!0),a(_,null,p(n(y),t=>(s(),l(N,{key:t.id,to:`/dashboard/messages/conversations/${t.id}`,class:"flex items-center gap-3 p-2 rounded hover:bg-gray-50"},{default:c(()=>[i(C,{class:"w-full"},{default:c(()=>[e("div",J,[e("div",K,[e("div",O,[e("div",R,[(s(!0),a(_,null,p(t.participants.slice(0,4),(o,ie)=>(s(),l(w,{key:o.id,src:o.avatar_url||void 0,alt:o.full_name||"User",size:"sm",class:"ring-2 ring-white dark:ring-gray-900",title:o.full_name||"User"},null,8,["src","alt","title"]))),128)),t.participants.length>4?(s(),a("div",{key:0,class:"size-8 flex items-center justify-center rounded-full bg-gray-200 text-xs font-medium ring-2 ring-white dark:ring-gray-900",title:`${t.participants.length-4} more`}," +"+r(t.participants.length-4),9,W)):f("",!0)]),e("div",X,[e("div",Z,r(t.title||"Untitled"),1),e("div",ee,r(t.last_message||"No messages yet"),1)])])]),e("div",te,[t.unread_count?(s(),l($,{key:0,color:"error",variant:"solid",size:"xs"},{default:c(()=>[I(r(t.unread_count),1)]),_:2},1024)):f("",!0),i(U,{name:"i-lucide-chevron-right",class:"size-7"})])])]),_:2},1024)]),_:2},1032,["to"]))),128))])):(s(),a("div",q," Messaging is available for logged in users only "))])])])}}});export{Ve as default};
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.