1import{Y as n,t as o,j as s,h as x,L as h,k as m,C as l,l as g,m as p,n as y,a7 as r,d}from"./index-DCifuJ2A.js";function M(){const{t}=n(),{data:e,isLoading:i}=o.chat.getMyChats.useQuery(),c=a=>a?new Date(a).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):t("myChats.never");return s.jsxs("div",{"data-loc":"client/src/pages/MyChats.tsx:24",className:"min-h-screen bg-background flex flex-col",children:[s.jsx(x,{"data-loc":"client/src/pages/MyChats.tsx:25"}),s.jsx("main",{"data-loc":"client/src/pages/MyChats.tsx:27",className:"flex-1",children:s.jsxs("div",{"data-loc":"client/src/pages/MyChats.tsx:28",className:"container py-8",children:[s.jsxs("div",{"data-loc":"client/src/pages/MyChats.tsx:29",className:"mb-8",children:[s.jsx("h1",{"data-loc":"client/src/pages/MyChats.tsx:30",className:"text-4xl font-bold mb-2",children:t("myChats.title")}),s.jsx("p",{"data-loc":"client/src/pages/MyChats.tsx:31",className:"text-muted-foreground",children:"Cards you've participated in discussions"})]}),i?s.jsx("div",{"data-loc":"client/src/pages/MyChats.tsx:37",className:"flex items-center justify-center py-12",children:s.jsx(h,{"data-loc":"client/src/pages/MyChats.tsx:38",className:"h-8 w-8 animate-spin text-primary"})}):e&&e.length>0?s.jsx("div",{"data-loc":"client/src/pages/MyChats.tsx:41",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(a=>s.jsx(m,{"data-loc":"client/src/pages/MyChats.tsx:43",href:`/card/${a.cardId}`,children:s.jsxs(l,{"data-loc":"client/src/pages/MyChats.tsx:44",className:"hover:border-primary/50 transition-colors cursor-pointer h-full",children:[s.jsx(g,{"data-loc":"client/src/pages/MyChats.tsx:45",className:"pb-4",children:s.jsxs("div",{"data-loc":"client/src/pages/MyChats.tsx:46",className:"flex gap-4",children:[a.card?.imageUrl&&s.jsx("div",{"data-loc":"client/src/pages/MyChats.tsx:49",className:"flex-shrink-0",children:s.jsx("img",{"data-loc":"client/src/pages/MyChats.tsx:50",src:a.card.imageUrl,alt:a.card?.cardName||t("myChats.unknownCard"),className:"w-20 h-28 object-cover rounded border border-border"})}),s.jsxs("div",{"data-loc":"client/src/pages/MyChats.tsx:59",className:"flex-1 min-w-0",children:[s.jsx(p,{"data-loc":"client/src/pages/MyChats.tsx:60",className:"text-lg mb-1 line-clamp-2",children:a.card?.cardName||t("myChats.unknownCard")}),s.jsxs(y,{"data-loc":"client/src/pages/MyChats.tsx:63",className:"flex items-center gap-2",children:[s.jsx(r,{"data-loc":"client/src/pages/MyChats.tsx:64",className:"h-4 w-4"}),s.jsxs("span",{"data-loc":"client/src/pages/MyChats.tsx:65",className:"text-xs",children:[t("myChats.lastMessage")," ",c(a.lastMessage?.createdAt||null)]})]})]})]})}),s.jsx(d,{"data-loc":"client/src/pages/MyChats.tsx:73",children:s.jsx("div",{"data-loc":"client/src/pages/MyChats.tsx:74",className:"text-sm text-muted-foreground",children:a.lastReadAt?s.jsxs("span",{"data-loc":"client/src/pages/MyChats.tsx:76",children:["Last read: ",c(a.lastReadAt)]}):s.jsx("span",{"data-loc":"client/src/pages/MyChats.tsx:78",children:"Not read yet"})})})]})},a.cardId))}):s.jsx(l,{"data-loc":"client/src/pages/MyChats.tsx:87",children:s.jsx(d,{"data-loc":"client/src/pages/MyChats.tsx:88",className:"py-12",children:s.jsxs("div",{"data-loc":"client/src/pages/MyChats.tsx:89",className:"text-center text-muted-foreground",children:[s.jsx(r,{"data-loc":"client/src/pages/MyChats.tsx:90",className:"h-16 w-16 mx-auto mb-4 opacity-50"}),s.jsx("p",{"data-loc":"client/src/pages/MyChats.tsx:91",className:"text-lg mb-2",children:"No chat history yet"}),s.jsx("p",{"data-loc":"client/src/pages/MyChats.tsx:92",className:"text-sm",children:"Start chatting on card pages to see your conversations here"})]})})})]})})]})}export{M 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.