@burdenoff/microfe-channel 2026.625.2 → 2026.625.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.
Files changed (29) hide show
  1. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +19 -12
  2. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  3. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
  4. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  5. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
  6. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  7. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +154 -134
  8. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelsListPage.js +279 -244
  10. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  11. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
  12. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  13. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +159 -129
  14. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  15. package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
  16. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
  18. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  19. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +99 -79
  20. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  21. package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
  22. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  23. package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
  24. package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
  25. package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
  26. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +174 -154
  28. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  29. package/package.json +2 -2
@@ -2,19 +2,19 @@ import { nativeImpact as e, nativeNotify as t } from "../../../../utils/nativeBr
2
2
  import { useChannel as n, useChannels as r } from "../../../hooks/useChannels.js";
3
3
  import { PermissionGuard as i } from "../../../components/PermissionGuard.js";
4
4
  import { CHANNEL_PERMISSIONS as a } from "../../../constants/permissions.js";
5
- import { useEffect as o, useRef as s, useState as c } from "react";
6
- import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
- import { AlertCircle as u, ArrowLeft as d, Bell as f, Hash as p, Inbox as m, Loader2 as h, Mail as g, MessageCircle as _, MessageSquare as v, Save as y, Send as b, Smartphone as x, Trash2 as S, Users as C } from "lucide-react";
8
- import { useNavigate as w, useParams as T } from "react-router-dom";
9
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
10
- import { GlassCard as k } from "@burdenoff/fe-libs/ui";
5
+ import { useEffect as o, useRef as ee, useState as s } from "react";
6
+ import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { AlertCircle as l, ArrowLeft as u, Bell as d, Hash as f, Inbox as p, Loader2 as m, Mail as h, MessageCircle as g, MessageSquare as _, Save as v, Send as y, Smartphone as b, Trash2 as x, Users as S } from "lucide-react";
8
+ import { useNavigate as C, useParams as w } from "react-router-dom";
9
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
10
+ import { EmphasisPanel as O, GlassCard as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/channel/modules/channels/pages/EditChannelPage.tsx
12
- var A = [
12
+ var j = [
13
13
  {
14
14
  value: "EMAIL",
15
15
  label: "Email",
16
16
  description: "Send emails via various providers",
17
- icon: g,
17
+ icon: h,
18
18
  color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
19
19
  adapters: [
20
20
  {
@@ -51,7 +51,7 @@ var A = [
51
51
  value: "SMS",
52
52
  label: "SMS",
53
53
  description: "Send text messages",
54
- icon: x,
54
+ icon: b,
55
55
  color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
56
56
  adapters: [
57
57
  {
@@ -84,7 +84,7 @@ var A = [
84
84
  value: "PUSH",
85
85
  label: "Push",
86
86
  description: "Mobile & web push",
87
- icon: f,
87
+ icon: d,
88
88
  color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
89
89
  adapters: [
90
90
  {
@@ -109,7 +109,7 @@ var A = [
109
109
  value: "INAPP",
110
110
  label: "In-App",
111
111
  description: "Internal in-app notifications",
112
- icon: m,
112
+ icon: p,
113
113
  color: "text-status-warning-text bg-status-warning-bg-subtle border-status-warning-border/30",
114
114
  adapters: [{
115
115
  value: "INAPP_NATIVE",
@@ -120,7 +120,7 @@ var A = [
120
120
  value: "WHATSAPP",
121
121
  label: "WhatsApp",
122
122
  description: "WhatsApp Business messaging",
123
- icon: v,
123
+ icon: _,
124
124
  color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
125
125
  adapters: [{
126
126
  value: "WHATSAPP_CLOUD",
@@ -134,7 +134,7 @@ var A = [
134
134
  value: "SLACK",
135
135
  label: "Slack",
136
136
  description: "Slack bot & channels",
137
- icon: p,
137
+ icon: f,
138
138
  color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
139
139
  adapters: [{
140
140
  value: "SLACK_BOT",
@@ -145,7 +145,7 @@ var A = [
145
145
  value: "TEAMS",
146
146
  label: "Teams",
147
147
  description: "Microsoft Teams",
148
- icon: C,
148
+ icon: S,
149
149
  color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
150
150
  adapters: [{
151
151
  value: "TEAMS_BOT",
@@ -156,7 +156,7 @@ var A = [
156
156
  value: "DISCORD",
157
157
  label: "Discord",
158
158
  description: "Discord bots & webhooks",
159
- icon: _,
159
+ icon: g,
160
160
  color: "text-accent-indigo bg-accent-indigo-subtle border-accent-indigo/30",
161
161
  adapters: [{
162
162
  value: "DISCORD_BOT",
@@ -167,7 +167,7 @@ var A = [
167
167
  value: "WEBCHAT",
168
168
  label: "Webchat",
169
169
  description: "Website live chat",
170
- icon: v,
170
+ icon: _,
171
171
  color: "text-accent-teal bg-accent-teal-subtle border-accent-teal/30",
172
172
  adapters: [{
173
173
  value: "WEBCHAT_NATIVE",
@@ -178,14 +178,14 @@ var A = [
178
178
  value: "WEBHOOK",
179
179
  label: "Webhook",
180
180
  description: "Generic HTTP webhook",
181
- icon: b,
181
+ icon: y,
182
182
  color: "text-text-secondary bg-bg-sunken/50 border-border-subtle",
183
183
  adapters: [{
184
184
  value: "WEBHOOK_HTTP",
185
185
  label: "HTTP Webhook"
186
186
  }]
187
187
  }
188
- ], j = [
188
+ ], M = [
189
189
  {
190
190
  value: 0,
191
191
  label: "0 - Lowest"
@@ -207,179 +207,185 @@ var A = [
207
207
  label: "4 - Highest"
208
208
  }
209
209
  ];
210
- function M() {
211
- let f = w(), { channelId: p } = T(), { channel: m, isLoading: g, error: _ } = n(p), { updateChannel: v, deleteChannel: b } = r(), { t: x } = l(), C = (e, t) => {
212
- let n = x(e);
210
+ function N() {
211
+ let d = C(), { channelId: f } = w(), { channel: p, isLoading: h, error: g } = n(f), { updateChannel: _, deleteChannel: y } = r(), { t: b } = c(), S = (e, t) => {
212
+ let n = b(e);
213
213
  return n === e ? t : n;
214
- }, [M, N] = c(""), [P, F] = c(""), [I, L] = c("AWS_SES"), [R, z] = c(2), [B, V] = c("INACTIVE"), [H, U] = c(!1), [W, G] = c(!1), [K, q] = c(null), [J, Y] = c(!1), X = s(null);
214
+ }, [N, P] = s(""), [F, I] = s(""), [L, R] = s("AWS_SES"), [z, B] = s(2), [V, H] = s("INACTIVE"), [U, W] = s(!1), [G, K] = s(!1), [q, J] = s(null), [Y, X] = s(!1), Z = ee(null);
215
215
  o(() => {
216
- m && m.id !== X.current && (X.current = m.id, Promise.resolve().then(() => {
217
- N(m.name || ""), F(m.description || ""), L(m.adapterType || "AWS_SES"), z(m.priority || 2), V(m.status || "INACTIVE");
216
+ p && p.id !== Z.current && (Z.current = p.id, Promise.resolve().then(() => {
217
+ P(p.name || ""), I(p.description || ""), R(p.adapterType || "AWS_SES"), B(p.priority || 2), H(p.status || "INACTIVE");
218
218
  }));
219
- }, [m]);
220
- let Z = m?.platform || "EMAIL", Q = A.find((e) => e.value === Z);
221
- return g ? /* @__PURE__ */ D("div", {
219
+ }, [p]);
220
+ let Q = p?.platform || "EMAIL", $ = j.find((e) => e.value === Q);
221
+ return h ? /* @__PURE__ */ E("div", {
222
222
  className: "flex items-center justify-center min-h-screen",
223
- children: /* @__PURE__ */ D(h, { className: "size-8 animate-spin text-text-secondary" })
224
- }) : _ || !m ? /* @__PURE__ */ O("div", {
223
+ children: /* @__PURE__ */ E(m, { className: "size-8 animate-spin text-text-secondary" })
224
+ }) : g || !p ? /* @__PURE__ */ D("div", {
225
225
  className: "flex flex-col items-center justify-center min-h-screen gap-4",
226
226
  children: [
227
- /* @__PURE__ */ D(u, { className: "size-12 text-status-error-text" }),
228
- /* @__PURE__ */ D("h1", {
227
+ /* @__PURE__ */ E(l, { className: "size-12 text-status-error-text" }),
228
+ /* @__PURE__ */ E("h1", {
229
229
  className: "text-xl font-semibold",
230
- children: C("channel.channelNotFound", "Channel not found")
230
+ children: S("channel.channelNotFound", "Channel not found")
231
231
  }),
232
- /* @__PURE__ */ D("button", {
232
+ /* @__PURE__ */ E("button", {
233
233
  type: "button",
234
- onClick: () => f("../list"),
234
+ onClick: () => d("../list"),
235
235
  className: "text-primary hover:underline",
236
- children: C("channel.backToChannels", "Back to channels")
236
+ children: S("channel.backToChannels", "Back to channels")
237
237
  })
238
238
  ]
239
- }) : /* @__PURE__ */ D(i, {
239
+ }) : /* @__PURE__ */ E(i, {
240
240
  permission: a.CHANNEL_UPDATE,
241
- children: /* @__PURE__ */ O("div", {
241
+ children: /* @__PURE__ */ D("div", {
242
242
  className: "min-h-screen bg-bg-surface",
243
- children: [/* @__PURE__ */ D("div", {
243
+ children: [/* @__PURE__ */ E("div", {
244
244
  className: "border-b bg-bg-surface",
245
- children: /* @__PURE__ */ D("div", {
245
+ children: /* @__PURE__ */ E("div", {
246
246
  className: "container mx-auto px-6 py-4",
247
- children: /* @__PURE__ */ O("div", {
247
+ children: /* @__PURE__ */ D("div", {
248
248
  className: "flex items-center gap-4",
249
- children: [/* @__PURE__ */ D("button", {
249
+ children: [/* @__PURE__ */ E("button", {
250
250
  type: "button",
251
- onClick: () => f(`/channels/${p}`),
251
+ onClick: () => d(`/channels/${f}`),
252
252
  className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
253
- children: /* @__PURE__ */ D(d, { className: "size-5 " })
254
- }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h1", {
253
+ children: /* @__PURE__ */ E(u, { className: "size-5 " })
254
+ }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h1", {
255
255
  className: "text-2xl font-bold",
256
- children: C("channel.editChannel", "Edit Channel")
257
- }), /* @__PURE__ */ D("p", {
256
+ children: S("channel.editChannel", "Edit Channel")
257
+ }), /* @__PURE__ */ E("p", {
258
258
  className: "text-sm text-text-secondary",
259
- children: C("channel.updateChannelConfig", "Update channel configuration")
259
+ children: S("channel.updateChannelConfig", "Update channel configuration")
260
260
  })] })]
261
261
  })
262
262
  })
263
- }), /* @__PURE__ */ D("div", {
263
+ }), /* @__PURE__ */ E("div", {
264
264
  className: "container mx-auto px-6 py-8 max-w-2xl",
265
- children: /* @__PURE__ */ O("div", {
265
+ children: /* @__PURE__ */ D("div", {
266
266
  className: "space-y-6",
267
267
  children: [
268
- K && /* @__PURE__ */ O("div", {
268
+ /* @__PURE__ */ E(A, {
269
+ icon: /* @__PURE__ */ E(v, {
270
+ size: 15,
271
+ "aria-hidden": "true"
272
+ }),
273
+ children: S("channel.editChannelPurpose", "Change how this channel behaves — its name, description, priority and status. The platform and provider stay fixed (they define what the channel is); to swap credentials use the channel's connection instead. Use this to rename a channel, bump its priority, or temporarily deactivate it without deleting it.")
274
+ }),
275
+ q && /* @__PURE__ */ D("div", {
269
276
  className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
270
- children: [/* @__PURE__ */ D(u, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ D("p", {
277
+ children: [/* @__PURE__ */ E(l, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ E("p", {
271
278
  className: "text-sm text-status-error-text",
272
- children: K
279
+ children: q
273
280
  })]
274
281
  }),
275
- /* @__PURE__ */ O(k, {
282
+ /* @__PURE__ */ D(k, {
276
283
  treatment: "insight",
277
284
  className: "p-4 border-border-seam space-y-2",
278
- children: [/* @__PURE__ */ D("div", {
285
+ children: [/* @__PURE__ */ E("div", {
279
286
  className: "flex items-center gap-2",
280
- children: Q && /* @__PURE__ */ O(E, { children: [(() => {
281
- let e = Q.icon;
282
- return /* @__PURE__ */ D(e, { className: "size-5 text-text-secondary" });
283
- })(), /* @__PURE__ */ D("span", {
287
+ children: $ && /* @__PURE__ */ D(T, { children: [(() => {
288
+ let e = $.icon;
289
+ return /* @__PURE__ */ E(e, { className: "size-5 text-text-secondary" });
290
+ })(), /* @__PURE__ */ E("span", {
284
291
  className: "font-medium",
285
- children: Z
292
+ children: Q
286
293
  })] })
287
- }), /* @__PURE__ */ D("p", {
294
+ }), /* @__PURE__ */ E("p", {
288
295
  className: "text-sm text-text-secondary",
289
- children: C("channel.platformLockedHint", "Platform cannot be changed after channel creation. Create a new channel to use a different platform.")
296
+ children: S("channel.platformLockedHint", "Platform cannot be changed after channel creation. Create a new channel to use a different platform.")
290
297
  })]
291
298
  }),
292
- /* @__PURE__ */ O(k, {
293
- treatment: "plain",
294
- className: "p-5 border-border-seam space-y-6",
299
+ /* @__PURE__ */ D(O, {
300
+ className: "p-5 space-y-6",
295
301
  children: [
296
- /* @__PURE__ */ O("div", {
302
+ /* @__PURE__ */ D("div", {
297
303
  className: "space-y-2",
298
- children: [/* @__PURE__ */ O("label", {
304
+ children: [/* @__PURE__ */ D("label", {
299
305
  className: "text-sm font-medium",
300
- children: [C("channel.channelName", "Channel Name"), " *"]
301
- }), /* @__PURE__ */ D("input", {
302
- "aria-label": C("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
306
+ children: [S("channel.channelName", "Channel Name"), " *"]
307
+ }), /* @__PURE__ */ E("input", {
308
+ "aria-label": S("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
303
309
  type: "text",
304
- value: M,
305
- onChange: (e) => N(e.target.value),
306
- placeholder: C("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
310
+ value: N,
311
+ onChange: (e) => P(e.target.value),
312
+ placeholder: S("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
307
313
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
308
314
  })]
309
315
  }),
310
- /* @__PURE__ */ O("div", {
316
+ /* @__PURE__ */ D("div", {
311
317
  className: "space-y-2",
312
- children: [/* @__PURE__ */ D("label", {
318
+ children: [/* @__PURE__ */ E("label", {
313
319
  className: "text-sm font-medium",
314
- children: C("channel.description", "Description")
315
- }), /* @__PURE__ */ D("textarea", {
316
- "aria-label": C("channel.editDescriptionPlaceholder", "Optional description for this channel"),
317
- value: P,
318
- onChange: (e) => F(e.target.value),
319
- placeholder: C("channel.editDescriptionPlaceholder", "Optional description for this channel"),
320
+ children: S("channel.description", "Description")
321
+ }), /* @__PURE__ */ E("textarea", {
322
+ "aria-label": S("channel.editDescriptionPlaceholder", "Optional description for this channel"),
323
+ value: F,
324
+ onChange: (e) => I(e.target.value),
325
+ placeholder: S("channel.editDescriptionPlaceholder", "Optional description for this channel"),
320
326
  rows: 3,
321
327
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary resize-none"
322
328
  })]
323
329
  }),
324
- Q && /* @__PURE__ */ O("div", {
330
+ $ && /* @__PURE__ */ D("div", {
325
331
  className: "space-y-2",
326
- children: [/* @__PURE__ */ D("label", {
332
+ children: [/* @__PURE__ */ E("label", {
327
333
  className: "text-sm font-medium",
328
- children: C("channel.adapterProvider", "Adapter / Provider")
329
- }), /* @__PURE__ */ D("select", {
330
- value: I,
331
- onChange: (e) => L(e.target.value),
334
+ children: S("channel.adapterProvider", "Adapter / Provider")
335
+ }), /* @__PURE__ */ E("select", {
336
+ value: L,
337
+ onChange: (e) => R(e.target.value),
332
338
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
333
- children: Q.adapters.map((e) => /* @__PURE__ */ D("option", {
339
+ children: $.adapters.map((e) => /* @__PURE__ */ E("option", {
334
340
  value: e.value,
335
341
  children: e.label
336
342
  }, e.value))
337
343
  })]
338
344
  }),
339
- /* @__PURE__ */ O("div", {
345
+ /* @__PURE__ */ D("div", {
340
346
  className: "grid grid-cols-2 gap-4",
341
- children: [/* @__PURE__ */ O("div", {
347
+ children: [/* @__PURE__ */ D("div", {
342
348
  className: "space-y-2",
343
349
  children: [
344
- /* @__PURE__ */ D("label", {
350
+ /* @__PURE__ */ E("label", {
345
351
  className: "text-sm font-medium",
346
- children: C("channel.priority", "Priority")
352
+ children: S("channel.priority", "Priority")
347
353
  }),
348
- /* @__PURE__ */ D("select", {
349
- value: R,
350
- onChange: (e) => z(Number(e.target.value)),
354
+ /* @__PURE__ */ E("select", {
355
+ value: z,
356
+ onChange: (e) => B(Number(e.target.value)),
351
357
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
352
- children: j.map((e) => /* @__PURE__ */ D("option", {
358
+ children: M.map((e) => /* @__PURE__ */ E("option", {
353
359
  value: e.value,
354
360
  children: e.label
355
361
  }, e.value))
356
362
  }),
357
- /* @__PURE__ */ D("p", {
363
+ /* @__PURE__ */ E("p", {
358
364
  className: "text-xs text-text-secondary",
359
- children: C("channel.priorityFailoverHint", "Higher priority channels are used first in failover")
365
+ children: S("channel.priorityFailoverHint", "Higher priority channels are used first in failover")
360
366
  })
361
367
  ]
362
- }), /* @__PURE__ */ O("div", {
368
+ }), /* @__PURE__ */ D("div", {
363
369
  className: "space-y-2",
364
- children: [/* @__PURE__ */ D("label", {
370
+ children: [/* @__PURE__ */ E("label", {
365
371
  className: "text-sm font-medium",
366
- children: C("channel.status", "Status")
367
- }), /* @__PURE__ */ O("select", {
368
- value: B,
369
- onChange: (e) => V(e.target.value),
372
+ children: S("channel.status", "Status")
373
+ }), /* @__PURE__ */ D("select", {
374
+ value: V,
375
+ onChange: (e) => H(e.target.value),
370
376
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
371
377
  children: [
372
- /* @__PURE__ */ D("option", {
378
+ /* @__PURE__ */ E("option", {
373
379
  value: "INACTIVE",
374
- children: C("channel.status.inactive", "Inactive")
380
+ children: S("channel.status.inactive", "Inactive")
375
381
  }),
376
- /* @__PURE__ */ D("option", {
382
+ /* @__PURE__ */ E("option", {
377
383
  value: "ACTIVE",
378
- children: C("channel.status.active", "Active")
384
+ children: S("channel.status.active", "Active")
379
385
  }),
380
- /* @__PURE__ */ D("option", {
386
+ /* @__PURE__ */ E("option", {
381
387
  value: "SUSPENDED",
382
- children: C("channel.status.suspended", "Suspended")
388
+ children: S("channel.status.suspended", "Suspended")
383
389
  })
384
390
  ]
385
391
  })]
@@ -387,80 +393,80 @@ function M() {
387
393
  })
388
394
  ]
389
395
  }),
390
- /* @__PURE__ */ O("div", {
396
+ /* @__PURE__ */ D("div", {
391
397
  className: "flex items-center justify-between pt-6 border-t",
392
- children: [/* @__PURE__ */ D("div", { children: J ? /* @__PURE__ */ O("div", {
398
+ children: [/* @__PURE__ */ E("div", { children: Y ? /* @__PURE__ */ D("div", {
393
399
  className: "flex items-center gap-2",
394
400
  children: [
395
- /* @__PURE__ */ D("span", {
401
+ /* @__PURE__ */ E("span", {
396
402
  className: "text-sm text-text-secondary",
397
- children: C("channel.confirmDelete", "Confirm delete?")
403
+ children: S("channel.confirmDelete", "Confirm delete?")
398
404
  }),
399
- /* @__PURE__ */ O("button", {
405
+ /* @__PURE__ */ D("button", {
400
406
  type: "button",
401
407
  onClick: async () => {
402
- if (!(!p || !J)) {
403
- e("medium"), G(!0);
408
+ if (!(!f || !Y)) {
409
+ e("medium"), K(!0);
404
410
  try {
405
- await b(p) ? (t("success"), f("../list")) : t("error");
411
+ await y(f) ? (t("success"), d("../list")) : t("error");
406
412
  } catch (e) {
407
- t("error"), q(e instanceof Error ? e.message : C("channel.deleteFailed", "Failed to delete channel")), G(!1);
413
+ t("error"), J(e instanceof Error ? e.message : S("channel.deleteFailed", "Failed to delete channel")), K(!1);
408
414
  }
409
415
  }
410
416
  },
411
- disabled: W,
417
+ disabled: G,
412
418
  className: "px-4 py-2 text-sm bg-status-error-bg text-status-error-text rounded-lg hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
413
- children: [W ? /* @__PURE__ */ D(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ D(S, { className: "size-4 " }), C("channel.delete", "Delete")]
419
+ children: [G ? /* @__PURE__ */ E(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ E(x, { className: "size-4 " }), S("channel.delete", "Delete")]
414
420
  }),
415
- /* @__PURE__ */ D("button", {
421
+ /* @__PURE__ */ E("button", {
416
422
  type: "button",
417
- onClick: () => Y(!1),
423
+ onClick: () => X(!1),
418
424
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
419
- children: C("channel.cancel", "Cancel")
425
+ children: S("channel.cancel", "Cancel")
420
426
  })
421
427
  ]
422
- }) : /* @__PURE__ */ D(i, {
428
+ }) : /* @__PURE__ */ E(i, {
423
429
  permission: a.CHANNEL_DELETE,
424
- children: /* @__PURE__ */ O("button", {
430
+ children: /* @__PURE__ */ D("button", {
425
431
  type: "button",
426
- onClick: () => Y(!0),
432
+ onClick: () => X(!0),
427
433
  className: "px-4 py-2 text-sm text-status-error-text hover:bg-status-error-bg/10 rounded-lg transition-colors flex items-center gap-2",
428
- children: [/* @__PURE__ */ D(S, { className: "size-4 " }), C("channel.deleteChannel", "Delete Channel")]
434
+ children: [/* @__PURE__ */ E(x, { className: "size-4 " }), S("channel.deleteChannel", "Delete Channel")]
429
435
  })
430
- }) }), /* @__PURE__ */ O("div", {
436
+ }) }), /* @__PURE__ */ D("div", {
431
437
  className: "flex items-center gap-3",
432
- children: [/* @__PURE__ */ D("button", {
438
+ children: [/* @__PURE__ */ E("button", {
433
439
  type: "button",
434
- onClick: () => f(`/channels/${p}`),
440
+ onClick: () => d(`/channels/${f}`),
435
441
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
436
- children: C("channel.cancel", "Cancel")
437
- }), /* @__PURE__ */ O("button", {
442
+ children: S("channel.cancel", "Cancel")
443
+ }), /* @__PURE__ */ D("button", {
438
444
  type: "button",
439
445
  onClick: async () => {
440
- if (p) {
441
- if (!M.trim()) {
442
- q(C("channel.validation.nameRequired", "Channel name is required"));
446
+ if (f) {
447
+ if (!N.trim()) {
448
+ J(S("channel.validation.nameRequired", "Channel name is required"));
443
449
  return;
444
450
  }
445
- U(!0), q(null);
451
+ W(!0), J(null);
446
452
  try {
447
- await v(p, {
448
- name: M.trim(),
449
- description: P.trim() || void 0,
450
- adapterType: I,
451
- priority: R,
452
- status: B
453
- }) ? f(`/channels/${p}`) : q(C("channel.updateFailed", "Failed to update channel"));
453
+ await _(f, {
454
+ name: N.trim(),
455
+ description: F.trim() || void 0,
456
+ adapterType: L,
457
+ priority: z,
458
+ status: V
459
+ }) ? d(`/channels/${f}`) : J(S("channel.updateFailed", "Failed to update channel"));
454
460
  } catch (e) {
455
- q(e instanceof Error ? e.message : C("channel.updateFailed", "Failed to update channel"));
461
+ J(e instanceof Error ? e.message : S("channel.updateFailed", "Failed to update channel"));
456
462
  } finally {
457
- U(!1);
463
+ W(!1);
458
464
  }
459
465
  }
460
466
  },
461
- disabled: H || !M.trim(),
467
+ disabled: U || !N.trim(),
462
468
  className: "px-6 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors flex items-center gap-2 disabled:opacity-50",
463
- children: [H ? /* @__PURE__ */ D(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ D(y, { className: "size-4 " }), C("channel.saveChanges", "Save Changes")]
469
+ children: [U ? /* @__PURE__ */ E(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ E(v, { className: "size-4 " }), S("channel.saveChanges", "Save Changes")]
464
470
  })]
465
471
  })]
466
472
  })
@@ -471,6 +477,6 @@ function M() {
471
477
  });
472
478
  }
473
479
  //#endregion
474
- export { M as EditChannelPage };
480
+ export { N as EditChannelPage };
475
481
 
476
482
  //# sourceMappingURL=EditChannelPage.js.map