@burdenoff/microfe-channel 2026.715.2 → 2026.720.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.
@@ -5,65 +5,66 @@ import { useChannels as r } from "../../../hooks/useChannels.js";
5
5
  import { PermissionGuard as i } from "../../../components/PermissionGuard.js";
6
6
  import { CHANNEL_PERMISSIONS as ee } from "../../../constants/permissions.js";
7
7
  import { NotificationChannel as a, NotificationPriority as o } from "../../../../generated/global-types.js";
8
+ import { MarkdownEditor as te } from "../../../components/MarkdownEditor.js";
8
9
  import { useCallback as s, useRef as c, useState as l } from "react";
9
- import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
- import { AlertCircle as d, ArrowLeft as f, Bell as p, CheckCircle2 as m, Hash as h, Loader2 as g, Mail as _, MessageCircle as v, MessageSquare as y, Plus as b, Send as x, Smartphone as S, Users as C, X as te, XCircle as ne } from "lucide-react";
11
- import { useNavigate as re } from "react-router-dom";
12
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
13
- import { EmphasisPanel as D, GlassCard as O, IllustratedEmptyState as k, PagePurpose as ie } from "@burdenoff/fe-libs/ui";
10
+ import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { AlertCircle as u, ArrowLeft as re, Bell as d, CheckCircle2 as f, Hash as p, Loader2 as ie, Mail as m, MessageCircle as h, MessageSquare as g, Plus as _, Send as v, Smartphone as y, Users as b, X as ae, XCircle as oe } from "lucide-react";
12
+ import { useNavigate as x } from "react-router-dom";
13
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
14
+ import { EmphasisPanel as se, GlassCard as T, IllustratedEmptyState as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
14
15
  //#region src/channel/modules/channels/pages/SendMessagePage.tsx
15
- var ae = {
16
- EMAIL: _,
17
- SMS: S,
18
- PUSH: p,
19
- WHATSAPP: y,
20
- SLACK: h,
21
- TEAMS: C,
22
- DISCORD: v,
23
- INAPP: p,
24
- WEBCHAT: y,
25
- WEBHOOK: x
16
+ var O = {
17
+ EMAIL: m,
18
+ SMS: y,
19
+ PUSH: d,
20
+ WHATSAPP: g,
21
+ SLACK: p,
22
+ TEAMS: b,
23
+ DISCORD: h,
24
+ INAPP: d,
25
+ WEBCHAT: g,
26
+ WEBHOOK: v
26
27
  };
27
- function A() {
28
- let p = re(), { channels: h } = r(), { organizationId: _, authToken: v, apiGatewayUrl: y } = e(), { t: S } = u(), C = (e, t) => {
29
- let n = S(e);
28
+ function k() {
29
+ let d = x(), { channels: p } = r(), { organizationId: m, authToken: h, apiGatewayUrl: g } = e(), { t: y } = ne(), b = (e, t) => {
30
+ let n = y(e);
30
31
  return n === e ? t : n;
31
- }, [A, { loading: j }] = n({ client: t(y, v, _) }), [M, N] = l(""), [P, F] = l("EMAIL"), [I, L] = l([]), oe = c(0), [R, z] = l(""), [B, V] = l(""), [H, U] = l(""), [W, G] = l(""), [K, se] = l(o.Medium), [q, J] = l(null), [Y, X] = l(null), Z = h.filter((e) => e.platform === P), ce = s(() => {
32
- if (!R.trim()) return;
32
+ }, [k, { loading: A }] = n({ client: t(g, h, m) }), [j, M] = l(""), [N, P] = l("EMAIL"), [F, I] = l([]), ce = c(0), [L, R] = l(""), [z, B] = l(""), [V, H] = l(""), [U, W] = l(""), [G, le] = l(o.Medium), [K, q] = l(null), [J, Y] = l(null), X = p.filter((e) => e.platform === N), ue = s(() => {
33
+ if (!L.trim()) return;
33
34
  let e = {
34
- id: `r-${++oe.current}`,
35
- address: R.trim(),
36
- name: B.trim() || void 0
35
+ id: `r-${++ce.current}`,
36
+ address: L.trim(),
37
+ name: z.trim() || void 0
37
38
  };
38
- L((t) => [...t, e]), z(""), V("");
39
- }, [R, B]), le = s((e) => {
40
- L((t) => t.filter((t) => t.id !== e));
41
- }, []), ue = s(() => {
42
- J(null), X(null), U(""), G(""), L([]);
43
- }, []), de = async () => {
44
- if (!M) {
45
- X(C("channel.validation.selectChannel", "Please select a channel"));
39
+ I((t) => [...t, e]), R(""), B("");
40
+ }, [L, z]), Z = s((e) => {
41
+ I((t) => t.filter((t) => t.id !== e));
42
+ }, []), de = s(() => {
43
+ q(null), Y(null), H(""), W(""), I([]);
44
+ }, []), fe = async () => {
45
+ if (!j) {
46
+ Y(b("channel.validation.selectChannel", "Please select a channel"));
46
47
  return;
47
48
  }
48
- if (I.length === 0) {
49
- X(C("channel.validation.addRecipient", "Please add at least one recipient"));
49
+ if (F.length === 0) {
50
+ Y(b("channel.validation.addRecipient", "Please add at least one recipient"));
50
51
  return;
51
52
  }
52
- if (!W.trim()) {
53
- X(C("channel.validation.enterMessage", "Please enter a message"));
53
+ if (!U.trim()) {
54
+ Y(b("channel.validation.enterMessage", "Please enter a message"));
54
55
  return;
55
56
  }
56
- X(null), J(null);
57
+ Y(null), q(null);
57
58
  try {
58
- let e = h.find((e) => e.id === M);
59
+ let e = p.find((e) => e.id === j);
59
60
  if (!e) {
60
- X(C("channel.error.channelNotFound", "Selected channel not found"));
61
+ Y(b("channel.error.channelNotFound", "Selected channel not found"));
61
62
  return;
62
63
  }
63
- let t = P === "INAPP" ? a.InApp : P;
64
- J(await Promise.all(I.map(async (n) => {
64
+ let t = N === "INAPP" ? a.InApp : N;
65
+ q(await Promise.all(F.map(async (n) => {
65
66
  let r = {};
66
- switch (P) {
67
+ switch (N) {
67
68
  case "EMAIL":
68
69
  r.email = n.address;
69
70
  break;
@@ -89,15 +90,15 @@ function A() {
89
90
  channelId: e.id,
90
91
  platform: t,
91
92
  notification: {
92
- body: W,
93
+ body: U,
93
94
  channel: t,
94
95
  recipient: r,
95
- subject: P === "EMAIL" ? H : void 0,
96
- priority: K
96
+ subject: N === "EMAIL" ? V : void 0,
97
+ priority: G
97
98
  }
98
99
  };
99
100
  try {
100
- let e = await A({ variables: { input: i } });
101
+ let e = await k({ variables: { input: i } });
101
102
  if (e.data?.triggerNotification) {
102
103
  let t = e.data.triggerNotification, r = t.status === "FAILED" || t.triggerStatus === "FAILED", i = t.errorMessage || t.errorCode;
103
104
  return {
@@ -121,57 +122,57 @@ function A() {
121
122
  }
122
123
  })));
123
124
  } catch (e) {
124
- X(e instanceof Error ? e.message : "Failed to send message");
125
+ Y(e instanceof Error ? e.message : "Failed to send message");
125
126
  }
126
- }, Q = q?.filter((e) => e.success).length ?? 0, $ = q?.filter((e) => !e.success).length ?? 0;
127
- return /* @__PURE__ */ T(i, {
127
+ }, Q = K?.filter((e) => e.success).length ?? 0, $ = K?.filter((e) => !e.success).length ?? 0;
128
+ return /* @__PURE__ */ C(i, {
128
129
  permission: ee.CHANNEL_DELIVERY_SEND,
129
- children: /* @__PURE__ */ E("div", {
130
+ children: /* @__PURE__ */ w("div", {
130
131
  className: "min-h-screen bg-bg-surface",
131
- children: [/* @__PURE__ */ T("div", {
132
+ children: [/* @__PURE__ */ C("div", {
132
133
  className: "border-b bg-bg-surface",
133
- children: /* @__PURE__ */ T("div", {
134
+ children: /* @__PURE__ */ C("div", {
134
135
  className: "container mx-auto px-6 py-4",
135
- children: /* @__PURE__ */ E("div", {
136
+ children: /* @__PURE__ */ w("div", {
136
137
  className: "flex items-center gap-4",
137
- children: [/* @__PURE__ */ T("button", {
138
+ children: [/* @__PURE__ */ C("button", {
138
139
  type: "button",
139
- onClick: () => p("/channels/list"),
140
+ onClick: () => d("/channels/list"),
140
141
  className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
141
- children: /* @__PURE__ */ T(f, { className: "size-5 " })
142
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
142
+ children: /* @__PURE__ */ C(re, { className: "size-5 " })
143
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
143
144
  className: "text-2xl font-bold",
144
- children: C("channel.sendMessage", "Send Message")
145
- }), /* @__PURE__ */ T("p", {
145
+ children: b("channel.sendMessage", "Send Message")
146
+ }), /* @__PURE__ */ C("p", {
146
147
  className: "text-sm text-text-secondary",
147
- children: C("channel.sendMessageSubtitle", "Send notifications through configured channels")
148
+ children: b("channel.sendMessageSubtitle", "Send notifications through configured channels")
148
149
  })] })]
149
150
  })
150
151
  })
151
- }), /* @__PURE__ */ E("div", {
152
+ }), /* @__PURE__ */ w("div", {
152
153
  className: "container mx-auto px-6 py-8 max-w-3xl space-y-6",
153
- children: [/* @__PURE__ */ T(ie, {
154
- icon: /* @__PURE__ */ T(x, {
154
+ children: [/* @__PURE__ */ C(D, {
155
+ icon: /* @__PURE__ */ C(v, {
155
156
  size: 15,
156
157
  "aria-hidden": "true"
157
158
  }),
158
- children: C("channel.sendMessagePurpose", "Compose and fire off a one-off notification through any configured channel — handy for testing a freshly set-up channel, sending a quick announcement, or reproducing a delivery problem. Pick the platform and channel, add one or more recipients, write your message, and send; you will get a per-recipient success/failure breakdown so you know exactly what got through.")
159
- }), q === null ? /* @__PURE__ */ E("div", {
159
+ children: b("channel.sendMessagePurpose", "Compose and fire off a one-off notification through any configured channel — handy for testing a freshly set-up channel, sending a quick announcement, or reproducing a delivery problem. Pick the platform and channel, add one or more recipients, write your message, and send; you will get a per-recipient success/failure breakdown so you know exactly what got through.")
160
+ }), K === null ? /* @__PURE__ */ w("div", {
160
161
  className: "space-y-6",
161
162
  children: [
162
- Y && /* @__PURE__ */ E("div", {
163
+ J && /* @__PURE__ */ w("div", {
163
164
  className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
164
- children: [/* @__PURE__ */ T(d, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ T("p", {
165
+ children: [/* @__PURE__ */ C(u, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ C("p", {
165
166
  className: "text-sm text-status-error-text",
166
- children: Y
167
+ children: J
167
168
  })]
168
169
  }),
169
- /* @__PURE__ */ E("div", {
170
+ /* @__PURE__ */ w("div", {
170
171
  className: "space-y-3",
171
- children: [/* @__PURE__ */ T("label", {
172
+ children: [/* @__PURE__ */ C("label", {
172
173
  className: "text-sm font-medium",
173
- children: C("channel.platform", "Platform")
174
- }), /* @__PURE__ */ T("div", {
174
+ children: b("channel.platform", "Platform")
175
+ }), /* @__PURE__ */ C("div", {
175
176
  className: "flex flex-wrap gap-2",
176
177
  children: [
177
178
  "EMAIL",
@@ -182,14 +183,14 @@ function A() {
182
183
  "TEAMS",
183
184
  "WEBHOOK"
184
185
  ].map((e) => {
185
- let t = ae[e] || x;
186
- return /* @__PURE__ */ E("button", {
186
+ let t = O[e] || v;
187
+ return /* @__PURE__ */ w("button", {
187
188
  type: "button",
188
189
  onClick: () => {
189
- F(e), N("");
190
+ P(e), M("");
190
191
  },
191
- className: `px-4 py-2 rounded-lg border flex items-center gap-2 transition-all ${P === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
192
- children: [/* @__PURE__ */ T(t, { className: "size-4 " }), /* @__PURE__ */ T("span", {
192
+ className: `px-4 py-2 rounded-lg border flex items-center gap-2 transition-all ${N === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
193
+ children: [/* @__PURE__ */ C(t, { className: "size-4 " }), /* @__PURE__ */ C("span", {
193
194
  className: "text-sm",
194
195
  children: e
195
196
  })]
@@ -197,35 +198,35 @@ function A() {
197
198
  })
198
199
  })]
199
200
  }),
200
- /* @__PURE__ */ E("div", {
201
+ /* @__PURE__ */ w("div", {
201
202
  className: "space-y-2",
202
- children: [/* @__PURE__ */ E("label", {
203
+ children: [/* @__PURE__ */ w("label", {
203
204
  className: "text-sm font-medium",
204
- children: [C("channel.channel", "Channel"), " *"]
205
- }), Z.length === 0 ? /* @__PURE__ */ T("div", {
205
+ children: [b("channel.channel", "Channel"), " *"]
206
+ }), X.length === 0 ? /* @__PURE__ */ C("div", {
206
207
  className: "rounded-lg border border-dashed",
207
- children: /* @__PURE__ */ T(k, {
208
+ children: /* @__PURE__ */ C(E, {
208
209
  illustration: "empty-data",
209
- title: C("channel.noPlatformChannels", `No ${P} channels configured`),
210
- description: C("channel.noPlatformChannelsHint", "Create a channel for this platform to be able to send through it."),
211
- action: /* @__PURE__ */ E("button", {
210
+ title: b("channel.noPlatformChannels", `No ${N} channels configured`),
211
+ description: b("channel.noPlatformChannelsHint", "Create a channel for this platform to be able to send through it."),
212
+ action: /* @__PURE__ */ w("button", {
212
213
  type: "button",
213
- onClick: () => p("./create"),
214
+ onClick: () => d("./create"),
214
215
  className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
215
- children: [/* @__PURE__ */ T(b, {
216
+ children: [/* @__PURE__ */ C(_, {
216
217
  className: "size-4",
217
218
  "aria-hidden": "true"
218
- }), C("channel.createChannel", "Create Channel")]
219
+ }), b("channel.createChannel", "Create Channel")]
219
220
  })
220
221
  })
221
- }) : /* @__PURE__ */ E("select", {
222
- value: M,
223
- onChange: (e) => N(e.target.value),
222
+ }) : /* @__PURE__ */ w("select", {
223
+ value: j,
224
+ onChange: (e) => M(e.target.value),
224
225
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
225
- children: [/* @__PURE__ */ T("option", {
226
+ children: [/* @__PURE__ */ C("option", {
226
227
  value: "",
227
- children: C("channel.selectChannel", "Select a channel...")
228
- }), Z.map((e) => /* @__PURE__ */ E("option", {
228
+ children: b("channel.selectChannel", "Select a channel...")
229
+ }), X.map((e) => /* @__PURE__ */ w("option", {
229
230
  value: e.id,
230
231
  children: [
231
232
  e.name,
@@ -236,181 +237,180 @@ function A() {
236
237
  }, e.id))]
237
238
  })]
238
239
  }),
239
- /* @__PURE__ */ E("div", {
240
+ /* @__PURE__ */ w("div", {
240
241
  className: "space-y-3",
241
242
  children: [
242
- /* @__PURE__ */ T("label", {
243
+ /* @__PURE__ */ C("label", {
243
244
  className: "text-sm font-medium",
244
- children: C("channel.recipients", "Recipients")
245
+ children: b("channel.recipients", "Recipients")
245
246
  }),
246
- /* @__PURE__ */ E("div", {
247
+ /* @__PURE__ */ w("div", {
247
248
  className: "flex gap-2",
248
249
  children: [
249
- /* @__PURE__ */ T("input", {
250
- "aria-label": P === "EMAIL" ? "email@example.com" : "+1234567890",
250
+ /* @__PURE__ */ C("input", {
251
+ "aria-label": N === "EMAIL" ? "email@example.com" : "+1234567890",
251
252
  type: "text",
252
- value: R,
253
- onChange: (e) => z(e.target.value),
254
- placeholder: P === "EMAIL" ? "email@example.com" : "+1234567890",
253
+ value: L,
254
+ onChange: (e) => R(e.target.value),
255
+ placeholder: N === "EMAIL" ? "email@example.com" : "+1234567890",
255
256
  className: "flex-1 px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
256
257
  }),
257
- /* @__PURE__ */ T("input", {
258
- "aria-label": C("channel.nameOptional", "Name (optional)"),
258
+ /* @__PURE__ */ C("input", {
259
+ "aria-label": b("channel.nameOptional", "Name (optional)"),
259
260
  type: "text",
260
- value: B,
261
- onChange: (e) => V(e.target.value),
262
- placeholder: C("channel.nameOptional", "Name (optional)"),
261
+ value: z,
262
+ onChange: (e) => B(e.target.value),
263
+ placeholder: b("channel.nameOptional", "Name (optional)"),
263
264
  className: "w-full sm:w-48 px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
264
265
  }),
265
- /* @__PURE__ */ E("button", {
266
+ /* @__PURE__ */ w("button", {
266
267
  type: "button",
267
- onClick: ce,
268
- disabled: !R.trim(),
268
+ onClick: ue,
269
+ disabled: !L.trim(),
269
270
  className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex items-center gap-2",
270
- children: [/* @__PURE__ */ T(b, { className: "size-4 " }), C("channel.add", "Add")]
271
+ children: [/* @__PURE__ */ C(_, { className: "size-4 " }), b("channel.add", "Add")]
271
272
  })
272
273
  ]
273
274
  }),
274
- I.length > 0 ? /* @__PURE__ */ T(O, {
275
+ F.length > 0 ? /* @__PURE__ */ C(T, {
275
276
  treatment: "plain",
276
277
  className: "border-border-seam rounded-lg p-0 divide-y divide-[var(--color-border-seam)] overflow-hidden",
277
- children: I.map((e) => /* @__PURE__ */ E("div", {
278
+ children: F.map((e) => /* @__PURE__ */ w("div", {
278
279
  className: "p-3 flex items-center justify-between",
279
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
280
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
280
281
  className: "text-sm font-medium",
281
282
  children: e.address
282
- }), e.name && /* @__PURE__ */ T("p", {
283
+ }), e.name && /* @__PURE__ */ C("p", {
283
284
  className: "text-xs text-text-secondary",
284
285
  children: e.name
285
- })] }), /* @__PURE__ */ T("button", {
286
+ })] }), /* @__PURE__ */ C("button", {
286
287
  type: "button",
287
- onClick: () => le(e.id),
288
+ onClick: () => Z(e.id),
288
289
  className: "p-1 hover:bg-bg-sunken rounded transition-colors",
289
- children: /* @__PURE__ */ T(te, { className: "size-4 text-text-secondary" })
290
+ children: /* @__PURE__ */ C(ae, { className: "size-4 text-text-secondary" })
290
291
  })]
291
292
  }, e.id))
292
- }) : /* @__PURE__ */ T(k, {
293
+ }) : /* @__PURE__ */ C(E, {
293
294
  illustration: "empty-people",
294
- title: C("channel.noRecipientsYet", "No recipients added yet"),
295
- description: C("channel.addRecipientsHint", "Add one or more recipients above to send this message to.")
295
+ title: b("channel.noRecipientsYet", "No recipients added yet"),
296
+ description: b("channel.addRecipientsHint", "Add one or more recipients above to send this message to.")
296
297
  })
297
298
  ]
298
299
  }),
299
- /* @__PURE__ */ E("div", {
300
+ /* @__PURE__ */ w("div", {
300
301
  className: "space-y-3",
301
302
  children: [
302
- /* @__PURE__ */ E("label", {
303
+ /* @__PURE__ */ w("label", {
303
304
  className: "text-sm font-medium",
304
- children: [C("channel.messageContent", "Message Content"), " *"]
305
+ children: [b("channel.messageContent", "Message Content"), " *"]
305
306
  }),
306
- P === "EMAIL" && /* @__PURE__ */ T("input", {
307
+ N === "EMAIL" && /* @__PURE__ */ C("input", {
307
308
  "aria-label": "Subject",
308
309
  type: "text",
309
- value: H,
310
- onChange: (e) => U(e.target.value),
310
+ value: V,
311
+ onChange: (e) => H(e.target.value),
311
312
  placeholder: "Subject",
312
313
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
313
314
  }),
314
- /* @__PURE__ */ T("textarea", {
315
+ /* @__PURE__ */ C(te, {
316
+ value: U,
317
+ onChange: W,
315
318
  "aria-label": "Enter your message...",
316
- value: W,
317
- onChange: (e) => G(e.target.value),
318
319
  placeholder: "Enter your message...",
319
- rows: 6,
320
- className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary resize-none"
320
+ rows: 6
321
321
  })
322
322
  ]
323
323
  }),
324
- /* @__PURE__ */ E("div", {
324
+ /* @__PURE__ */ w("div", {
325
325
  className: "space-y-2",
326
- children: [/* @__PURE__ */ T("label", {
326
+ children: [/* @__PURE__ */ C("label", {
327
327
  className: "text-sm font-medium",
328
- children: C("channel.priority", "Priority")
329
- }), /* @__PURE__ */ T("div", {
328
+ children: b("channel.priority", "Priority")
329
+ }), /* @__PURE__ */ C("div", {
330
330
  className: "flex gap-2",
331
331
  children: [
332
332
  o.Low,
333
333
  o.Medium,
334
334
  o.High,
335
335
  o.Urgent
336
- ].map((e) => /* @__PURE__ */ T("button", {
336
+ ].map((e) => /* @__PURE__ */ C("button", {
337
337
  type: "button",
338
- onClick: () => se(e),
339
- className: `px-4 py-2 rounded-lg border text-sm transition-all ${K === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
338
+ onClick: () => le(e),
339
+ className: `px-4 py-2 rounded-lg border text-sm transition-all ${G === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
340
340
  children: e
341
341
  }, e))
342
342
  })]
343
343
  }),
344
- /* @__PURE__ */ T("div", {
344
+ /* @__PURE__ */ C("div", {
345
345
  className: "flex justify-end pt-4",
346
- children: /* @__PURE__ */ T("button", {
346
+ children: /* @__PURE__ */ C("button", {
347
347
  type: "button",
348
- onClick: de,
349
- disabled: j || !M || I.length === 0 || !W.trim(),
348
+ onClick: fe,
349
+ disabled: A || !j || F.length === 0 || !U.trim(),
350
350
  className: "px-6 py-3 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex items-center gap-2",
351
- children: j ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(g, { className: "size-5 animate-spin" }), C("channel.sending", "Sending...")] }) : /* @__PURE__ */ E(w, { children: [
352
- /* @__PURE__ */ T(x, { className: "size-5 " }),
353
- C("channel.sendTo", "Send to"),
351
+ children: A ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(ie, { className: "size-5 animate-spin" }), b("channel.sending", "Sending...")] }) : /* @__PURE__ */ w(S, { children: [
352
+ /* @__PURE__ */ C(v, { className: "size-5 " }),
353
+ b("channel.sendTo", "Send to"),
354
354
  " ",
355
- I.length,
355
+ F.length,
356
356
  " ",
357
- I.length === 1 ? C("channel.recipient", "recipient") : C("channel.recipients", "recipients")
357
+ F.length === 1 ? b("channel.recipient", "recipient") : b("channel.recipients", "recipients")
358
358
  ] })
359
359
  })
360
360
  })
361
361
  ]
362
- }) : /* @__PURE__ */ E("div", {
362
+ }) : /* @__PURE__ */ w("div", {
363
363
  className: "space-y-6",
364
- children: [/* @__PURE__ */ E(D, {
364
+ children: [/* @__PURE__ */ w(se, {
365
365
  className: "p-4 flex items-center justify-between",
366
- children: [/* @__PURE__ */ E("div", {
366
+ children: [/* @__PURE__ */ w("div", {
367
367
  className: "flex items-center gap-4",
368
- children: [$ === 0 ? /* @__PURE__ */ T(m, { className: "size-8 text-status-success-text" }) : /* @__PURE__ */ T(d, { className: "size-8 text-status-warning-text" }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h2", {
368
+ children: [$ === 0 ? /* @__PURE__ */ C(f, { className: "size-8 text-status-success-text" }) : /* @__PURE__ */ C(u, { className: "size-8 text-status-warning-text" }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h2", {
369
369
  className: "text-lg font-semibold",
370
- children: $ === 0 ? C("channel.allMessagesSent", "All messages sent!") : `${Q} of ${I.length} sent`
371
- }), /* @__PURE__ */ E("p", {
370
+ children: $ === 0 ? b("channel.allMessagesSent", "All messages sent!") : `${Q} of ${F.length} sent`
371
+ }), /* @__PURE__ */ w("p", {
372
372
  className: "text-sm text-text-secondary",
373
373
  children: [
374
374
  Q,
375
375
  " ",
376
- C("channel.successful", "successful"),
376
+ b("channel.successful", "successful"),
377
377
  ", ",
378
378
  $,
379
379
  " ",
380
- C("channel.failed", "failed")
380
+ b("channel.failed", "failed")
381
381
  ]
382
382
  })] })]
383
- }), /* @__PURE__ */ T("button", {
383
+ }), /* @__PURE__ */ C("button", {
384
384
  type: "button",
385
- onClick: ue,
385
+ onClick: de,
386
386
  className: "px-4 py-2 rounded-lg border hover:bg-bg-sunken transition-colors",
387
- children: C("channel.sendAnother", "Send Another")
387
+ children: b("channel.sendAnother", "Send Another")
388
388
  })]
389
- }), /* @__PURE__ */ T(O, {
389
+ }), /* @__PURE__ */ C(T, {
390
390
  treatment: "plain",
391
391
  className: "border-border-seam rounded-lg p-0 divide-y divide-[var(--color-border-seam)] overflow-hidden",
392
- children: q.map((e) => {
393
- let t = I.find((t) => t.id === e.recipientId);
394
- return /* @__PURE__ */ E("div", {
392
+ children: K.map((e) => {
393
+ let t = F.find((t) => t.id === e.recipientId);
394
+ return /* @__PURE__ */ w("div", {
395
395
  className: "p-4 flex items-center justify-between",
396
- children: [/* @__PURE__ */ E("div", { children: [
397
- /* @__PURE__ */ T("p", {
396
+ children: [/* @__PURE__ */ w("div", { children: [
397
+ /* @__PURE__ */ C("p", {
398
398
  className: "text-sm font-medium",
399
399
  children: t?.address
400
400
  }),
401
- t?.name && /* @__PURE__ */ T("p", {
401
+ t?.name && /* @__PURE__ */ C("p", {
402
402
  className: "text-xs text-text-secondary",
403
403
  children: t.name
404
404
  }),
405
- e.messageId && /* @__PURE__ */ T("p", {
405
+ e.messageId && /* @__PURE__ */ C("p", {
406
406
  className: "text-xs text-text-secondary font-mono",
407
407
  children: e.messageId
408
408
  }),
409
- e.error && /* @__PURE__ */ T("p", {
409
+ e.error && /* @__PURE__ */ C("p", {
410
410
  className: "text-xs text-status-error-text",
411
411
  children: e.error
412
412
  })
413
- ] }), e.success ? /* @__PURE__ */ T(m, { className: "size-5 text-status-success-text" }) : /* @__PURE__ */ T(ne, { className: "size-5 text-status-error-text" })]
413
+ ] }), e.success ? /* @__PURE__ */ C(f, { className: "size-5 text-status-success-text" }) : /* @__PURE__ */ C(oe, { className: "size-5 text-status-error-text" })]
414
414
  }, e.recipientId);
415
415
  })
416
416
  })]
@@ -420,6 +420,6 @@ function A() {
420
420
  });
421
421
  }
422
422
  //#endregion
423
- export { A as SendMessagePage };
423
+ export { k as SendMessagePage };
424
424
 
425
425
  //# sourceMappingURL=SendMessagePage.js.map