@burdenoff/microfe-conversations 2026.626.1 → 2026.716.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,57 +6,59 @@ import { useConversationActions as i, useGetConversation as ee } from "../hooks/
6
6
  import { useEditMessage as te, useGetMessages as ne, useMessageActions as re, useSendMessage as ie } from "../hooks/useMessageQueries.js";
7
7
  import { useMessageStreamForConversation as ae } from "../hooks/useMessageSubscriptions.js";
8
8
  import { PermissionGuard as a } from "../components/PermissionGuard.js";
9
+ import { QuotaExhaustedDialog as oe } from "../components/QuotaExhaustedDialog.js";
9
10
  import { CONVERSATIONS_PERMISSIONS as o } from "../constants/permissions.js";
10
- import { nativeImpact as oe, nativeNotify as s } from "../../utils/nativeBridge.js";
11
+ import { nativeImpact as se, nativeNotify as s } from "../../utils/nativeBridge.js";
11
12
  import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
12
- import { Archive as se, ArrowLeft as ce, Bell as le, BellOff as ue, ExternalLink as de, Hash as fe, Loader2 as pe, LogOut as me, MoreVertical as he, Pin as p, PinOff as ge, SendHorizontal as m, Users as _e, X as ve } from "lucide-react";
13
- import { useNavigate as ye, useParams as be } from "react-router-dom";
14
- import { useEventBus as xe } from "@burdenoff/fe-libs/shared/events";
13
+ import { Archive as ce, ArrowLeft as le, Bell as ue, BellOff as de, ExternalLink as fe, Hash as pe, Loader2 as me, LogOut as he, MoreVertical as ge, Pin as p, PinOff as _e, SendHorizontal as m, Users as ve, X as ye } from "lucide-react";
14
+ import { useNavigate as be, useParams as xe } from "react-router-dom";
15
+ import { isQuotaExhaustedError as Se } from "@burdenoff/fe-libs/shared/utils";
16
+ import { useEventBus as Ce } from "@burdenoff/fe-libs/shared/events";
15
17
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
16
- import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
- import { Button as Ce, IllustratedEmptyState as we, NextSteps as Te } from "@burdenoff/fe-libs/ui";
18
+ import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { Button as Te, IllustratedEmptyState as Ee, NextSteps as De } from "@burdenoff/fe-libs/ui";
18
20
  //#region src/conversations/pages/ConversationDetailPage.tsx
19
- var _ = 100, Ee = 3e4;
21
+ var _ = 100, Oe = 3e4;
20
22
  function v() {
21
- let { conversationId: a } = be(), o = ye(), { basePath: v, currentUser: De } = e(), x = xe(), { t: Oe } = Se(), S = c((e, t) => {
22
- let n = Oe(e);
23
+ let { conversationId: a } = xe(), o = be(), { basePath: v, currentUser: ke } = e(), x = Ce(), { t: Ae } = we(), S = c((e, t) => {
24
+ let n = Ae(e);
23
25
  return n === e ? t : n;
24
- }, [Oe]), { clearMessageDraft: C, isParticipantsPanelOpen: w, messageDrafts: ke, setMessageDraft: Ae, toggleParticipantsPanel: T } = n(), [E, je] = f(ke[a ?? ""] ?? ""), [D, O] = f([]), Me = d(null), k = d(null), A = c(() => {
25
- k.current?.focus(), k.current?.scrollIntoView({ behavior: "smooth" });
26
- }, []), { conversation: j, members: M, membersTotalCount: Ne, loading: Pe, error: N } = ee(a ?? ""), { messages: P, loading: Fe, error: Ie, refetch: Le } = ne(a ?? "", {
26
+ }, [Ae]), { clearMessageDraft: C, isParticipantsPanelOpen: w, messageDrafts: je, setMessageDraft: Me, toggleParticipantsPanel: T } = n(), [E, Ne] = f(je[a ?? ""] ?? ""), [Pe, D] = f(!1), [O, k] = f([]), Fe = d(null), A = d(null), j = c(() => {
27
+ A.current?.focus(), A.current?.scrollIntoView({ behavior: "smooth" });
28
+ }, []), { conversation: M, members: N, membersTotalCount: Ie, loading: Le, error: P } = ee(a ?? ""), { messages: F, loading: Re, error: ze, refetch: Be } = ne(a ?? "", {
27
29
  first: _,
28
- pollInterval: Ee
30
+ pollInterval: Oe
29
31
  });
30
32
  ae(a, _);
31
- let { sendMessage: Re, loading: F } = ie(), { editMessage: ze, loading: I } = te(), { deleteMessage: Be, addReaction: Ve, removeReaction: He, pinMessage: Ue, unpinMessage: We } = re(), { archiveConversation: Ge, pinConversation: Ke, unpinConversation: qe, muteConversation: Je, unmuteConversation: Ye, leaveConversation: Xe } = i(), [L, R] = f(!1), [z, B] = f(null), [V, H] = f(""), [U, W] = f(null), G = d(null), K = De?.id ?? "", q = j?.sourceContext, J = u(() => {
33
+ let { sendMessage: Ve, loading: I } = ie(), { editMessage: He, loading: L } = te(), { deleteMessage: Ue, addReaction: We, removeReaction: Ge, pinMessage: Ke, unpinMessage: qe } = re(), { archiveConversation: Je, pinConversation: Ye, unpinConversation: Xe, muteConversation: Ze, unmuteConversation: Qe, leaveConversation: $e } = i(), [R, z] = f(!1), [B, V] = f(null), [H, U] = f(""), [W, G] = f(null), K = d(null), q = ke?.id ?? "", J = M?.sourceContext, Y = u(() => {
32
34
  let e = /* @__PURE__ */ new Map();
33
- for (let t of D) t.conversationId === a && e.set(t.id, t);
34
- for (let t of P) e.set(t.id, t);
35
+ for (let t of O) t.conversationId === a && e.set(t.id, t);
36
+ for (let t of F) e.set(t.id, t);
35
37
  return Array.from(e.values()).sort((e, t) => new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime());
36
38
  }, [
37
39
  a,
38
- D,
39
- P
40
+ O,
41
+ F
40
42
  ]);
41
43
  l(() => {
42
- Me.current?.scrollIntoView({ behavior: "smooth" });
43
- }, [J.length]), l(() => {
44
- O([]);
44
+ Fe.current?.scrollIntoView({ behavior: "smooth" });
45
+ }, [Y.length]), l(() => {
46
+ k([]);
45
47
  }, [a]), l(() => {
46
- if (D.length === 0 || P.length === 0) return;
47
- let e = new Set(P.map((e) => e.id));
48
- O((t) => {
48
+ if (O.length === 0 || F.length === 0) return;
49
+ let e = new Set(F.map((e) => e.id));
50
+ k((t) => {
49
51
  let n = t.filter((t) => !e.has(t.id));
50
52
  return n.length === t.length ? t : n;
51
53
  });
52
54
  }, [
53
- D.length,
54
- P,
55
- O
55
+ O.length,
56
+ F,
57
+ k
56
58
  ]), l(() => {
57
59
  if (a) {
58
60
  if (E.trim()) {
59
- Ae(a, E);
61
+ Me(a, E);
60
62
  return;
61
63
  }
62
64
  C(a);
@@ -64,132 +66,141 @@ function v() {
64
66
  }, [
65
67
  E,
66
68
  a,
67
- Ae,
69
+ Me,
68
70
  C
69
71
  ]);
70
- let Y = u(() => {
72
+ let X = u(() => {
71
73
  let e = /* @__PURE__ */ new Map();
72
- for (let t of J) !t.authorId || e.has(t.authorId) || t.sender.name && e.set(t.authorId, t.sender.name);
74
+ for (let t of Y) !t.authorId || e.has(t.authorId) || t.sender.name && e.set(t.authorId, t.sender.name);
73
75
  return e;
74
- }, [J]), X = u(() => M.length > 0 ? M.filter((e) => e.status === "ACTIVE" && !e.leftAt).map((e) => ({
76
+ }, [Y]), Z = u(() => N.length > 0 ? N.filter((e) => e.status === "ACTIVE" && !e.leftAt).map((e) => ({
75
77
  id: e.userId,
76
- name: Y.get(e.userId) || e.customTitle || S("conversations.member", "Member"),
78
+ name: X.get(e.userId) || e.customTitle || S("conversations.member", "Member"),
77
79
  role: e.role
78
- })) : Array.from(Y.entries()).map(([e, t]) => ({
80
+ })) : Array.from(X.entries()).map(([e, t]) => ({
79
81
  id: e,
80
82
  name: t,
81
83
  role: S("conversations.member", "Member")
82
84
  })), [
83
- M,
84
- Y,
85
+ N,
86
+ X,
85
87
  S
86
- ]), Ze = j?.memberCount ? Math.max(j.memberCount - X.length, 0) : 0, Z = c(async () => {
87
- if (!a || !E.trim() || F) return;
88
- let e = await Re({
89
- conversationId: a,
90
- content: E.trim(),
91
- type: "TEXT",
92
- parentMessageId: U?.id,
93
- refetchFirst: _
94
- });
95
- e && (O((t) => [...t, e]), x.emit("conversations.message.sent", {
88
+ ]), et = M?.memberCount ? Math.max(M.memberCount - Z.length, 0) : 0, Q = c(async () => {
89
+ if (!a || !E.trim() || I) return;
90
+ let e;
91
+ try {
92
+ e = await Ve({
93
+ conversationId: a,
94
+ content: E.trim(),
95
+ type: "TEXT",
96
+ parentMessageId: W?.id,
97
+ refetchFirst: _
98
+ });
99
+ } catch (e) {
100
+ if (Se(e)) {
101
+ D(!0);
102
+ return;
103
+ }
104
+ throw s("error"), e;
105
+ }
106
+ e && (k((t) => [...t, e]), x.emit("conversations.message.sent", {
96
107
  messageId: e.id,
97
108
  conversationId: a
98
- }), je(""), W(null), C(a));
109
+ }), Ne(""), G(null), C(a));
99
110
  }, [
100
111
  x,
101
112
  a,
102
113
  E,
103
- F,
104
- Re,
114
+ I,
115
+ Ve,
105
116
  C,
106
- U
107
- ]), Qe = c((e) => {
108
- e.key !== "Enter" || e.shiftKey || (e.preventDefault(), Z());
109
- }, [Z]);
117
+ W
118
+ ]), tt = c((e) => {
119
+ e.key !== "Enter" || e.shiftKey || (e.preventDefault(), Q());
120
+ }, [Q]);
110
121
  l(() => {
111
122
  a && x.emit("conversations.conversation.opened", { conversationId: a });
112
123
  }, [x, a]), l(() => {
113
- if (!L) return;
124
+ if (!R) return;
114
125
  let e = (e) => {
115
- G.current && !G.current.contains(e.target) && R(!1);
126
+ K.current && !K.current.contains(e.target) && z(!1);
116
127
  };
117
128
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
118
- }, [L]);
119
- let $e = c((e) => {
120
- W({
129
+ }, [R]);
130
+ let nt = c((e) => {
131
+ G({
121
132
  id: e.id,
122
133
  content: e.content,
123
134
  sender: e.sender.name
124
135
  });
125
- }, []), et = c(async (e, t) => {
136
+ }, []), rt = c(async (e, t) => {
126
137
  try {
127
- await Ve(e, t);
138
+ await We(e, t);
128
139
  } catch {
129
- await He(e, t).catch(() => {});
140
+ await Ge(e, t).catch(() => {});
130
141
  }
131
- }, [Ve, He]), tt = c((e) => {
132
- B(e.id), H(e.content);
133
- }, []), nt = c(async () => {
134
- !z || !V.trim() || I || (await ze(z, V.trim()), B(null), H(""));
142
+ }, [We, Ge]), it = c((e) => {
143
+ V(e.id), U(e.content);
144
+ }, []), at = c(async () => {
145
+ !B || !H.trim() || L || (await He(B, H.trim()), V(null), U(""));
135
146
  }, [
136
- z,
137
- V,
138
- I,
139
- ze
140
- ]), rt = c(() => {
141
- B(null), H("");
142
- }, []), it = c(async (e) => {
147
+ B,
148
+ H,
149
+ L,
150
+ He
151
+ ]), ot = c(() => {
152
+ V(null), U("");
153
+ }, []), st = c(async (e) => {
143
154
  if (window.confirm(S("conversations.confirmDeleteMessage", "Delete this message? This action cannot be undone."))) {
144
- oe("medium");
155
+ se("medium");
145
156
  try {
146
- await Be(e), Le(), s("success");
157
+ await Ue(e), Be(), s("success");
147
158
  } catch (e) {
148
159
  console.error("[microfe-conversations] message delete failed", e), s("error");
149
160
  }
150
161
  }
151
162
  }, [
163
+ Ue,
152
164
  Be,
153
- Le,
154
165
  S
155
- ]), at = c(async (e, t) => {
166
+ ]), ct = c(async (e, t) => {
156
167
  if (t) {
157
- await We(e);
168
+ await qe(e);
158
169
  return;
159
170
  }
160
- await Ue(e);
161
- }, [Ue, We]), Q = c(async () => {
162
- a && (j?.isPinned ? await qe(a) : await Ke(a), R(!1));
171
+ await Ke(e);
172
+ }, [Ke, qe]), lt = c(async () => {
173
+ a && (M?.isPinned ? await Xe(a) : await Ye(a), z(!1));
163
174
  }, [
164
175
  a,
165
- j?.isPinned,
166
- Ke,
167
- qe
168
- ]), ot = c(async () => {
169
- a && (j?.isMuted ? await Ye(a) : await Je(a), R(!1));
176
+ M?.isPinned,
177
+ Ye,
178
+ Xe
179
+ ]), ut = c(async () => {
180
+ a && (M?.isMuted ? await Qe(a) : await Ze(a), z(!1));
170
181
  }, [
171
182
  a,
172
- j?.isMuted,
173
- Je,
174
- Ye
175
- ]), st = c(async () => {
183
+ M?.isMuted,
184
+ Ze,
185
+ Qe
186
+ ]), dt = c(async () => {
176
187
  if (a) try {
177
- await Ge(a), x.emit("conversations.conversation.archived", { conversationId: a }), R(!1), o(v || "/conversations");
188
+ await Je(a), x.emit("conversations.conversation.archived", { conversationId: a }), z(!1), o(v || "/conversations");
178
189
  } catch (e) {
179
190
  console.error("[microfe-conversations] conversation archive failed", e), s("error");
180
191
  }
181
192
  }, [
182
- Ge,
193
+ Je,
183
194
  v,
184
195
  x,
185
196
  a,
186
197
  o
187
- ]), ct = c(async () => {
198
+ ]), ft = c(async () => {
188
199
  if (a && window.confirm(S("conversations.confirmLeaveConversation", "Leave this conversation? You will lose access unless someone adds you again."))) try {
189
- await Xe(a), K && x.emit("conversations.member.removed", {
200
+ await $e(a), q && x.emit("conversations.member.removed", {
190
201
  conversationId: a,
191
- userId: K
192
- }), R(!1), o(v || "/conversations");
202
+ userId: q
203
+ }), z(!1), o(v || "/conversations");
193
204
  } catch (e) {
194
205
  console.error("[microfe-conversations] conversation leave failed", e), s("error");
195
206
  }
@@ -197,22 +208,22 @@ function v() {
197
208
  v,
198
209
  x,
199
210
  a,
200
- K,
201
- Xe,
211
+ q,
212
+ $e,
202
213
  o,
203
214
  S
204
215
  ]), $ = c(() => {
205
- if (q?.contextHref) {
216
+ if (J?.contextHref) {
206
217
  try {
207
- let e = new URL(q.contextHref);
218
+ let e = new URL(J.contextHref);
208
219
  if (e.origin === window.location.origin) {
209
220
  o(`${e.pathname}${e.search}${e.hash}`);
210
221
  return;
211
222
  }
212
223
  } catch {}
213
- window.location.assign(q.contextHref);
224
+ window.location.assign(J.contextHref);
214
225
  }
215
- }, [o, q?.contextHref]), lt = u(() => {
226
+ }, [o, J?.contextHref]), pt = u(() => {
216
227
  let e = [{
217
228
  id: "send-message",
218
229
  label: S("conversations.nextSteps.send.label", "Send your first reply"),
@@ -221,62 +232,62 @@ function v() {
221
232
  size: 14,
222
233
  "aria-hidden": "true"
223
234
  }),
224
- onClick: A,
225
- done: J.length > 0
235
+ onClick: j,
236
+ done: Y.length > 0
226
237
  }];
227
- return j?.isGroup && e.push({
238
+ return M?.isGroup && e.push({
228
239
  id: "view-participants",
229
240
  label: S("conversations.nextSteps.participants.label", "Review participants"),
230
241
  description: S("conversations.nextSteps.participants.description", "See who can read and post in this conversation."),
231
- icon: /* @__PURE__ */ h(_e, {
242
+ icon: /* @__PURE__ */ h(ve, {
232
243
  size: 14,
233
244
  "aria-hidden": "true"
234
245
  }),
235
246
  onClick: () => {
236
247
  w || T();
237
248
  }
238
- }), q?.contextHref && e.push({
249
+ }), J?.contextHref && e.push({
239
250
  id: "open-context",
240
251
  label: S("conversations.nextSteps.context.label", "Open the related item"),
241
252
  description: S("conversations.nextSteps.context.description", "Jump to the page or record this conversation is about."),
242
- icon: /* @__PURE__ */ h(de, {
253
+ icon: /* @__PURE__ */ h(fe, {
243
254
  size: 14,
244
255
  "aria-hidden": "true"
245
256
  }),
246
257
  onClick: $
247
258
  }), e.push({
248
259
  id: "pin-conversation",
249
- label: j?.isPinned ? S("conversations.nextSteps.unpin.label", "Unpin this conversation") : S("conversations.nextSteps.pin.label", "Pin for quick access"),
260
+ label: M?.isPinned ? S("conversations.nextSteps.unpin.label", "Unpin this conversation") : S("conversations.nextSteps.pin.label", "Pin for quick access"),
250
261
  description: S("conversations.nextSteps.pin.description", "Keep important conversations at the top of your inbox."),
251
262
  icon: /* @__PURE__ */ h(p, {
252
263
  size: 14,
253
264
  "aria-hidden": "true"
254
265
  }),
255
- onClick: () => void Q(),
256
- done: j?.isPinned
266
+ onClick: () => void lt(),
267
+ done: M?.isPinned
257
268
  }), e;
258
269
  }, [
259
- j?.isGroup,
260
- j?.isPinned,
261
- J.length,
262
- A,
270
+ M?.isGroup,
271
+ M?.isPinned,
272
+ Y.length,
273
+ j,
263
274
  $,
264
- Q,
275
+ lt,
265
276
  w,
266
- q?.contextHref,
277
+ J?.contextHref,
267
278
  T,
268
279
  S
269
280
  ]);
270
- return !j && Pe ? /* @__PURE__ */ h("div", {
281
+ return !M && Le ? /* @__PURE__ */ h("div", {
271
282
  className: "flex items-center justify-center h-[calc(100vh-64px)] text-sm text-text-secondary",
272
283
  children: S("conversations.loading", "Loading conversation...")
273
- }) : !j || N ? /* @__PURE__ */ h("div", {
284
+ }) : !M || P ? /* @__PURE__ */ h("div", {
274
285
  className: "flex h-[calc(100vh-64px)] items-center justify-center p-8",
275
- children: /* @__PURE__ */ h(we, {
286
+ children: /* @__PURE__ */ h(Ee, {
276
287
  illustration: "empty-generic",
277
- title: N ? S("conversations.unavailableTitle", "Conversation unavailable") : S("conversations.notFound", "Conversation not found"),
278
- description: N ? S("conversations.unavailable", "We couldn't load this conversation. Please try again.") : S("conversations.notFoundDescription", "This conversation may have been deleted, archived, or you no longer have access to it."),
279
- action: /* @__PURE__ */ h(Ce, {
288
+ title: P ? S("conversations.unavailableTitle", "Conversation unavailable") : S("conversations.notFound", "Conversation not found"),
289
+ description: P ? S("conversations.unavailable", "We couldn't load this conversation. Please try again.") : S("conversations.notFoundDescription", "This conversation may have been deleted, archived, or you no longer have access to it."),
290
+ action: /* @__PURE__ */ h(Te, {
280
291
  type: "button",
281
292
  onClick: () => o(v || "/conversations"),
282
293
  children: S("conversations.back", "Back to conversations")
@@ -284,287 +295,299 @@ function v() {
284
295
  })
285
296
  }) : /* @__PURE__ */ g("div", {
286
297
  className: "relative flex h-[calc(100vh-64px)] bg-bg-surface",
287
- children: [/* @__PURE__ */ g("div", {
288
- className: "flex-1 flex flex-col min-w-0",
289
- children: [
290
- /* @__PURE__ */ g("header", {
291
- "data-tour": "conversation-detail-header",
292
- className: "flex items-center justify-between px-4 py-3 border-b border-border-seam bg-bg-surface/95 backdrop-blur-sm",
293
- children: [/* @__PURE__ */ g("div", {
294
- className: "flex items-center gap-3 min-w-0",
295
- children: [/* @__PURE__ */ h("button", {
296
- type: "button",
297
- onClick: () => o(v || "/conversations"),
298
- className: "flex min-h-10 min-w-10 items-center justify-center rounded-lg text-text-secondary transition-colors hover:bg-bg-sunken/50 hover:text-text-primary",
299
- children: /* @__PURE__ */ h(ce, { size: 18 })
300
- }), /* @__PURE__ */ g("div", {
301
- className: "min-w-0",
302
- children: [/* @__PURE__ */ g("div", {
303
- className: "flex items-center gap-1.5",
304
- children: [j.type === "CHANNEL" && /* @__PURE__ */ h(fe, {
305
- size: 14,
306
- className: "text-text-secondary flex-shrink-0"
307
- }), /* @__PURE__ */ h("h2", {
308
- className: "text-sm font-semibold text-text-primary truncate",
309
- children: j.title
298
+ children: [
299
+ /* @__PURE__ */ g("div", {
300
+ className: "flex-1 flex flex-col min-w-0",
301
+ children: [
302
+ /* @__PURE__ */ g("header", {
303
+ "data-tour": "conversation-detail-header",
304
+ className: "flex items-center justify-between px-4 py-3 border-b border-border-seam bg-bg-surface/95 backdrop-blur-sm",
305
+ children: [/* @__PURE__ */ g("div", {
306
+ className: "flex items-center gap-3 min-w-0",
307
+ children: [/* @__PURE__ */ h("button", {
308
+ type: "button",
309
+ onClick: () => o(v || "/conversations"),
310
+ className: "flex min-h-10 min-w-10 items-center justify-center rounded-lg text-text-secondary transition-colors hover:bg-bg-sunken/50 hover:text-text-primary",
311
+ children: /* @__PURE__ */ h(le, { size: 18 })
312
+ }), /* @__PURE__ */ g("div", {
313
+ className: "min-w-0",
314
+ children: [/* @__PURE__ */ g("div", {
315
+ className: "flex items-center gap-1.5",
316
+ children: [M.type === "CHANNEL" && /* @__PURE__ */ h(pe, {
317
+ size: 14,
318
+ className: "text-text-secondary flex-shrink-0"
319
+ }), /* @__PURE__ */ h("h2", {
320
+ className: "text-sm font-semibold text-text-primary truncate",
321
+ children: M.title
322
+ })]
323
+ }), /* @__PURE__ */ h("p", {
324
+ className: "text-xs text-text-secondary",
325
+ children: M.type === "DIRECT" ? S("conversations.directConversation", "Direct conversation") : M.type === "CHANNEL" ? `${S("conversations.channel", "Channel")} · ${M.memberCount} ${S("conversations.membersCountLabel", "members")}` : M.type === "ANNOUNCEMENT" ? `${S("conversations.announcement", "Announcement")} · ${M.memberCount} ${S("conversations.membersCountLabel", "members")}` : `${M.memberCount} ${S("conversations.membersCountLabel", "members")}`
310
326
  })]
311
- }), /* @__PURE__ */ h("p", {
312
- className: "text-xs text-text-secondary",
313
- children: j.type === "DIRECT" ? S("conversations.directConversation", "Direct conversation") : j.type === "CHANNEL" ? `${S("conversations.channel", "Channel")} · ${j.memberCount} ${S("conversations.membersCountLabel", "members")}` : j.type === "ANNOUNCEMENT" ? `${S("conversations.announcement", "Announcement")} · ${j.memberCount} ${S("conversations.membersCountLabel", "members")}` : `${j.memberCount} ${S("conversations.membersCountLabel", "members")}`
314
327
  })]
328
+ }), /* @__PURE__ */ g("div", {
329
+ className: "flex shrink-0 items-center gap-1",
330
+ children: [
331
+ J?.contextHref && /* @__PURE__ */ h(b, {
332
+ dataTour: "conversation-open-context",
333
+ icon: /* @__PURE__ */ h(fe, { size: 16 }),
334
+ label: S("conversations.openContext", "Open context"),
335
+ onClick: $
336
+ }),
337
+ M.isGroup && /* @__PURE__ */ h(b, {
338
+ dataTour: "conversation-participants-button",
339
+ icon: /* @__PURE__ */ h(ve, { size: 16 }),
340
+ label: S("conversations.participants", "Participants"),
341
+ active: w,
342
+ onClick: T
343
+ }),
344
+ /* @__PURE__ */ g("div", {
345
+ className: "relative",
346
+ ref: K,
347
+ children: [/* @__PURE__ */ h(b, {
348
+ icon: /* @__PURE__ */ h(ge, { size: 16 }),
349
+ label: S("conversations.moreOptions", "More options"),
350
+ active: R,
351
+ onClick: () => z((e) => !e)
352
+ }), R && /* @__PURE__ */ g("div", {
353
+ className: "absolute right-0 top-full mt-1 w-48 bg-popover border border-border-subtle rounded-lg shadow-lg z-50 py-1 animate-in fade-in-0 zoom-in-95 duration-100",
354
+ children: [
355
+ /* @__PURE__ */ h(y, {
356
+ icon: M.isPinned ? /* @__PURE__ */ h(_e, { size: 14 }) : /* @__PURE__ */ h(p, { size: 14 }),
357
+ label: M.isPinned ? S("conversations.unpinConversation", "Unpin conversation") : S("conversations.pinConversation", "Pin conversation"),
358
+ onClick: () => void lt()
359
+ }),
360
+ /* @__PURE__ */ h(y, {
361
+ icon: M.isMuted ? /* @__PURE__ */ h(ue, { size: 14 }) : /* @__PURE__ */ h(de, { size: 14 }),
362
+ label: M.isMuted ? S("conversations.unmuteConversation", "Unmute conversation") : S("conversations.muteConversation", "Mute conversation"),
363
+ onClick: () => void ut()
364
+ }),
365
+ /* @__PURE__ */ h("div", { className: "h-px bg-border my-1" }),
366
+ /* @__PURE__ */ h(y, {
367
+ icon: /* @__PURE__ */ h(ce, { size: 14 }),
368
+ label: S("conversations.archiveConversation", "Archive conversation"),
369
+ onClick: () => void dt(),
370
+ destructive: !0
371
+ }),
372
+ M.isGroup && /* @__PURE__ */ h(y, {
373
+ icon: /* @__PURE__ */ h(he, { size: 14 }),
374
+ label: S("conversations.leaveConversation", "Leave conversation"),
375
+ onClick: () => void ft(),
376
+ destructive: !0
377
+ })
378
+ ]
379
+ })]
380
+ })
381
+ ]
315
382
  })]
316
- }), /* @__PURE__ */ g("div", {
317
- className: "flex shrink-0 items-center gap-1",
383
+ }),
384
+ /* @__PURE__ */ g("div", {
385
+ className: "flex-1 overflow-y-auto py-4 space-y-0.5",
318
386
  children: [
319
- q?.contextHref && /* @__PURE__ */ h(b, {
320
- dataTour: "conversation-open-context",
321
- icon: /* @__PURE__ */ h(de, { size: 16 }),
322
- label: S("conversations.openContext", "Open context"),
323
- onClick: $
387
+ J?.pagePath && /* @__PURE__ */ g("div", {
388
+ className: "mx-4 mb-4 rounded-lg border border-border-subtle bg-bg-sunken/20 px-3 py-2 text-xs text-text-secondary",
389
+ children: [/* @__PURE__ */ h("span", {
390
+ className: "font-medium text-text-primary",
391
+ children: J.contextTitle || J.pagePath
392
+ }), J.entityType && J.entityId ? ` · ${J.entityType} ${J.entityId}` : ""]
324
393
  }),
325
- j.isGroup && /* @__PURE__ */ h(b, {
326
- dataTour: "conversation-participants-button",
327
- icon: /* @__PURE__ */ h(_e, { size: 16 }),
328
- label: S("conversations.participants", "Participants"),
329
- active: w,
330
- onClick: T
394
+ ze && /* @__PURE__ */ h("div", {
395
+ className: "mx-4 mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg px-3 py-2 text-sm text-status-warning-text",
396
+ children: S("conversations.messagesUnavailable", "Messages couldn't be loaded right now. The conversation header and actions are still available.")
397
+ }),
398
+ Re && /* @__PURE__ */ g("div", {
399
+ className: "mx-4 mb-4 flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/20 px-3 py-2 text-sm text-text-secondary",
400
+ children: [/* @__PURE__ */ h(me, {
401
+ size: 14,
402
+ className: "animate-spin"
403
+ }), S("conversations.loadingMessages", "Loading messages...")]
331
404
  }),
332
- /* @__PURE__ */ g("div", {
333
- className: "relative",
334
- ref: G,
335
- children: [/* @__PURE__ */ h(b, {
336
- icon: /* @__PURE__ */ h(he, { size: 16 }),
337
- label: S("conversations.moreOptions", "More options"),
338
- active: L,
339
- onClick: () => R((e) => !e)
340
- }), L && /* @__PURE__ */ g("div", {
341
- className: "absolute right-0 top-full mt-1 w-48 bg-popover border border-border-subtle rounded-lg shadow-lg z-50 py-1 animate-in fade-in-0 zoom-in-95 duration-100",
342
- children: [
343
- /* @__PURE__ */ h(y, {
344
- icon: j.isPinned ? /* @__PURE__ */ h(ge, { size: 14 }) : /* @__PURE__ */ h(p, { size: 14 }),
345
- label: j.isPinned ? S("conversations.unpinConversation", "Unpin conversation") : S("conversations.pinConversation", "Pin conversation"),
346
- onClick: () => void Q()
347
- }),
348
- /* @__PURE__ */ h(y, {
349
- icon: j.isMuted ? /* @__PURE__ */ h(le, { size: 14 }) : /* @__PURE__ */ h(ue, { size: 14 }),
350
- label: j.isMuted ? S("conversations.unmuteConversation", "Unmute conversation") : S("conversations.muteConversation", "Mute conversation"),
351
- onClick: () => void ot()
352
- }),
353
- /* @__PURE__ */ h("div", { className: "h-px bg-border my-1" }),
354
- /* @__PURE__ */ h(y, {
355
- icon: /* @__PURE__ */ h(se, { size: 14 }),
356
- label: S("conversations.archiveConversation", "Archive conversation"),
357
- onClick: () => void st(),
358
- destructive: !0
359
- }),
360
- j.isGroup && /* @__PURE__ */ h(y, {
361
- icon: /* @__PURE__ */ h(me, { size: 14 }),
362
- label: S("conversations.leaveConversation", "Leave conversation"),
363
- onClick: () => void ct(),
364
- destructive: !0
365
- })
366
- ]
405
+ !Re && !ze && Y.length === 0 && /* @__PURE__ */ g("div", {
406
+ className: "mx-4 mb-4 flex flex-col items-center gap-5 py-6",
407
+ children: [/* @__PURE__ */ h(Ee, {
408
+ illustration: "empty-vibes",
409
+ title: S("conversations.noMessagesTitle", "No messages yet"),
410
+ description: S("conversations.noMessagesYet", "Start the conversation below — say hello, ask a question, or share an update."),
411
+ action: /* @__PURE__ */ g(Te, {
412
+ type: "button",
413
+ onClick: j,
414
+ children: [/* @__PURE__ */ h(m, {
415
+ size: 14,
416
+ "aria-hidden": "true"
417
+ }), S("conversations.writeFirstMessage", "Write a message")]
418
+ })
419
+ }), /* @__PURE__ */ h(De, {
420
+ className: "w-full max-w-md",
421
+ storageKey: "conversations-detail",
422
+ title: S("conversations.nextSteps.title", "Get the most out of this conversation"),
423
+ steps: pt
367
424
  })]
368
- })
425
+ }),
426
+ Y.map((e, t) => {
427
+ let n = Y[t - 1], i = !n || n.authorId !== e.authorId || n.type === "SYSTEM";
428
+ return /* @__PURE__ */ h("div", { children: B === e.id ? /* @__PURE__ */ g("div", {
429
+ className: "px-4 py-2",
430
+ children: [/* @__PURE__ */ g("div", {
431
+ className: "flex items-center gap-2 text-xs text-text-secondary mb-1",
432
+ children: [/* @__PURE__ */ h("span", { children: S("conversations.editingMessage", "Editing message") }), /* @__PURE__ */ h("button", {
433
+ type: "button",
434
+ onClick: ot,
435
+ className: "hover:text-text-primary",
436
+ children: /* @__PURE__ */ h(ye, { size: 12 })
437
+ })]
438
+ }), /* @__PURE__ */ g("div", {
439
+ className: "flex items-end gap-2",
440
+ children: [/* @__PURE__ */ h("textarea", {
441
+ "aria-label": "Edit message",
442
+ value: H,
443
+ onChange: (e) => U(e.target.value),
444
+ onKeyDown: (e) => {
445
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), at()), e.key === "Escape" && ot();
446
+ },
447
+ className: "flex-1 px-3 py-2 text-sm rounded-lg border border-border-subtle bg-bg-sunken/30 resize-none focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
448
+ rows: 2
449
+ }), /* @__PURE__ */ h("button", {
450
+ type: "button",
451
+ onClick: () => void at(),
452
+ disabled: !H.trim() || L,
453
+ className: "px-3 py-2 text-xs font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
454
+ children: S("conversations.save", "Save")
455
+ })]
456
+ })]
457
+ }) : /* @__PURE__ */ h(r, {
458
+ message: e,
459
+ isOwnMessage: e.authorId === q,
460
+ showAvatar: i,
461
+ showSender: i,
462
+ onReply: nt,
463
+ onReact: (e, t) => void rt(e, t),
464
+ onEdit: it,
465
+ onDelete: (e) => void st(e),
466
+ onTogglePin: (e, t) => void ct(e, t)
467
+ }) }, e.id);
468
+ }),
469
+ /* @__PURE__ */ h("div", { ref: Fe })
369
470
  ]
370
- })]
371
- }),
372
- /* @__PURE__ */ g("div", {
373
- className: "flex-1 overflow-y-auto py-4 space-y-0.5",
374
- children: [
375
- q?.pagePath && /* @__PURE__ */ g("div", {
376
- className: "mx-4 mb-4 rounded-lg border border-border-subtle bg-bg-sunken/20 px-3 py-2 text-xs text-text-secondary",
377
- children: [/* @__PURE__ */ h("span", {
378
- className: "font-medium text-text-primary",
379
- children: q.contextTitle || q.pagePath
380
- }), q.entityType && q.entityId ? ` · ${q.entityType} ${q.entityId}` : ""]
381
- }),
382
- Ie && /* @__PURE__ */ h("div", {
383
- className: "mx-4 mb-4 rounded-lg border border-status-warning-border bg-status-warning-bg px-3 py-2 text-sm text-status-warning-text",
384
- children: S("conversations.messagesUnavailable", "Messages couldn't be loaded right now. The conversation header and actions are still available.")
385
- }),
386
- Fe && /* @__PURE__ */ g("div", {
387
- className: "mx-4 mb-4 flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-sunken/20 px-3 py-2 text-sm text-text-secondary",
388
- children: [/* @__PURE__ */ h(pe, {
389
- size: 14,
390
- className: "animate-spin"
391
- }), S("conversations.loadingMessages", "Loading messages...")]
392
- }),
393
- !Fe && !Ie && J.length === 0 && /* @__PURE__ */ g("div", {
394
- className: "mx-4 mb-4 flex flex-col items-center gap-5 py-6",
395
- children: [/* @__PURE__ */ h(we, {
396
- illustration: "empty-vibes",
397
- title: S("conversations.noMessagesTitle", "No messages yet"),
398
- description: S("conversations.noMessagesYet", "Start the conversation below — say hello, ask a question, or share an update."),
399
- action: /* @__PURE__ */ g(Ce, {
400
- type: "button",
401
- onClick: A,
402
- children: [/* @__PURE__ */ h(m, {
403
- size: 14,
404
- "aria-hidden": "true"
405
- }), S("conversations.writeFirstMessage", "Write a message")]
471
+ }),
472
+ /* @__PURE__ */ g("div", {
473
+ "data-tour": "conversation-message-composer",
474
+ className: "border-t border-border-seam px-4 py-3 bg-bg-surface",
475
+ children: [W && /* @__PURE__ */ g("div", {
476
+ className: "flex items-center gap-2 mb-2 px-3 py-1.5 rounded-lg bg-bg-sunken/50 text-xs text-text-secondary",
477
+ children: [/* @__PURE__ */ g("span", { children: [
478
+ S("conversations.replyingTo", "Replying to"),
479
+ " ",
480
+ /* @__PURE__ */ h("strong", {
481
+ className: "text-text-primary",
482
+ children: W.sender
483
+ }),
484
+ ": ",
485
+ W.content.slice(0, 80),
486
+ W.content.length > 80 ? "…" : ""
487
+ ] }), /* @__PURE__ */ h("button", {
488
+ type: "button",
489
+ onClick: () => G(null),
490
+ "aria-label": S("conversations.cancelReply", "Cancel reply"),
491
+ className: "ml-auto flex min-h-9 min-w-9 items-center justify-center rounded-md hover:bg-bg-sunken/70 hover:text-text-primary",
492
+ children: /* @__PURE__ */ h(ye, { size: 12 })
493
+ })]
494
+ }), /* @__PURE__ */ g("div", {
495
+ className: "flex items-end gap-2",
496
+ children: [/* @__PURE__ */ h("div", {
497
+ className: "flex-1 relative",
498
+ children: /* @__PURE__ */ h("textarea", {
499
+ "aria-label": S("conversations.messageComposer", "Message composer"),
500
+ ref: A,
501
+ value: E,
502
+ onChange: (e) => Ne(e.target.value),
503
+ onKeyDown: tt,
504
+ placeholder: `${S("conversations.messageConversationPrefix", "Message")} ${M.title}...`,
505
+ rows: 1,
506
+ className: t("w-full px-4 py-2.5 text-sm rounded-xl border border-border-subtle bg-bg-sunken/30", "resize-none overflow-hidden placeholder:text-text-secondary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent max-h-32"),
507
+ style: {
508
+ height: "auto",
509
+ minHeight: "40px"
510
+ },
511
+ onInput: (e) => {
512
+ let t = e.target;
513
+ t.style.height = "auto", t.style.height = `${Math.min(t.scrollHeight, 128)}px`;
514
+ }
406
515
  })
407
- }), /* @__PURE__ */ h(Te, {
408
- className: "w-full max-w-md",
409
- storageKey: "conversations-detail",
410
- title: S("conversations.nextSteps.title", "Get the most out of this conversation"),
411
- steps: lt
516
+ }), /* @__PURE__ */ h("button", {
517
+ type: "button",
518
+ "aria-label": S("conversations.sendMessage", "Send message"),
519
+ onClick: () => void Q(),
520
+ disabled: !E.trim() || I,
521
+ className: t("p-2.5 rounded-xl transition-all duration-150", E.trim() && !I ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 shadow-sm" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
522
+ children: I ? /* @__PURE__ */ h(me, {
523
+ size: 18,
524
+ className: "animate-spin"
525
+ }) : /* @__PURE__ */ h(m, { size: 18 })
412
526
  })]
413
- }),
414
- J.map((e, t) => {
415
- let n = J[t - 1], i = !n || n.authorId !== e.authorId || n.type === "SYSTEM";
416
- return /* @__PURE__ */ h("div", { children: z === e.id ? /* @__PURE__ */ g("div", {
417
- className: "px-4 py-2",
418
- children: [/* @__PURE__ */ g("div", {
419
- className: "flex items-center gap-2 text-xs text-text-secondary mb-1",
420
- children: [/* @__PURE__ */ h("span", { children: S("conversations.editingMessage", "Editing message") }), /* @__PURE__ */ h("button", {
421
- type: "button",
422
- onClick: rt,
423
- className: "hover:text-text-primary",
424
- children: /* @__PURE__ */ h(ve, { size: 12 })
425
- })]
426
- }), /* @__PURE__ */ g("div", {
427
- className: "flex items-end gap-2",
428
- children: [/* @__PURE__ */ h("textarea", {
429
- "aria-label": "Edit message",
430
- value: V,
431
- onChange: (e) => H(e.target.value),
432
- onKeyDown: (e) => {
433
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), nt()), e.key === "Escape" && rt();
434
- },
435
- className: "flex-1 px-3 py-2 text-sm rounded-lg border border-border-subtle bg-bg-sunken/30 resize-none focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
436
- rows: 2
437
- }), /* @__PURE__ */ h("button", {
438
- type: "button",
439
- onClick: () => void nt(),
440
- disabled: !V.trim() || I,
441
- className: "px-3 py-2 text-xs font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
442
- children: S("conversations.save", "Save")
443
- })]
444
- })]
445
- }) : /* @__PURE__ */ h(r, {
446
- message: e,
447
- isOwnMessage: e.authorId === K,
448
- showAvatar: i,
449
- showSender: i,
450
- onReply: $e,
451
- onReact: (e, t) => void et(e, t),
452
- onEdit: tt,
453
- onDelete: (e) => void it(e),
454
- onTogglePin: (e, t) => void at(e, t)
455
- }) }, e.id);
456
- }),
457
- /* @__PURE__ */ h("div", { ref: Me })
458
- ]
459
- }),
460
- /* @__PURE__ */ g("div", {
461
- "data-tour": "conversation-message-composer",
462
- className: "border-t border-border-seam px-4 py-3 bg-bg-surface",
463
- children: [U && /* @__PURE__ */ g("div", {
464
- className: "flex items-center gap-2 mb-2 px-3 py-1.5 rounded-lg bg-bg-sunken/50 text-xs text-text-secondary",
465
- children: [/* @__PURE__ */ g("span", { children: [
466
- S("conversations.replyingTo", "Replying to"),
467
- " ",
468
- /* @__PURE__ */ h("strong", {
469
- className: "text-text-primary",
470
- children: U.sender
471
- }),
472
- ": ",
473
- U.content.slice(0, 80),
474
- U.content.length > 80 ? "…" : ""
475
- ] }), /* @__PURE__ */ h("button", {
476
- type: "button",
477
- onClick: () => W(null),
478
- "aria-label": S("conversations.cancelReply", "Cancel reply"),
479
- className: "ml-auto flex min-h-9 min-w-9 items-center justify-center rounded-md hover:bg-bg-sunken/70 hover:text-text-primary",
480
- children: /* @__PURE__ */ h(ve, { size: 12 })
481
527
  })]
482
- }), /* @__PURE__ */ g("div", {
483
- className: "flex items-end gap-2",
484
- children: [/* @__PURE__ */ h("div", {
485
- className: "flex-1 relative",
486
- children: /* @__PURE__ */ h("textarea", {
487
- "aria-label": S("conversations.messageComposer", "Message composer"),
488
- ref: k,
489
- value: E,
490
- onChange: (e) => je(e.target.value),
491
- onKeyDown: Qe,
492
- placeholder: `${S("conversations.messageConversationPrefix", "Message")} ${j.title}...`,
493
- rows: 1,
494
- className: t("w-full px-4 py-2.5 text-sm rounded-xl border border-border-subtle bg-bg-sunken/30", "resize-none overflow-hidden placeholder:text-text-secondary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:border-transparent max-h-32"),
495
- style: {
496
- height: "auto",
497
- minHeight: "40px"
498
- },
499
- onInput: (e) => {
500
- let t = e.target;
501
- t.style.height = "auto", t.style.height = `${Math.min(t.scrollHeight, 128)}px`;
502
- }
503
- })
528
+ })
529
+ ]
530
+ }),
531
+ w && M.isGroup && /* @__PURE__ */ h("aside", {
532
+ className: "absolute inset-y-0 right-0 z-20 w-full max-w-72 border-l border-border-seam bg-bg-surface shadow-lg animate-in slide-in-from-right-4 duration-200 md:relative md:z-auto md:w-64 md:shadow-none",
533
+ children: /* @__PURE__ */ g("div", {
534
+ className: "p-4",
535
+ children: [/* @__PURE__ */ g("div", {
536
+ className: "flex items-center justify-between mb-4",
537
+ children: [/* @__PURE__ */ g("h3", {
538
+ className: "text-sm font-semibold text-text-primary",
539
+ children: [
540
+ S("conversations.members", "Members"),
541
+ " (",
542
+ M.memberCount ?? Z.length,
543
+ ")"
544
+ ]
504
545
  }), /* @__PURE__ */ h("button", {
505
546
  type: "button",
506
- "aria-label": S("conversations.sendMessage", "Send message"),
507
- onClick: () => void Z(),
508
- disabled: !E.trim() || F,
509
- className: t("p-2.5 rounded-xl transition-all duration-150", E.trim() && !F ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 shadow-sm" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
510
- children: F ? /* @__PURE__ */ h(pe, {
511
- size: 18,
512
- className: "animate-spin"
513
- }) : /* @__PURE__ */ h(m, { size: 18 })
547
+ onClick: T,
548
+ className: "p-1 rounded text-text-secondary hover:text-text-primary",
549
+ children: /* @__PURE__ */ h(p, { size: 14 })
514
550
  })]
515
- })]
516
- })
517
- ]
518
- }), w && j.isGroup && /* @__PURE__ */ h("aside", {
519
- className: "absolute inset-y-0 right-0 z-20 w-full max-w-72 border-l border-border-seam bg-bg-surface shadow-lg animate-in slide-in-from-right-4 duration-200 md:relative md:z-auto md:w-64 md:shadow-none",
520
- children: /* @__PURE__ */ g("div", {
521
- className: "p-4",
522
- children: [/* @__PURE__ */ g("div", {
523
- className: "flex items-center justify-between mb-4",
524
- children: [/* @__PURE__ */ g("h3", {
525
- className: "text-sm font-semibold text-text-primary",
526
- children: [
527
- S("conversations.members", "Members"),
528
- " (",
529
- j.memberCount ?? X.length,
530
- ")"
531
- ]
532
- }), /* @__PURE__ */ h("button", {
533
- type: "button",
534
- onClick: T,
535
- className: "p-1 rounded text-text-secondary hover:text-text-primary",
536
- children: /* @__PURE__ */ h(p, { size: 14 })
537
- })]
538
- }), /* @__PURE__ */ g("div", {
539
- className: "space-y-1",
540
- children: [X.map((e) => /* @__PURE__ */ g("div", {
541
- className: "flex items-center gap-2.5 px-2 py-1.5 rounded-lg hover:bg-bg-sunken/50",
542
- children: [/* @__PURE__ */ h("div", {
543
- className: "size-7 rounded-full bg-bg-sunken flex items-center justify-center text-xs font-medium text-text-secondary",
544
- children: e.name.split(" ").map((e) => e[0]).join("").slice(0, 2)
545
- }), /* @__PURE__ */ g("div", {
546
- className: "min-w-0",
547
- children: [/* @__PURE__ */ h("p", {
548
- className: "text-xs font-medium text-text-primary truncate",
549
- children: e.name
550
- }), /* @__PURE__ */ h("p", {
551
- className: "text-[10px] text-text-secondary",
552
- children: e.role
551
+ }), /* @__PURE__ */ g("div", {
552
+ className: "space-y-1",
553
+ children: [Z.map((e) => /* @__PURE__ */ g("div", {
554
+ className: "flex items-center gap-2.5 px-2 py-1.5 rounded-lg hover:bg-bg-sunken/50",
555
+ children: [/* @__PURE__ */ h("div", {
556
+ className: "size-7 rounded-full bg-bg-sunken flex items-center justify-center text-xs font-medium text-text-secondary",
557
+ children: e.name.split(" ").map((e) => e[0]).join("").slice(0, 2)
558
+ }), /* @__PURE__ */ g("div", {
559
+ className: "min-w-0",
560
+ children: [/* @__PURE__ */ h("p", {
561
+ className: "text-xs font-medium text-text-primary truncate",
562
+ children: e.name
563
+ }), /* @__PURE__ */ h("p", {
564
+ className: "text-[10px] text-text-secondary",
565
+ children: e.role
566
+ })]
553
567
  })]
568
+ }, e.id)), et > 0 && /* @__PURE__ */ g("p", {
569
+ className: "px-2 pt-2 text-xs text-text-secondary",
570
+ children: [
571
+ S("conversations.moreMembersPrefix", "and"),
572
+ " ",
573
+ et,
574
+ " ",
575
+ S("conversations.moreMembersSuffix", "more")
576
+ ]
554
577
  })]
555
- }, e.id)), Ze > 0 && /* @__PURE__ */ g("p", {
556
- className: "px-2 pt-2 text-xs text-text-secondary",
557
- children: [
558
- S("conversations.moreMembersPrefix", "and"),
559
- " ",
560
- Ze,
561
- " ",
562
- S("conversations.moreMembersSuffix", "more")
563
- ]
564
578
  })]
565
- })]
579
+ })
580
+ }),
581
+ /* @__PURE__ */ h(oe, {
582
+ open: Pe,
583
+ title: S("conversations.quota.messages.title", "Message Quota Reached"),
584
+ description: S("conversations.quota.messages.description", "You've reached the message limit for your current plan. View billing to upgrade or add more capacity."),
585
+ onClose: () => D(!1),
586
+ onConfirm: () => {
587
+ D(!1), o("/billing");
588
+ }
566
589
  })
567
- })]
590
+ ]
568
591
  });
569
592
  }
570
593
  function y({ icon: e, label: n, onClick: r, destructive: i }) {