@burdenoff/microfe-channel 2026.624.1 → 2026.624.3

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,13 +6,14 @@ import { AUTH_TYPE_I18N as ee, HEALTH_I18N as te, PLATFORM_I18N as ne, STATUS_I1
6
6
  import { AdapterCredentialsForm as ie, CredentialValidationStatus as ae } from "../../../components/AdapterCredentialsForm.js";
7
7
  import { useEffect as oe, useState as o } from "react";
8
8
  import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
- import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as me, Plus as he, Power as ge, PowerOff as h, Radio as _e, RefreshCw as ve, Save as ye, Send as g, Trash2 as be, Truck as _, Users as xe, X as v, XCircle as y } from "lucide-react";
10
- import { useLocation as Se, useNavigate as Ce, useParams as we } from "react-router-dom";
11
- import { usePermissions as Te } from "@burdenoff/fe-libs/shared/providers/shell";
12
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
13
- import { TagBadge as Ee } from "@burdenoff/fe-libs/tag";
9
+ import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as h, Plus as me, Power as he, PowerOff as g, Radio as ge, RefreshCw as _, Save as v, Send as y, Trash2 as _e, Truck as ve, Users as ye, X as be, XCircle as b } from "lucide-react";
10
+ import { useLocation as xe, useNavigate as Se, useParams as Ce } from "react-router-dom";
11
+ import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
12
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
13
+ import { TagBadge as Te } from "@burdenoff/fe-libs/tag";
14
+ import { ResponsiveDialog as Ee, ResponsiveDialogContent as De, ResponsiveDialogHeader as Oe, ResponsiveDialogTitle as C } from "@burdenoff/fe-libs/ui";
14
15
  //#region src/channel/modules/channels/pages/ChannelDetailsPage.tsx
15
- var S = {
16
+ var w = {
16
17
  EMAIL: {
17
18
  label: "Email",
18
19
  color: "bg-accent-blue-subtle text-accent-blue"
@@ -53,7 +54,7 @@ var S = {
53
54
  label: "Webchat",
54
55
  color: "bg-accent-teal-subtle text-accent-teal"
55
56
  }
56
- }, C = {
57
+ }, T = {
57
58
  ACTIVE: {
58
59
  label: "Active",
59
60
  color: "text-status-success-text bg-status-success-bg-subtle",
@@ -62,12 +63,12 @@ var S = {
62
63
  INACTIVE: {
63
64
  label: "Inactive",
64
65
  color: "text-text-secondary bg-bg-sunken",
65
- icon: h
66
+ icon: g
66
67
  },
67
68
  ERROR: {
68
69
  label: "Error",
69
70
  color: "text-status-error-text bg-status-error-bg-subtle",
70
- icon: y
71
+ icon: b
71
72
  },
72
73
  SUSPENDED: {
73
74
  label: "Suspended",
@@ -77,9 +78,9 @@ var S = {
77
78
  ARCHIVED: {
78
79
  label: "Archived",
79
80
  color: "text-text-secondary bg-bg-sunken",
80
- icon: h
81
+ icon: g
81
82
  }
82
- }, w = {
83
+ }, E = {
83
84
  HEALTHY: {
84
85
  label: "Healthy",
85
86
  color: "text-status-success-text",
@@ -93,7 +94,7 @@ var S = {
93
94
  UNHEALTHY: {
94
95
  label: "Unhealthy",
95
96
  color: "text-status-error-text",
96
- icon: y
97
+ icon: b
97
98
  },
98
99
  UNKNOWN: {
99
100
  label: "Unknown",
@@ -101,95 +102,95 @@ var S = {
101
102
  icon: f
102
103
  }
103
104
  };
104
- function T() {
105
- let { channelId: c } = we(), f = Ce(), T = Se(), { hasPermission: E } = Te(), D = E(i.CHANNEL_UPDATE), De = E(i.CHANNEL_CONNECTION_CREATE), Oe = E(i.CHANNEL_CONNECTION_UPDATE), { t: ke } = se(), O = (e, t) => {
106
- let n = ke(e);
105
+ function D() {
106
+ let { channelId: c } = Ce(), f = Se(), D = xe(), { hasPermission: O } = we(), ke = O(i.CHANNEL_UPDATE), Ae = O(i.CHANNEL_CONNECTION_CREATE), je = O(i.CHANNEL_CONNECTION_UPDATE), { t: Me } = se(), k = (e, t) => {
107
+ let n = Me(e);
107
108
  return n === e ? t : n;
108
- }, k = T.state, [A, j] = o(null), [M, N] = o(k?.showCredentialsForm || !1), [P, F] = o(k?.pendingCredentials || {}), [Ae, I] = o(!1), [L, R] = o(null), [je, z] = o(!1), [B, V] = o(""), [H, Me] = o(() => O("channel.testNotificationSubject", "Test Notification")), [U, Ne] = o(() => O("channel.testNotificationBody", "This is a test notification from Burdenoff Channel Service.")), [W, G] = o(null);
109
+ }, A = D.state, [j, M] = o(null), [N, P] = o(A?.showCredentialsForm || !1), [F, I] = o(A?.pendingCredentials || {}), [Ne, L] = o(!1), [R, z] = o(null), [Pe, B] = o(!1), [V, H] = o(""), [U, Fe] = o(() => k("channel.testNotificationSubject", "Test Notification")), [W, Ie] = o(() => k("channel.testNotificationBody", "This is a test notification from Burdenoff Channel Service.")), [G, K] = o(null);
109
110
  oe(() => {
110
- (k?.pendingCredentials || k?.showCredentialsForm) && f(T.pathname, {
111
+ (A?.pendingCredentials || A?.showCredentialsForm) && f(D.pathname, {
111
112
  replace: !0,
112
113
  state: null
113
114
  });
114
115
  }, []);
115
- let { channel: K, isLoading: Pe, error: q, updateChannel: Fe, runHealthCheck: Ie, createConnection: Le, updateConnection: Re, deleteConnection: ze, testConnection: Be, sendTestNotification: Ve } = n(c), He = async () => {
116
- j("health");
116
+ let { channel: q, isLoading: Le, error: J, updateChannel: Re, runHealthCheck: ze, createConnection: Be, updateConnection: Ve, deleteConnection: He, testConnection: Ue, sendTestNotification: We } = n(c), Ge = async () => {
117
+ M("health");
117
118
  try {
118
- await Ie();
119
+ await ze();
119
120
  } catch (e) {
120
121
  console.error("[channel] Failed to run health check", e);
121
122
  } finally {
122
- j(null);
123
+ M(null);
123
124
  }
124
- }, Ue = async () => {
125
- if (K) {
126
- j("status");
125
+ }, Ke = async () => {
126
+ if (q) {
127
+ M("status");
127
128
  try {
128
- await Fe({ status: K.status === "ACTIVE" ? "INACTIVE" : "ACTIVE" });
129
+ await Re({ status: q.status === "ACTIVE" ? "INACTIVE" : "ACTIVE" });
129
130
  } catch (e) {
130
131
  console.error("[channel] Failed to toggle channel status", e);
131
132
  } finally {
132
- j(null);
133
+ M(null);
133
134
  }
134
135
  }
135
- }, We = async () => {
136
- if (K) {
137
- j("connection");
136
+ }, qe = async () => {
137
+ if (q) {
138
+ M("connection");
138
139
  try {
139
- let e = "API_KEY", t = K.adapterType;
140
- t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await Le({
140
+ let e = "API_KEY", t = q.adapterType;
141
+ t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await Be({
141
142
  authType: e,
142
- credentials: P
143
- }), N(!1), F({}), I(!1);
143
+ credentials: F
144
+ }), P(!1), I({}), L(!1);
144
145
  } catch (e) {
145
146
  console.error("[channel] Failed to create connection", e);
146
147
  } finally {
147
- j(null);
148
+ M(null);
148
149
  }
149
150
  }
150
- }, Ge = async (e) => {
151
- j("connection");
151
+ }, Je = async (e) => {
152
+ M("connection");
152
153
  try {
153
- await Re(e, { credentials: P }), N(!1), F({}), I(!1);
154
+ await Ve(e, { credentials: F }), P(!1), I({}), L(!1);
154
155
  } catch (e) {
155
156
  console.error("[channel] Failed to update connection", e);
156
157
  } finally {
157
- j(null);
158
+ M(null);
158
159
  }
159
- }, Ke = async (n) => {
160
- e("medium"), j("delete-connection");
160
+ }, Ye = async (n) => {
161
+ e("medium"), M("delete-connection");
161
162
  try {
162
- await ze(n), t("success");
163
+ await He(n), t("success");
163
164
  } catch (e) {
164
165
  t("error"), console.error("[channel] Failed to delete connection", e);
165
166
  } finally {
166
- j(null);
167
+ M(null);
167
168
  }
168
- }, qe = async (e) => {
169
- j("test"), R(null);
169
+ }, Xe = async (e) => {
170
+ M("test"), z(null);
170
171
  try {
171
- let t = await Be(e);
172
- t && R({
172
+ let t = await Ue(e);
173
+ t && z({
173
174
  success: t.success,
174
- message: t.message || (t.success ? O("channel.connectionTestSuccess", "Connection successful!") : O("channel.connectionTestFailed", "Connection failed"))
175
+ message: t.message || (t.success ? k("channel.connectionTestSuccess", "Connection successful!") : k("channel.connectionTestFailed", "Connection failed"))
175
176
  });
176
177
  } catch (e) {
177
- console.error("[channel] Failed to test connection", e), R({
178
+ console.error("[channel] Failed to test connection", e), z({
178
179
  success: !1,
179
- message: O("channel.connectionTestRequestFailed", "Failed to test connection")
180
+ message: k("channel.connectionTestRequestFailed", "Failed to test connection")
180
181
  });
181
182
  } finally {
182
- j(null);
183
+ M(null);
183
184
  }
184
- }, Je = async () => {
185
- if (B.trim()) {
186
- j("send-test"), G(null);
185
+ }, Ze = async () => {
186
+ if (V.trim()) {
187
+ M("send-test"), K(null);
187
188
  try {
188
- let e = K?.platform === "EMAIL" ? {
189
- subject: H,
190
- html: `<p>${U}</p>`
191
- } : void 0, t = await Ve(B.trim(), U, e);
192
- t && G({
189
+ let e = q?.platform === "EMAIL" ? {
190
+ subject: U,
191
+ html: `<p>${W}</p>`
192
+ } : void 0, t = await We(V.trim(), W, e);
193
+ t && K({
193
194
  success: t.success,
194
195
  messageId: t.messageId,
195
196
  externalId: t.externalId,
@@ -202,8 +203,8 @@ function T() {
202
203
  } : null
203
204
  });
204
205
  } catch (e) {
205
- let t = e instanceof Error ? e.message : O("channel.sendTestNotificationFailed", "Failed to send test notification");
206
- console.error("[channel] Failed to send test notification", e), G({
206
+ let t = e instanceof Error ? e.message : k("channel.sendTestNotificationFailed", "Failed to send test notification");
207
+ console.error("[channel] Failed to send test notification", e), K({
207
208
  success: !1,
208
209
  error: {
209
210
  code: "SEND_FAILED",
@@ -212,387 +213,387 @@ function T() {
212
213
  }
213
214
  });
214
215
  } finally {
215
- j(null);
216
+ M(null);
216
217
  }
217
218
  }
218
- }, J = (e) => {
219
+ }, Y = (e) => {
219
220
  switch (e) {
220
- case "EMAIL": return O("channel.recipientPlaceholder.email", "email@example.com");
221
- case "SMS": return O("channel.recipientPlaceholder.phone", "+1234567890");
222
- case "PUSH": return O("channel.recipientPlaceholder.deviceToken", "Device token");
223
- case "SLACK": return O("channel.recipientPlaceholder.slack", "Channel ID or User ID");
224
- case "TEAMS": return O("channel.recipientPlaceholder.channelId", "Channel ID");
225
- case "DISCORD": return O("channel.recipientPlaceholder.channelId", "Channel ID");
226
- case "WHATSAPP": return O("channel.recipientPlaceholder.phone", "+1234567890");
227
- default: return O("channel.recipientPlaceholder.default", "Recipient");
221
+ case "EMAIL": return k("channel.recipientPlaceholder.email", "email@example.com");
222
+ case "SMS": return k("channel.recipientPlaceholder.phone", "+1234567890");
223
+ case "PUSH": return k("channel.recipientPlaceholder.deviceToken", "Device token");
224
+ case "SLACK": return k("channel.recipientPlaceholder.slack", "Channel ID or User ID");
225
+ case "TEAMS": return k("channel.recipientPlaceholder.channelId", "Channel ID");
226
+ case "DISCORD": return k("channel.recipientPlaceholder.channelId", "Channel ID");
227
+ case "WHATSAPP": return k("channel.recipientPlaceholder.phone", "+1234567890");
228
+ default: return k("channel.recipientPlaceholder.default", "Recipient");
228
229
  }
229
- }, Y = (e) => {
230
+ }, Qe = (e) => {
230
231
  switch (e) {
231
- case "EMAIL": return O("channel.recipientLabel.email", "Email Address");
232
+ case "EMAIL": return k("channel.recipientLabel.email", "Email Address");
232
233
  case "SMS":
233
- case "WHATSAPP": return O("channel.recipientLabel.phone", "Phone Number");
234
- case "PUSH": return O("channel.recipientLabel.deviceToken", "Device Token");
234
+ case "WHATSAPP": return k("channel.recipientLabel.phone", "Phone Number");
235
+ case "PUSH": return k("channel.recipientLabel.deviceToken", "Device Token");
235
236
  case "SLACK":
236
237
  case "TEAMS":
237
- case "DISCORD": return O("channel.recipientLabel.channelOrUserId", "Channel/User ID");
238
- default: return O("channel.recipientLabel.default", "Recipient");
238
+ case "DISCORD": return k("channel.recipientLabel.channelOrUserId", "Channel/User ID");
239
+ default: return k("channel.recipientLabel.default", "Recipient");
239
240
  }
240
- }, Ye = (e) => ({
241
- ...S[e] || {
241
+ }, $e = (e) => ({
242
+ ...w[e] || {
242
243
  label: e,
243
244
  color: "bg-bg-sunken text-text-secondary"
244
245
  },
245
- label: a(e, ne, O)
246
- }), Xe = (e) => ({
247
- ...C[e] || C.INACTIVE,
248
- label: a(e, re, O)
249
- }), Ze = (e) => ({
250
- ...w[e] || w.UNKNOWN,
251
- label: a(e, te, O)
246
+ label: a(e, ne, k)
247
+ }), et = (e) => ({
248
+ ...T[e] || T.INACTIVE,
249
+ label: a(e, re, k)
250
+ }), tt = (e) => ({
251
+ ...E[e] || E.UNKNOWN,
252
+ label: a(e, te, k)
252
253
  });
253
- if (Pe) return /* @__PURE__ */ b("div", {
254
+ if (Le) return /* @__PURE__ */ x("div", {
254
255
  className: "flex items-center justify-center min-h-screen",
255
- children: /* @__PURE__ */ b(p, {
256
+ children: /* @__PURE__ */ x(p, {
256
257
  size: 32,
257
258
  className: "animate-spin text-accent-primary"
258
259
  })
259
260
  });
260
- if (q || !K) return /* @__PURE__ */ b("div", {
261
+ if (J || !q) return /* @__PURE__ */ x("div", {
261
262
  className: "p-6",
262
- children: /* @__PURE__ */ x("div", {
263
+ children: /* @__PURE__ */ S("div", {
263
264
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
264
265
  children: [
265
- /* @__PURE__ */ b(s, {
266
+ /* @__PURE__ */ x(s, {
266
267
  size: 20,
267
268
  className: "text-status-error-text"
268
269
  }),
269
- /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b("p", {
270
+ /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x("p", {
270
271
  className: "text-sm font-medium text-status-error-text",
271
- children: q || O("channel.channelNotFound", "Channel not found")
272
+ children: J || k("channel.channelNotFound", "Channel not found")
272
273
  }) }),
273
- /* @__PURE__ */ b("button", {
274
+ /* @__PURE__ */ x("button", {
274
275
  type: "button",
275
276
  onClick: () => f(-1),
276
277
  className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
277
- children: O("channel.goBack", "Go Back")
278
+ children: k("channel.goBack", "Go Back")
278
279
  })
279
280
  ]
280
281
  })
281
282
  });
282
- let X = Ye(K.platform), Z = Xe(K.status), Q = Ze(K.connectionHealth), Qe = Z.icon, $e = Q.icon, $ = K.connection;
283
- return /* @__PURE__ */ b(r, {
283
+ let X = $e(q.platform), Z = et(q.status), Q = tt(q.connectionHealth), nt = Z.icon, rt = Q.icon, $ = q.connection;
284
+ return /* @__PURE__ */ x(r, {
284
285
  permission: i.CHANNEL_READ,
285
- children: /* @__PURE__ */ x("div", {
286
+ children: /* @__PURE__ */ S("div", {
286
287
  className: "space-y-6 p-3 sm:p-6",
287
288
  children: [
288
- /* @__PURE__ */ x("div", {
289
+ /* @__PURE__ */ S("div", {
289
290
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
290
- children: [/* @__PURE__ */ x("div", {
291
+ children: [/* @__PURE__ */ S("div", {
291
292
  className: "flex items-center gap-3",
292
- children: [/* @__PURE__ */ b("button", {
293
+ children: [/* @__PURE__ */ x("button", {
293
294
  type: "button",
294
295
  onClick: () => f(-1),
295
296
  className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
296
- children: /* @__PURE__ */ b(ce, { size: 20 })
297
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
297
+ children: /* @__PURE__ */ x(ce, { size: 20 })
298
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
298
299
  className: "flex items-center gap-2",
299
- children: [/* @__PURE__ */ b(_e, {
300
+ children: [/* @__PURE__ */ x(ge, {
300
301
  size: 24,
301
302
  className: "text-accent-primary"
302
- }), /* @__PURE__ */ b("h1", {
303
+ }), /* @__PURE__ */ x("h1", {
303
304
  className: "text-xl sm:text-2xl font-bold text-text-primary",
304
- children: K.name
305
+ children: q.name
305
306
  })]
306
- }), K.description && /* @__PURE__ */ b("p", {
307
+ }), q.description && /* @__PURE__ */ x("p", {
307
308
  className: "text-sm text-text-secondary mt-1",
308
- children: K.description
309
+ children: q.description
309
310
  })] })]
310
- }), /* @__PURE__ */ x("div", {
311
+ }), /* @__PURE__ */ S("div", {
311
312
  className: "flex items-center gap-2",
312
313
  children: [
313
- /* @__PURE__ */ b(r, {
314
+ /* @__PURE__ */ x(r, {
314
315
  permission: i.CHANNEL_EXECUTE,
315
- children: /* @__PURE__ */ x("button", {
316
+ children: /* @__PURE__ */ S("button", {
316
317
  type: "button",
317
- onClick: He,
318
- disabled: A === "health",
318
+ onClick: Ge,
319
+ disabled: j === "health",
319
320
  className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
320
- children: [A === "health" ? /* @__PURE__ */ b(p, {
321
+ children: [j === "health" ? /* @__PURE__ */ x(p, {
321
322
  size: 16,
322
323
  className: "animate-spin"
323
- }) : /* @__PURE__ */ b(ve, { size: 16 }), O("channel.healthCheck", "Health Check")]
324
+ }) : /* @__PURE__ */ x(_, { size: 16 }), k("channel.healthCheck", "Health Check")]
324
325
  })
325
326
  }),
326
- /* @__PURE__ */ b(r, {
327
+ /* @__PURE__ */ x(r, {
327
328
  permission: i.CHANNEL_UPDATE,
328
- children: /* @__PURE__ */ x("button", {
329
+ children: /* @__PURE__ */ S("button", {
329
330
  type: "button",
330
- onClick: Ue,
331
- disabled: A === "status",
332
- className: `flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors disabled:opacity-50 ${K.status === "ACTIVE" ? "text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-status-success-text hover:bg-status-success-bg-subtle"}`,
333
- children: [A === "status" ? /* @__PURE__ */ b(p, {
331
+ onClick: Ke,
332
+ disabled: j === "status",
333
+ className: `flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors disabled:opacity-50 ${q.status === "ACTIVE" ? "text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-status-success-text hover:bg-status-success-bg-subtle"}`,
334
+ children: [j === "status" ? /* @__PURE__ */ x(p, {
334
335
  size: 16,
335
336
  className: "animate-spin"
336
- }) : K.status === "ACTIVE" ? /* @__PURE__ */ b(h, { size: 16 }) : /* @__PURE__ */ b(ge, { size: 16 }), K.status === "ACTIVE" ? O("channel.deactivate", "Deactivate") : O("channel.activate", "Activate")]
337
+ }) : q.status === "ACTIVE" ? /* @__PURE__ */ x(g, { size: 16 }) : /* @__PURE__ */ x(he, { size: 16 }), q.status === "ACTIVE" ? k("channel.deactivate", "Deactivate") : k("channel.activate", "Activate")]
337
338
  })
338
339
  }),
339
- /* @__PURE__ */ x("button", {
340
+ /* @__PURE__ */ S("button", {
340
341
  type: "button",
341
342
  onClick: () => {
342
- z(!0), G(null), V("");
343
+ B(!0), K(null), H("");
343
344
  },
344
- disabled: !K.connection,
345
+ disabled: !q.connection,
345
346
  className: "flex items-center gap-2 px-3 py-2 text-sm text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
346
- title: K.connection ? O("channel.sendTestNotification", "Send test notification") : O("channel.configureCredentialsFirst", "Configure credentials first"),
347
- children: [/* @__PURE__ */ b(g, { size: 16 }), O("channel.testChannel", "Test Channel")]
347
+ title: q.connection ? k("channel.sendTestNotification", "Send test notification") : k("channel.configureCredentialsFirst", "Configure credentials first"),
348
+ children: [/* @__PURE__ */ x(y, { size: 16 }), k("channel.testChannel", "Test Channel")]
348
349
  }),
349
- D && /* @__PURE__ */ x("button", {
350
+ ke && /* @__PURE__ */ S("button", {
350
351
  type: "button",
351
352
  onClick: () => f("./edit"),
352
353
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors shadow-sm",
353
- children: [/* @__PURE__ */ b(m, { size: 16 }), O("channel.edit", "Edit")]
354
+ children: [/* @__PURE__ */ x(m, { size: 16 }), k("channel.edit", "Edit")]
354
355
  })
355
356
  ]
356
357
  })]
357
358
  }),
358
- /* @__PURE__ */ x("div", {
359
+ /* @__PURE__ */ S("div", {
359
360
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
360
361
  children: [
361
- /* @__PURE__ */ x("div", {
362
+ /* @__PURE__ */ S("div", {
362
363
  className: "p-4 bg-surface border border-border-subtle rounded-lg",
363
- children: [/* @__PURE__ */ b("p", {
364
+ children: [/* @__PURE__ */ x("p", {
364
365
  className: "text-xs text-text-secondary mb-1",
365
- children: O("channel.platform", "Platform")
366
- }), /* @__PURE__ */ b("span", {
366
+ children: k("channel.platform", "Platform")
367
+ }), /* @__PURE__ */ x("span", {
367
368
  className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${X.color}`,
368
369
  children: X.label
369
370
  })]
370
371
  }),
371
- /* @__PURE__ */ x("div", {
372
+ /* @__PURE__ */ S("div", {
372
373
  className: "p-4 bg-surface border border-border-subtle rounded-lg",
373
- children: [/* @__PURE__ */ b("p", {
374
+ children: [/* @__PURE__ */ x("p", {
374
375
  className: "text-xs text-text-secondary mb-1",
375
- children: O("channel.status", "Status")
376
- }), /* @__PURE__ */ x("div", {
376
+ children: k("channel.status", "Status")
377
+ }), /* @__PURE__ */ S("div", {
377
378
  className: "flex items-center gap-2",
378
- children: [/* @__PURE__ */ b(Qe, {
379
+ children: [/* @__PURE__ */ x(nt, {
379
380
  size: 16,
380
381
  className: Z.color.split(" ")[0]
381
- }), /* @__PURE__ */ b("span", {
382
+ }), /* @__PURE__ */ x("span", {
382
383
  className: `px-2 py-1 text-sm font-medium rounded-full ${Z.color}`,
383
384
  children: Z.label
384
385
  })]
385
386
  })]
386
387
  }),
387
- /* @__PURE__ */ x("div", {
388
+ /* @__PURE__ */ S("div", {
388
389
  className: "p-4 bg-surface border border-border-subtle rounded-lg",
389
390
  children: [
390
- /* @__PURE__ */ b("p", {
391
+ /* @__PURE__ */ x("p", {
391
392
  className: "text-xs text-text-secondary mb-1",
392
- children: O("channel.connectionHealth", "Connection Health")
393
+ children: k("channel.connectionHealth", "Connection Health")
393
394
  }),
394
- /* @__PURE__ */ x("div", {
395
+ /* @__PURE__ */ S("div", {
395
396
  className: "flex items-center gap-2",
396
- children: [/* @__PURE__ */ b($e, {
397
+ children: [/* @__PURE__ */ x(rt, {
397
398
  size: 16,
398
399
  className: Q.color
399
- }), /* @__PURE__ */ b("span", {
400
+ }), /* @__PURE__ */ x("span", {
400
401
  className: `text-sm font-medium ${Q.color}`,
401
402
  children: Q.label
402
403
  })]
403
404
  }),
404
- K.lastHealthCheckAt && /* @__PURE__ */ x("p", {
405
+ q.lastHealthCheckAt && /* @__PURE__ */ S("p", {
405
406
  className: "text-xs text-text-secondary mt-1",
406
407
  children: [
407
- O("channel.lastCheck", "Last check"),
408
+ k("channel.lastCheck", "Last check"),
408
409
  ":",
409
410
  " ",
410
- new Date(K.lastHealthCheckAt).toLocaleString()
411
+ new Date(q.lastHealthCheckAt).toLocaleString()
411
412
  ]
412
413
  })
413
414
  ]
414
415
  }),
415
- /* @__PURE__ */ x("div", {
416
+ /* @__PURE__ */ S("div", {
416
417
  className: "p-4 bg-surface border border-border-subtle rounded-lg",
417
- children: [/* @__PURE__ */ b("p", {
418
+ children: [/* @__PURE__ */ x("p", {
418
419
  className: "text-xs text-text-secondary mb-1",
419
- children: O("channel.connection", "Connection")
420
- }), /* @__PURE__ */ x("div", {
420
+ children: k("channel.connection", "Connection")
421
+ }), /* @__PURE__ */ S("div", {
421
422
  className: "flex items-center gap-2",
422
- children: [/* @__PURE__ */ b(u, {
423
+ children: [/* @__PURE__ */ x(u, {
423
424
  size: 16,
424
- className: K.isConnected ? "text-status-success-text" : "text-text-secondary"
425
- }), /* @__PURE__ */ b("span", {
426
- className: `text-sm font-medium ${K.isConnected ? "text-status-success-text" : "text-text-secondary"}`,
427
- children: K.isConnected ? O("channel.connected", "Connected") : O("channel.notConnected", "Not Connected")
425
+ className: q.isConnected ? "text-status-success-text" : "text-text-secondary"
426
+ }), /* @__PURE__ */ x("span", {
427
+ className: `text-sm font-medium ${q.isConnected ? "text-status-success-text" : "text-text-secondary"}`,
428
+ children: q.isConnected ? k("channel.connected", "Connected") : k("channel.notConnected", "Not Connected")
428
429
  })]
429
430
  })]
430
431
  })
431
432
  ]
432
433
  }),
433
- /* @__PURE__ */ x("div", {
434
+ /* @__PURE__ */ S("div", {
434
435
  className: "p-4 bg-surface border border-border-subtle rounded-lg",
435
436
  children: [
436
- /* @__PURE__ */ b("h2", {
437
+ /* @__PURE__ */ x("h2", {
437
438
  className: "text-lg font-semibold text-text-primary mb-4",
438
- children: O("channel.channelDetails", "Channel Details")
439
+ children: k("channel.channelDetails", "Channel Details")
439
440
  }),
440
- /* @__PURE__ */ x("div", {
441
+ /* @__PURE__ */ S("div", {
441
442
  className: "grid gap-4 sm:grid-cols-2",
442
443
  children: [
443
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
444
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
444
445
  className: "text-xs text-text-secondary",
445
- children: O("channel.adapterType", "Adapter Type")
446
- }), /* @__PURE__ */ b("p", {
446
+ children: k("channel.adapterType", "Adapter Type")
447
+ }), /* @__PURE__ */ x("p", {
447
448
  className: "text-sm font-medium text-text-primary",
448
- children: K.adapterType?.replace(/_/g, " ") || O("channel.notConfigured", "Not configured")
449
+ children: q.adapterType?.replace(/_/g, " ") || k("channel.notConfigured", "Not configured")
449
450
  })] }),
450
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
451
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
451
452
  className: "text-xs text-text-secondary",
452
- children: O("channel.priority", "Priority")
453
- }), /* @__PURE__ */ b("p", {
453
+ children: k("channel.priority", "Priority")
454
+ }), /* @__PURE__ */ x("p", {
454
455
  className: "text-sm font-medium text-text-primary",
455
- children: K.priority
456
+ children: q.priority
456
457
  })] }),
457
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
458
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
458
459
  className: "text-xs text-text-secondary",
459
- children: O("channel.consecutiveFailures", "Consecutive Failures")
460
- }), /* @__PURE__ */ b("p", {
461
- className: "text-sm font-medium text-text-primary",
462
- children: K.consecutiveFailures
460
+ children: k("channel.consecutiveFailures", "Consecutive Failures")
461
+ }), /* @__PURE__ */ x("p", {
462
+ className: "text-sm font-medium text-text-primary tabular-nums",
463
+ children: q.consecutiveFailures
463
464
  })] }),
464
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
465
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
465
466
  className: "text-xs text-text-secondary",
466
- children: O("channel.messages24h", "Messages (24h)")
467
- }), /* @__PURE__ */ b("p", {
468
- className: "text-sm font-medium text-text-primary",
469
- children: K.messageCount24h
467
+ children: k("channel.messages24h", "Messages (24h)")
468
+ }), /* @__PURE__ */ x("p", {
469
+ className: "text-sm font-medium text-text-primary tabular-nums",
470
+ children: q.messageCount24h
470
471
  })] }),
471
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
472
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
472
473
  className: "text-xs text-text-secondary",
473
- children: O("channel.createdAt", "Created At")
474
- }), /* @__PURE__ */ b("p", {
474
+ children: k("channel.createdAt", "Created At")
475
+ }), /* @__PURE__ */ x("p", {
475
476
  className: "text-sm font-medium text-text-primary",
476
- children: new Date(K.createdAt).toLocaleString()
477
+ children: new Date(q.createdAt).toLocaleString()
477
478
  })] }),
478
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
479
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
479
480
  className: "text-xs text-text-secondary",
480
- children: O("channel.updatedAt", "Updated At")
481
- }), /* @__PURE__ */ b("p", {
481
+ children: k("channel.updatedAt", "Updated At")
482
+ }), /* @__PURE__ */ x("p", {
482
483
  className: "text-sm font-medium text-text-primary",
483
- children: new Date(K.updatedAt).toLocaleString()
484
+ children: new Date(q.updatedAt).toLocaleString()
484
485
  })] })
485
486
  ]
486
487
  }),
487
- K.tagAssignments && K.tagAssignments.length > 0 && /* @__PURE__ */ x("div", {
488
+ q.tagAssignments && q.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
488
489
  className: "mt-4",
489
- children: [/* @__PURE__ */ b("p", {
490
+ children: [/* @__PURE__ */ x("p", {
490
491
  className: "text-xs text-text-secondary mb-1.5",
491
- children: O("channel.tags", "Tags")
492
- }), /* @__PURE__ */ b("div", {
492
+ children: k("channel.tags", "Tags")
493
+ }), /* @__PURE__ */ x("div", {
493
494
  className: "flex flex-wrap gap-1.5",
494
495
  "aria-label": "Channel tags",
495
- children: K.tagAssignments.map((e) => /* @__PURE__ */ b(Ee, {
496
+ children: q.tagAssignments.map((e) => /* @__PURE__ */ x(Te, {
496
497
  id: e.tagId,
497
498
  label: e.tagId,
498
499
  size: "md"
499
500
  }, e.id))
500
501
  })]
501
502
  }),
502
- K.healthCheckError && /* @__PURE__ */ x("div", {
503
+ q.healthCheckError && /* @__PURE__ */ S("div", {
503
504
  className: "mt-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
504
- children: [/* @__PURE__ */ b("p", {
505
+ children: [/* @__PURE__ */ x("p", {
505
506
  className: "text-xs text-status-error-text font-medium",
506
- children: O("channel.lastHealthCheckError", "Last Health Check Error")
507
- }), /* @__PURE__ */ b("p", {
507
+ children: k("channel.lastHealthCheckError", "Last Health Check Error")
508
+ }), /* @__PURE__ */ x("p", {
508
509
  className: "text-sm text-status-error-text",
509
- children: K.healthCheckError
510
+ children: q.healthCheckError
510
511
  })]
511
512
  })
512
513
  ]
513
514
  }),
514
- /* @__PURE__ */ x("div", {
515
+ /* @__PURE__ */ S("div", {
515
516
  className: "grid gap-3 sm:grid-cols-3",
516
517
  children: [
517
- /* @__PURE__ */ x("button", {
518
+ /* @__PURE__ */ S("button", {
518
519
  type: "button",
519
520
  onClick: () => f("./deliveries"),
520
521
  className: "flex items-center gap-3 p-3 bg-surface border border-border-subtle rounded-lg hover:bg-action-primary-bg/10 transition-colors text-left",
521
522
  children: [
522
- /* @__PURE__ */ b("div", {
523
+ /* @__PURE__ */ x("div", {
523
524
  className: "p-2 bg-accent-orange/10 rounded-lg",
524
- children: /* @__PURE__ */ b(_, {
525
+ children: /* @__PURE__ */ x(ve, {
525
526
  size: 18,
526
527
  className: "text-accent-orange"
527
528
  })
528
529
  }),
529
- /* @__PURE__ */ x("div", {
530
+ /* @__PURE__ */ S("div", {
530
531
  className: "flex-1 min-w-0",
531
- children: [/* @__PURE__ */ b("p", {
532
+ children: [/* @__PURE__ */ x("p", {
532
533
  className: "text-sm font-medium text-text-primary",
533
- children: O("channel.deliveryHistory", "Delivery History")
534
- }), /* @__PURE__ */ b("p", {
534
+ children: k("channel.deliveryHistory", "Delivery History")
535
+ }), /* @__PURE__ */ x("p", {
535
536
  className: "text-xs text-text-secondary truncate",
536
- children: O("channel.viewMessageDeliveries", "View message deliveries")
537
+ children: k("channel.viewMessageDeliveries", "View message deliveries")
537
538
  })]
538
539
  }),
539
- /* @__PURE__ */ b(l, {
540
+ /* @__PURE__ */ x(l, {
540
541
  size: 16,
541
542
  className: "text-text-secondary shrink-0"
542
543
  })
543
544
  ]
544
545
  }),
545
- /* @__PURE__ */ x("button", {
546
+ /* @__PURE__ */ S("button", {
546
547
  type: "button",
547
548
  onClick: () => f("./webhooks"),
548
549
  className: "flex items-center gap-3 p-3 bg-surface border border-border-subtle rounded-lg hover:bg-action-primary-bg/10 transition-colors text-left",
549
550
  children: [
550
- /* @__PURE__ */ b("div", {
551
+ /* @__PURE__ */ x("div", {
551
552
  className: "p-2 bg-accent-purple/10 rounded-lg",
552
- children: /* @__PURE__ */ b(le, {
553
+ children: /* @__PURE__ */ x(le, {
553
554
  size: 18,
554
555
  className: "text-accent-purple"
555
556
  })
556
557
  }),
557
- /* @__PURE__ */ x("div", {
558
+ /* @__PURE__ */ S("div", {
558
559
  className: "flex-1 min-w-0",
559
- children: [/* @__PURE__ */ b("p", {
560
+ children: [/* @__PURE__ */ x("p", {
560
561
  className: "text-sm font-medium text-text-primary",
561
- children: O("channel.webhookEvents", "Webhook Events")
562
- }), /* @__PURE__ */ b("p", {
562
+ children: k("channel.webhookEvents", "Webhook Events")
563
+ }), /* @__PURE__ */ x("p", {
563
564
  className: "text-xs text-text-secondary truncate",
564
- children: O("channel.viewIncomingWebhooks", "View incoming webhooks")
565
+ children: k("channel.viewIncomingWebhooks", "View incoming webhooks")
565
566
  })]
566
567
  }),
567
- /* @__PURE__ */ b(l, {
568
+ /* @__PURE__ */ x(l, {
568
569
  size: 16,
569
570
  className: "text-text-secondary shrink-0"
570
571
  })
571
572
  ]
572
573
  }),
573
- /* @__PURE__ */ x("button", {
574
+ /* @__PURE__ */ S("button", {
574
575
  type: "button",
575
576
  onClick: () => f("./users"),
576
577
  className: "flex items-center gap-3 p-3 bg-surface border border-border-subtle rounded-lg hover:bg-action-primary-bg/10 transition-colors text-left",
577
578
  children: [
578
- /* @__PURE__ */ b("div", {
579
+ /* @__PURE__ */ x("div", {
579
580
  className: "p-2 bg-accent-blue/10 rounded-lg",
580
- children: /* @__PURE__ */ b(xe, {
581
+ children: /* @__PURE__ */ x(ye, {
581
582
  size: 18,
582
583
  className: "text-accent-blue"
583
584
  })
584
585
  }),
585
- /* @__PURE__ */ x("div", {
586
+ /* @__PURE__ */ S("div", {
586
587
  className: "flex-1 min-w-0",
587
- children: [/* @__PURE__ */ b("p", {
588
+ children: [/* @__PURE__ */ x("p", {
588
589
  className: "text-sm font-medium text-text-primary",
589
- children: O("channel.channelUsers", "Channel Users")
590
- }), /* @__PURE__ */ b("p", {
590
+ children: k("channel.channelUsers", "Channel Users")
591
+ }), /* @__PURE__ */ x("p", {
591
592
  className: "text-xs text-text-secondary truncate",
592
- children: O("channel.viewConnectedUsers", "View connected users")
593
+ children: k("channel.viewConnectedUsers", "View connected users")
593
594
  })]
594
595
  }),
595
- /* @__PURE__ */ b(l, {
596
+ /* @__PURE__ */ x(l, {
596
597
  size: 16,
597
598
  className: "text-text-secondary shrink-0"
598
599
  })
@@ -600,365 +601,358 @@ function T() {
600
601
  })
601
602
  ]
602
603
  }),
603
- /* @__PURE__ */ x("div", {
604
+ /* @__PURE__ */ S("div", {
604
605
  className: "p-4 bg-surface border border-border-subtle rounded-lg",
605
606
  children: [
606
- /* @__PURE__ */ x("div", {
607
+ /* @__PURE__ */ S("div", {
607
608
  className: "flex items-center justify-between mb-4",
608
- children: [/* @__PURE__ */ x("div", {
609
+ children: [/* @__PURE__ */ S("div", {
609
610
  className: "flex items-center gap-2",
610
- children: [/* @__PURE__ */ b(ue, {
611
+ children: [/* @__PURE__ */ x(ue, {
611
612
  size: 20,
612
613
  className: "text-accent-primary"
613
- }), /* @__PURE__ */ b("h2", {
614
+ }), /* @__PURE__ */ x("h2", {
614
615
  className: "text-lg font-semibold text-text-primary",
615
- children: O("channel.connectionAndCredentials", "Connection & Credentials")
616
+ children: k("channel.connectionAndCredentials", "Connection & Credentials")
616
617
  })]
617
- }), De && !$ && !M && /* @__PURE__ */ x("button", {
618
+ }), Ae && !$ && !N && /* @__PURE__ */ S("button", {
618
619
  type: "button",
619
- onClick: () => N(!0),
620
+ onClick: () => P(!0),
620
621
  className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
621
- children: [/* @__PURE__ */ b(he, { size: 16 }), O("channel.addCredentials", "Add Credentials")]
622
+ children: [/* @__PURE__ */ x(me, { size: 16 }), k("channel.addCredentials", "Add Credentials")]
622
623
  })]
623
624
  }),
624
- $ && !M && /* @__PURE__ */ x("div", {
625
+ $ && !N && /* @__PURE__ */ S("div", {
625
626
  className: "space-y-4",
626
627
  children: [
627
- /* @__PURE__ */ x("div", {
628
+ /* @__PURE__ */ S("div", {
628
629
  className: "grid gap-4 sm:grid-cols-2",
629
630
  children: [
630
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
631
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
631
632
  className: "text-xs text-text-secondary",
632
- children: O("channel.authType", "Auth Type")
633
- }), /* @__PURE__ */ b("p", {
633
+ children: k("channel.authType", "Auth Type")
634
+ }), /* @__PURE__ */ x("p", {
634
635
  className: "text-sm font-medium text-text-primary",
635
- children: a($.authType, ee, O)
636
+ children: a($.authType, ee, k)
636
637
  })] }),
637
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
638
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
638
639
  className: "text-xs text-text-secondary",
639
- children: O("channel.status", "Status")
640
- }), /* @__PURE__ */ x("div", {
640
+ children: k("channel.status", "Status")
641
+ }), /* @__PURE__ */ S("div", {
641
642
  className: "flex items-center gap-2",
642
- children: [$.isHealthy ? /* @__PURE__ */ b(d, {
643
+ children: [$.isHealthy ? /* @__PURE__ */ x(d, {
643
644
  size: 14,
644
645
  className: "text-status-success-text"
645
- }) : /* @__PURE__ */ b(y, {
646
+ }) : /* @__PURE__ */ x(b, {
646
647
  size: 14,
647
648
  className: "text-status-error-text"
648
- }), /* @__PURE__ */ b("span", {
649
+ }), /* @__PURE__ */ x("span", {
649
650
  className: `text-sm font-medium ${$.isHealthy ? "text-status-success-text" : "text-status-error-text"}`,
650
- children: $.isHealthy ? O("channel.healthy", "Healthy") : O("channel.unhealthy", "Unhealthy")
651
+ children: $.isHealthy ? k("channel.healthy", "Healthy") : k("channel.unhealthy", "Unhealthy")
651
652
  })]
652
653
  })] }),
653
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
654
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
654
655
  className: "text-xs text-text-secondary",
655
- children: O("channel.lastTested", "Last Tested")
656
- }), /* @__PURE__ */ b("p", {
656
+ children: k("channel.lastTested", "Last Tested")
657
+ }), /* @__PURE__ */ x("p", {
657
658
  className: "text-sm font-medium text-text-primary",
658
- children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : O("channel.never", "Never")
659
+ children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : k("channel.never", "Never")
659
660
  })] }),
660
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
661
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
661
662
  className: "text-xs text-text-secondary",
662
- children: O("channel.testStatus", "Test Status")
663
- }), /* @__PURE__ */ b("p", {
663
+ children: k("channel.testStatus", "Test Status")
664
+ }), /* @__PURE__ */ x("p", {
664
665
  className: "text-sm font-medium text-text-primary",
665
- children: $.testStatus || O("channel.notTested", "Not tested")
666
+ children: $.testStatus || k("channel.notTested", "Not tested")
666
667
  })] }),
667
- $.tokenExpiresAt && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
668
+ $.tokenExpiresAt && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
668
669
  className: "text-xs text-text-secondary",
669
- children: O("channel.tokenExpires", "Token Expires")
670
- }), /* @__PURE__ */ x("p", {
670
+ children: k("channel.tokenExpires", "Token Expires")
671
+ }), /* @__PURE__ */ S("p", {
671
672
  className: `text-sm font-medium ${$.needsTokenRefresh ? "text-status-warning-text" : "text-text-primary"}`,
672
- children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ x("span", {
673
+ children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ S("span", {
673
674
  className: "text-xs text-text-secondary ml-1",
674
675
  children: [
675
676
  "(",
676
677
  $.daysUntilExpiry,
677
678
  " ",
678
- O("channel.days", "days"),
679
+ k("channel.days", "days"),
679
680
  ")"
680
681
  ]
681
682
  })]
682
683
  })] })
683
684
  ]
684
685
  }),
685
- L && /* @__PURE__ */ b("div", {
686
- className: `p-3 rounded-lg ${L.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
687
- children: /* @__PURE__ */ x("div", {
686
+ R && /* @__PURE__ */ x("div", {
687
+ className: `p-3 rounded-lg ${R.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
688
+ children: /* @__PURE__ */ S("div", {
688
689
  className: "flex items-center gap-2",
689
- children: [L.success ? /* @__PURE__ */ b(d, {
690
+ children: [R.success ? /* @__PURE__ */ x(d, {
690
691
  size: 16,
691
692
  className: "text-status-success-text"
692
- }) : /* @__PURE__ */ b(y, {
693
+ }) : /* @__PURE__ */ x(b, {
693
694
  size: 16,
694
695
  className: "text-status-error-text"
695
- }), /* @__PURE__ */ b("p", {
696
- className: `text-sm font-medium ${L.success ? "text-status-success-text" : "text-status-error-text"}`,
697
- children: L.message
696
+ }), /* @__PURE__ */ x("p", {
697
+ className: `text-sm font-medium ${R.success ? "text-status-success-text" : "text-status-error-text"}`,
698
+ children: R.message
698
699
  })]
699
700
  })
700
701
  }),
701
- /* @__PURE__ */ x("div", {
702
+ /* @__PURE__ */ S("div", {
702
703
  className: "flex items-center gap-2 pt-2",
703
704
  children: [
704
- /* @__PURE__ */ b(r, {
705
+ /* @__PURE__ */ x(r, {
705
706
  permission: i.CHANNEL_CONNECTION_UPDATE,
706
- children: /* @__PURE__ */ x("button", {
707
+ children: /* @__PURE__ */ S("button", {
707
708
  type: "button",
708
- onClick: () => qe($.id),
709
- disabled: A === "test",
709
+ onClick: () => Xe($.id),
710
+ disabled: j === "test",
710
711
  className: "flex items-center gap-2 px-3 py-2 text-sm text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
711
- children: [A === "test" ? /* @__PURE__ */ b(p, {
712
+ children: [j === "test" ? /* @__PURE__ */ x(p, {
712
713
  size: 16,
713
714
  className: "animate-spin"
714
- }) : /* @__PURE__ */ b(me, { size: 16 }), O("channel.testConnection", "Test Connection")]
715
+ }) : /* @__PURE__ */ x(h, { size: 16 }), k("channel.testConnection", "Test Connection")]
715
716
  })
716
717
  }),
717
- Oe && /* @__PURE__ */ x("button", {
718
+ je && /* @__PURE__ */ S("button", {
718
719
  type: "button",
719
720
  onClick: () => {
720
- N(!0), F($?.platformMetadata ?? {});
721
+ P(!0), I($?.platformMetadata ?? {});
721
722
  },
722
723
  className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors",
723
- children: [/* @__PURE__ */ b(m, { size: 16 }), O("channel.updateCredentials", "Update Credentials")]
724
+ children: [/* @__PURE__ */ x(m, { size: 16 }), k("channel.updateCredentials", "Update Credentials")]
724
725
  }),
725
- /* @__PURE__ */ b(r, {
726
+ /* @__PURE__ */ x(r, {
726
727
  permission: i.CHANNEL_CONNECTION_DELETE,
727
- children: /* @__PURE__ */ x("button", {
728
+ children: /* @__PURE__ */ S("button", {
728
729
  type: "button",
729
- onClick: () => Ke($.id),
730
- disabled: A === "delete-connection",
730
+ onClick: () => Ye($.id),
731
+ disabled: j === "delete-connection",
731
732
  className: "flex items-center gap-2 px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded-lg transition-colors disabled:opacity-50",
732
- children: [A === "delete-connection" ? /* @__PURE__ */ b(p, {
733
+ children: [j === "delete-connection" ? /* @__PURE__ */ x(p, {
733
734
  size: 16,
734
735
  className: "animate-spin"
735
- }) : /* @__PURE__ */ b(be, { size: 16 }), O("channel.remove", "Remove")]
736
+ }) : /* @__PURE__ */ x(_e, { size: 16 }), k("channel.remove", "Remove")]
736
737
  })
737
738
  })
738
739
  ]
739
740
  })
740
741
  ]
741
742
  }),
742
- !$ && !M && /* @__PURE__ */ x("div", {
743
+ !$ && !N && /* @__PURE__ */ S("div", {
743
744
  className: "text-center py-8",
744
745
  children: [
745
- /* @__PURE__ */ b(u, {
746
+ /* @__PURE__ */ x(u, {
746
747
  size: 32,
747
748
  className: "mx-auto text-text-secondary mb-3"
748
749
  }),
749
- /* @__PURE__ */ b("p", {
750
+ /* @__PURE__ */ x("p", {
750
751
  className: "text-sm text-text-secondary mb-2",
751
- children: O("channel.noCredentialsConfigured", "No credentials configured for this channel")
752
+ children: k("channel.noCredentialsConfigured", "No credentials configured for this channel")
752
753
  }),
753
- /* @__PURE__ */ b("p", {
754
+ /* @__PURE__ */ x("p", {
754
755
  className: "text-xs text-text-secondary",
755
- children: O("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
756
+ children: k("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
756
757
  })
757
758
  ]
758
759
  }),
759
- M && /* @__PURE__ */ x("div", {
760
+ N && /* @__PURE__ */ S("div", {
760
761
  className: "space-y-4",
761
762
  children: [
762
- !K.adapterType && /* @__PURE__ */ b("div", {
763
+ !q.adapterType && /* @__PURE__ */ x("div", {
763
764
  className: "p-3 bg-accent-orange/10 border border-accent-orange/30 rounded-lg",
764
- children: /* @__PURE__ */ x("div", {
765
+ children: /* @__PURE__ */ S("div", {
765
766
  className: "flex items-start gap-2",
766
- children: [/* @__PURE__ */ b(s, {
767
+ children: [/* @__PURE__ */ x(s, {
767
768
  size: 16,
768
769
  className: "text-accent-orange mt-0.5"
769
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
770
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
770
771
  className: "text-sm font-medium text-accent-orange",
771
- children: O("channel.noAdapterTypeConfigured", "No adapter type configured")
772
- }), /* @__PURE__ */ b("p", {
772
+ children: k("channel.noAdapterTypeConfigured", "No adapter type configured")
773
+ }), /* @__PURE__ */ x("p", {
773
774
  className: "text-xs text-text-secondary mt-1",
774
- children: O("channel.noAdapterTypeConfiguredHint", "You can still add credentials below. The system will attempt to validate them when the channel is configured with an adapter type.")
775
+ children: k("channel.noAdapterTypeConfiguredHint", "You can still add credentials below. The system will attempt to validate them when the channel is configured with an adapter type.")
775
776
  })] })]
776
777
  })
777
778
  }),
778
- /* @__PURE__ */ b(ie, {
779
- adapterType: K.adapterType ?? void 0,
780
- credentials: P,
781
- onChange: F,
782
- onValidationChange: (e) => I(e),
783
- disabled: A === "connection"
779
+ /* @__PURE__ */ x(ie, {
780
+ adapterType: q.adapterType ?? void 0,
781
+ credentials: F,
782
+ onChange: I,
783
+ onValidationChange: (e) => L(e),
784
+ disabled: j === "connection"
784
785
  }),
785
- K.adapterType && /* @__PURE__ */ b("div", {
786
+ q.adapterType && /* @__PURE__ */ x("div", {
786
787
  className: "pt-2",
787
- children: /* @__PURE__ */ b(ae, {
788
- adapterType: K.adapterType,
789
- credentials: P
788
+ children: /* @__PURE__ */ x(ae, {
789
+ adapterType: q.adapterType,
790
+ credentials: F
790
791
  })
791
792
  }),
792
- /* @__PURE__ */ x("div", {
793
+ /* @__PURE__ */ S("div", {
793
794
  className: "flex items-center gap-2 pt-2 border-t border-border-subtle",
794
- children: [/* @__PURE__ */ b(r, {
795
+ children: [/* @__PURE__ */ x(r, {
795
796
  permission: i.CHANNEL_CONNECTION_UPDATE,
796
- children: /* @__PURE__ */ x("button", {
797
+ children: /* @__PURE__ */ S("button", {
797
798
  type: "button",
798
799
  onClick: () => {
799
- $ ? Ge($.id) : We();
800
+ $ ? Je($.id) : qe();
800
801
  },
801
- disabled: A === "connection" || !Ae && !!K.adapterType,
802
+ disabled: j === "connection" || !Ne && !!q.adapterType,
802
803
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
803
- children: [A === "connection" ? /* @__PURE__ */ b(p, {
804
+ children: [j === "connection" ? /* @__PURE__ */ x(p, {
804
805
  size: 16,
805
806
  className: "animate-spin"
806
- }) : /* @__PURE__ */ b(ye, { size: 16 }), $ ? O("channel.updateCredentials", "Update Credentials") : O("channel.saveCredentials", "Save Credentials")]
807
+ }) : /* @__PURE__ */ x(v, { size: 16 }), $ ? k("channel.updateCredentials", "Update Credentials") : k("channel.saveCredentials", "Save Credentials")]
807
808
  })
808
- }), /* @__PURE__ */ x("button", {
809
+ }), /* @__PURE__ */ S("button", {
809
810
  type: "button",
810
811
  onClick: () => {
811
- N(!1), F({}), I(!1);
812
+ P(!1), I({}), L(!1);
812
813
  },
813
814
  className: "flex items-center gap-2 px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
814
- children: [/* @__PURE__ */ b(v, { size: 16 }), O("channel.cancel", "Cancel")]
815
+ children: [/* @__PURE__ */ x(be, { size: 16 }), k("channel.cancel", "Cancel")]
815
816
  })]
816
817
  })
817
818
  ]
818
819
  })
819
820
  ]
820
821
  }),
821
- je && /* @__PURE__ */ b("div", {
822
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
823
- children: /* @__PURE__ */ x("div", {
824
- className: "w-full max-w-md mx-4 p-6 bg-surface border border-border-subtle rounded-lg shadow-xl",
825
- children: [/* @__PURE__ */ x("div", {
826
- className: "flex items-center justify-between mb-4",
827
- children: [/* @__PURE__ */ x("div", {
828
- className: "flex items-center gap-2",
829
- children: [/* @__PURE__ */ b(g, {
822
+ /* @__PURE__ */ x(Ee, {
823
+ open: Pe,
824
+ onOpenChange: (e) => {
825
+ e || B(!1);
826
+ },
827
+ children: /* @__PURE__ */ S(De, {
828
+ className: "sm:max-w-md",
829
+ children: [/* @__PURE__ */ x(Oe, { children: /* @__PURE__ */ S(C, {
830
+ className: "flex items-center gap-2",
831
+ children: [
832
+ /* @__PURE__ */ x(y, {
830
833
  size: 20,
831
834
  className: "text-accent-primary"
832
- }), /* @__PURE__ */ x("h3", {
833
- className: "text-lg font-semibold text-text-primary",
834
- children: [
835
- "Test ",
836
- S[K.platform]?.label || K.platform,
837
- " Channel"
838
- ]
839
- })]
840
- }), /* @__PURE__ */ b("button", {
841
- type: "button",
842
- onClick: () => z(!1),
843
- className: "p-1 text-text-secondary hover:text-text-primary rounded",
844
- children: /* @__PURE__ */ b(v, { size: 20 })
845
- })]
846
- }), /* @__PURE__ */ x("div", {
835
+ }),
836
+ "Test ",
837
+ w[q.platform]?.label || q.platform,
838
+ " Channel"
839
+ ]
840
+ }) }), /* @__PURE__ */ S("div", {
847
841
  className: "space-y-4",
848
842
  children: [
849
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("label", {
843
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
850
844
  className: "block text-sm font-medium text-text-primary mb-1.5",
851
845
  children: [
852
- Y(K.platform),
846
+ Qe(q.platform),
853
847
  " ",
854
- /* @__PURE__ */ b("span", {
848
+ /* @__PURE__ */ x("span", {
855
849
  className: "text-status-error-text",
856
850
  children: "*"
857
851
  })
858
852
  ]
859
- }), /* @__PURE__ */ x("div", {
853
+ }), /* @__PURE__ */ S("div", {
860
854
  className: "relative",
861
- children: [/* @__PURE__ */ b("input", {
862
- "aria-label": J(K.platform),
855
+ children: [/* @__PURE__ */ x("input", {
856
+ "aria-label": Y(q.platform),
863
857
  type: "text",
864
- value: B,
865
- onChange: (e) => V(e.target.value),
866
- placeholder: J(K.platform),
858
+ value: V,
859
+ onChange: (e) => H(e.target.value),
860
+ placeholder: Y(q.platform),
867
861
  className: "w-full pl-9 pr-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
868
- }), /* @__PURE__ */ b("div", {
862
+ }), /* @__PURE__ */ x("div", {
869
863
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
870
- children: K.platform === "EMAIL" ? /* @__PURE__ */ b(de, { size: 16 }) : K.platform === "SMS" || K.platform === "WHATSAPP" ? /* @__PURE__ */ b(pe, { size: 16 }) : /* @__PURE__ */ b(fe, { size: 16 })
864
+ children: q.platform === "EMAIL" ? /* @__PURE__ */ x(de, { size: 16 }) : q.platform === "SMS" || q.platform === "WHATSAPP" ? /* @__PURE__ */ x(pe, { size: 16 }) : /* @__PURE__ */ x(fe, { size: 16 })
871
865
  })]
872
866
  })] }),
873
- K.platform === "EMAIL" && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
867
+ q.platform === "EMAIL" && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
874
868
  htmlFor: "channel-details-test-subject",
875
869
  className: "block text-sm font-medium text-text-primary mb-1.5",
876
870
  children: "Subject"
877
- }), /* @__PURE__ */ b("input", {
871
+ }), /* @__PURE__ */ x("input", {
878
872
  id: "channel-details-test-subject",
879
873
  "aria-label": "Email subject",
880
874
  type: "text",
881
- value: H,
882
- onChange: (e) => Me(e.target.value),
875
+ value: U,
876
+ onChange: (e) => Fe(e.target.value),
883
877
  placeholder: "Email subject",
884
878
  className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
885
879
  })] }),
886
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
880
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
887
881
  htmlFor: "channel-details-test-message",
888
882
  className: "block text-sm font-medium text-text-primary mb-1.5",
889
883
  children: "Message"
890
- }), /* @__PURE__ */ b("textarea", {
884
+ }), /* @__PURE__ */ x("textarea", {
891
885
  id: "channel-details-test-message",
892
886
  "aria-label": "Test message content",
893
- value: U,
894
- onChange: (e) => Ne(e.target.value),
887
+ value: W,
888
+ onChange: (e) => Ie(e.target.value),
895
889
  placeholder: "Test message content",
896
890
  rows: 3,
897
891
  className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none"
898
892
  })] }),
899
- W && /* @__PURE__ */ b("div", {
900
- className: `p-3 rounded-lg ${W.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
901
- children: /* @__PURE__ */ x("div", {
893
+ G && /* @__PURE__ */ x("div", {
894
+ className: `p-3 rounded-lg ${G.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
895
+ children: /* @__PURE__ */ S("div", {
902
896
  className: "flex items-start gap-2",
903
- children: [W.success ? /* @__PURE__ */ b(d, {
897
+ children: [G.success ? /* @__PURE__ */ x(d, {
904
898
  size: 16,
905
899
  className: "text-status-success-text mt-0.5"
906
- }) : /* @__PURE__ */ b(y, {
900
+ }) : /* @__PURE__ */ x(b, {
907
901
  size: 16,
908
902
  className: "text-status-error-text mt-0.5"
909
- }), /* @__PURE__ */ x("div", {
903
+ }), /* @__PURE__ */ S("div", {
910
904
  className: "flex-1",
911
905
  children: [
912
- /* @__PURE__ */ b("p", {
913
- className: `text-sm font-medium ${W.success ? "text-status-success-text" : "text-status-error-text"}`,
914
- children: W.success ? O("channel.messageSentSuccess", "Message sent successfully!") : O("channel.messageSendFailed", "Failed to send message")
906
+ /* @__PURE__ */ x("p", {
907
+ className: `text-sm font-medium ${G.success ? "text-status-success-text" : "text-status-error-text"}`,
908
+ children: G.success ? k("channel.messageSentSuccess", "Message sent successfully!") : k("channel.messageSendFailed", "Failed to send message")
915
909
  }),
916
- W.messageId && /* @__PURE__ */ x("p", {
910
+ G.messageId && /* @__PURE__ */ S("p", {
917
911
  className: "text-xs text-success-600 mt-1",
918
- children: ["Message ID: ", W.messageId]
912
+ children: ["Message ID: ", G.messageId]
919
913
  }),
920
- W.externalId && /* @__PURE__ */ x("p", {
914
+ G.externalId && /* @__PURE__ */ S("p", {
921
915
  className: "text-xs text-text-secondary mt-1",
922
- children: ["External ID: ", W.externalId]
916
+ children: ["External ID: ", G.externalId]
923
917
  }),
924
- W.status && /* @__PURE__ */ x("p", {
918
+ G.status && /* @__PURE__ */ S("p", {
925
919
  className: "text-xs text-text-secondary mt-1",
926
- children: ["Status: ", W.status]
920
+ children: ["Status: ", G.status]
927
921
  }),
928
- W.error && /* @__PURE__ */ x("p", {
922
+ G.error && /* @__PURE__ */ S("p", {
929
923
  className: "text-xs text-status-error-text mt-1",
930
- children: [W.error.message, W.error.retryable && /* @__PURE__ */ b("span", {
924
+ children: [G.error.message, G.error.retryable && /* @__PURE__ */ x("span", {
931
925
  className: "text-warning-600 ml-1",
932
926
  children: "(will retry)"
933
927
  })]
934
928
  }),
935
- W.sentAt && /* @__PURE__ */ x("p", {
929
+ G.sentAt && /* @__PURE__ */ S("p", {
936
930
  className: "text-xs text-text-secondary mt-1",
937
- children: ["Sent at: ", new Date(W.sentAt).toLocaleString()]
931
+ children: ["Sent at: ", new Date(G.sentAt).toLocaleString()]
938
932
  })
939
933
  ]
940
934
  })]
941
935
  })
942
936
  }),
943
- /* @__PURE__ */ x("div", {
937
+ /* @__PURE__ */ S("div", {
944
938
  className: "flex items-center gap-2 pt-2",
945
- children: [/* @__PURE__ */ b(r, {
939
+ children: [/* @__PURE__ */ x(r, {
946
940
  permission: i.CHANNEL_DELIVERY_SEND,
947
- children: /* @__PURE__ */ x("button", {
941
+ children: /* @__PURE__ */ S("button", {
948
942
  type: "button",
949
- onClick: Je,
950
- disabled: A === "send-test" || !B.trim(),
943
+ onClick: Ze,
944
+ disabled: j === "send-test" || !V.trim(),
951
945
  className: "flex-1 flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
952
- children: [A === "send-test" ? /* @__PURE__ */ b(p, {
946
+ children: [j === "send-test" ? /* @__PURE__ */ x(p, {
953
947
  size: 16,
954
948
  className: "animate-spin"
955
- }) : /* @__PURE__ */ b(g, { size: 16 }), O("channel.sendTest", "Send Test")]
949
+ }) : /* @__PURE__ */ x(y, { size: 16 }), k("channel.sendTest", "Send Test")]
956
950
  })
957
- }), /* @__PURE__ */ b("button", {
951
+ }), /* @__PURE__ */ x("button", {
958
952
  type: "button",
959
- onClick: () => z(!1),
953
+ onClick: () => B(!1),
960
954
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
961
- children: O("channel.close", "Close")
955
+ children: k("channel.close", "Close")
962
956
  })]
963
957
  })
964
958
  ]
@@ -970,6 +964,6 @@ function T() {
970
964
  });
971
965
  }
972
966
  //#endregion
973
- export { T as ChannelDetailsPage };
967
+ export { D as ChannelDetailsPage };
974
968
 
975
969
  //# sourceMappingURL=ChannelDetailsPage.js.map