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