@burdenoff/microfe-channel 2026.625.1 → 2026.625.2

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.
@@ -8,14 +8,14 @@ import { HEALTH_I18N as ee, PLATFORM_I18N as te, STATUS_I18N as ne, translateLab
8
8
  import { useExportChannels as re } from "../hooks/useExport.js";
9
9
  import { useEffect as u, useMemo as d, useRef as ie, useState as f } from "react";
10
10
  import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { AlertCircle as oe, AlertTriangle as p, CheckCircle2 as m, Download as se, Eye as ce, HelpCircle as h, Loader2 as g, Pencil as le, Plus as _, Power as ue, PowerOff as v, Radio as y, RefreshCw as de, Search as fe, Trash2 as pe, XCircle as b } from "lucide-react";
12
- import { useNavigate as me } from "react-router-dom";
13
- import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
14
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
15
- import { CTAOverflowMenu as ge, GlassCard as _e } from "@burdenoff/fe-libs/ui";
16
- import { TagBadge as ve } from "@burdenoff/fe-libs/tag";
11
+ import { AlertCircle as p, AlertTriangle as m, CheckCircle2 as h, Download as oe, Eye as se, HelpCircle as g, Loader2 as _, Pencil as ce, Plus as le, Power as ue, PowerOff as v, Radio as de, RefreshCw as fe, Search as pe, Trash2 as me, XCircle as y } from "lucide-react";
12
+ import { useNavigate as he } from "react-router-dom";
13
+ import { usePermissions as ge } from "@burdenoff/fe-libs/shared/providers/shell";
14
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ import { CTAOverflowMenu as _e, GlassCard as ve, IllustratedEmptyState as ye } from "@burdenoff/fe-libs/ui";
16
+ import { TagBadge as be } from "@burdenoff/fe-libs/tag";
17
17
  //#region src/channel/modules/channels/pages/ChannelsListPage.tsx
18
- var ye = {
18
+ var S = {
19
19
  EMAIL: {
20
20
  label: "Email",
21
21
  color: "bg-accent-blue-subtle text-accent-blue"
@@ -60,7 +60,7 @@ var ye = {
60
60
  ACTIVE: {
61
61
  label: "Active",
62
62
  color: "text-status-success-text bg-status-success-bg-subtle",
63
- icon: m
63
+ icon: h
64
64
  },
65
65
  INACTIVE: {
66
66
  label: "Inactive",
@@ -70,12 +70,12 @@ var ye = {
70
70
  ERROR: {
71
71
  label: "Error",
72
72
  color: "text-status-error-text bg-status-error-bg-subtle",
73
- icon: b
73
+ icon: y
74
74
  },
75
75
  SUSPENDED: {
76
76
  label: "Suspended",
77
77
  color: "text-status-warning-text bg-status-warning-bg-subtle",
78
- icon: p
78
+ icon: m
79
79
  },
80
80
  ARCHIVED: {
81
81
  label: "Archived",
@@ -86,33 +86,33 @@ var ye = {
86
86
  HEALTHY: {
87
87
  label: "Healthy",
88
88
  color: "text-status-success-text",
89
- icon: m
89
+ icon: h
90
90
  },
91
91
  DEGRADED: {
92
92
  label: "Degraded",
93
93
  color: "text-status-warning-text",
94
- icon: p
94
+ icon: m
95
95
  },
96
96
  UNHEALTHY: {
97
97
  label: "Unhealthy",
98
98
  color: "text-status-error-text",
99
- icon: b
99
+ icon: y
100
100
  },
101
101
  UNKNOWN: {
102
102
  label: "Unknown",
103
103
  color: "text-text-secondary",
104
- icon: h
104
+ icon: g
105
105
  }
106
106
  };
107
107
  function T() {
108
- let p = me(), { hasPermission: m } = he(), h = m(c.CHANNEL_CREATE), b = m(c.CHANNEL_UPDATE), T = m(c.CHANNEL_EXPORT), { t: be } = ae(), E = (e, t) => {
109
- let n = be(e);
108
+ let m = he(), { hasPermission: h } = ge(), g = h(c.CHANNEL_CREATE), y = h(c.CHANNEL_UPDATE), T = h(c.CHANNEL_EXPORT), { t: xe } = ae(), E = (e, t) => {
109
+ let n = xe(e);
110
110
  return n === e ? t : n;
111
- }, [xe, D] = f(null), [Se, O] = f(null), [k, A] = f(/* @__PURE__ */ new Set()), [j, M] = f(null), { organizationId: Ce } = e(), { triggerExport: we, isExporting: N, exportError: P } = re(Ce ?? void 0), [F] = f(12), [I, L] = f(0), { channels: R, isLoading: z, error: B, total: V, filter: H, updateFilter: U, deleteChannel: W, activateChannel: G, deactivateChannel: K, runHealthCheck: q, refetch: J } = o(), Y = Math.max(1, Math.ceil(V / F)), Te = ie(J);
111
+ }, [Se, D] = f(null), [Ce, O] = f(null), [k, A] = f(/* @__PURE__ */ new Set()), [j, M] = f(null), { organizationId: we } = e(), { triggerExport: Te, isExporting: N, exportError: P } = re(we ?? void 0), [F] = f(12), [I, L] = f(0), { channels: R, isLoading: z, error: B, total: V, filter: H, updateFilter: U, deleteChannel: W, activateChannel: G, deactivateChannel: K, runHealthCheck: q, refetch: J } = o(), Y = Math.max(1, Math.ceil(V / F)), Ee = ie(J);
112
112
  u(() => {
113
- Te.current = J;
113
+ Ee.current = J;
114
114
  }), u(() => {
115
- Te.current({
115
+ Ee.current({
116
116
  offset: I * F,
117
117
  limit: F
118
118
  });
@@ -133,7 +133,7 @@ function T() {
133
133
  ].map((e) => a(e, () => void J()));
134
134
  return () => e.forEach((e) => e());
135
135
  }, [J]);
136
- let Ee = async (e) => {
136
+ let De = async (e) => {
137
137
  n("medium"), O(e);
138
138
  try {
139
139
  await W(e), r("success"), D(null);
@@ -145,7 +145,7 @@ function T() {
145
145
  } finally {
146
146
  O(null);
147
147
  }
148
- }, De = async (e) => {
148
+ }, Oe = async (e) => {
149
149
  O(e.id);
150
150
  try {
151
151
  e.status === "ACTIVE" ? await K(e.id) : await G(e.id);
@@ -157,7 +157,7 @@ function T() {
157
157
  } finally {
158
158
  O(null);
159
159
  }
160
- }, Oe = async (e) => {
160
+ }, ke = async (e) => {
161
161
  O(e);
162
162
  try {
163
163
  await q(e);
@@ -169,19 +169,19 @@ function T() {
169
169
  } finally {
170
170
  O(null);
171
171
  }
172
- }, X = d(() => R.filter((e) => k.has(e.id)), [R, k]), Z = d(() => X.filter((e) => e.status === "ACTIVE"), [X]), Q = d(() => X.filter((e) => e.status !== "ACTIVE"), [X]), $ = R.length > 0 && R.every((e) => k.has(e.id)), ke = R.some((e) => k.has(e.id)) && !$, Ae = (e, t) => {
172
+ }, X = d(() => R.filter((e) => k.has(e.id)), [R, k]), Z = d(() => X.filter((e) => e.status === "ACTIVE"), [X]), Q = d(() => X.filter((e) => e.status !== "ACTIVE"), [X]), $ = R.length > 0 && R.every((e) => k.has(e.id)), Ae = R.some((e) => k.has(e.id)) && !$, je = (e, t) => {
173
173
  A((n) => {
174
174
  let r = new Set(n);
175
175
  return t ? r.add(e) : r.delete(e), r;
176
176
  });
177
- }, je = (e) => {
177
+ }, Me = (e) => {
178
178
  A((t) => {
179
179
  let n = new Set(t);
180
180
  return R.forEach((t) => {
181
181
  e ? n.add(t.id) : n.delete(t.id);
182
182
  }), n;
183
183
  });
184
- }, Me = async () => {
184
+ }, Ne = async () => {
185
185
  if (X.length === 0) return;
186
186
  n("medium");
187
187
  let e = E(X.length === 1 ? "channel.bulkDeleteConfirmSingle" : "channel.bulkDeleteConfirmMultiple", X.length === 1 ? "Delete 1 selected channel?" : `Delete ${X.length} selected channels?`), r = await t({
@@ -198,7 +198,7 @@ function T() {
198
198
  M(null);
199
199
  }
200
200
  }
201
- }, Ne = async () => {
201
+ }, Pe = async () => {
202
202
  if (Q.length !== 0) {
203
203
  M("activate");
204
204
  try {
@@ -207,7 +207,7 @@ function T() {
207
207
  M(null);
208
208
  }
209
209
  }
210
- }, Pe = async () => {
210
+ }, Fe = async () => {
211
211
  if (Z.length !== 0) {
212
212
  M("deactivate");
213
213
  try {
@@ -216,7 +216,7 @@ function T() {
216
216
  M(null);
217
217
  }
218
218
  }
219
- }, Fe = async () => {
219
+ }, Ie = async () => {
220
220
  if (X.length !== 0) {
221
221
  M("health");
222
222
  try {
@@ -225,30 +225,30 @@ function T() {
225
225
  M(null);
226
226
  }
227
227
  }
228
- }, Ie = (e) => ({
229
- ...ye[e] || {
228
+ }, Le = (e) => ({
229
+ ...S[e] || {
230
230
  label: e,
231
231
  color: "bg-bg-sunken text-text-secondary"
232
232
  },
233
233
  label: l(e, te, E)
234
- }), Le = (e) => ({
234
+ }), Re = (e) => ({
235
235
  ...C[e] || C.INACTIVE,
236
236
  label: l(e, ne, E)
237
- }), Re = (e) => ({
237
+ }), ze = (e) => ({
238
238
  ...w[e] || w.UNKNOWN,
239
239
  label: l(e, ee, E)
240
240
  });
241
- return /* @__PURE__ */ x(s, {
241
+ return /* @__PURE__ */ b(s, {
242
242
  permission: c.CHANNEL_READ,
243
- children: /* @__PURE__ */ S("div", {
243
+ children: /* @__PURE__ */ x("div", {
244
244
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
245
245
  children: [
246
- /* @__PURE__ */ S("div", {
246
+ /* @__PURE__ */ x("div", {
247
247
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
248
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
248
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
249
249
  className: "text-xl sm:text-2xl font-bold text-text-primary",
250
250
  children: E("channel.channels", "Channels")
251
- }), /* @__PURE__ */ S("p", {
251
+ }), /* @__PURE__ */ x("p", {
252
252
  className: "text-sm text-text-secondary mt-1",
253
253
  children: [
254
254
  E("channel.manageChannels", "Manage your communication channels"),
@@ -256,43 +256,43 @@ function T() {
256
256
  V,
257
257
  " total)"
258
258
  ]
259
- })] }), /* @__PURE__ */ x("div", {
259
+ })] }), /* @__PURE__ */ b("div", {
260
260
  className: "flex items-center gap-2",
261
261
  "data-tour": "channels-list-export-button",
262
- children: /* @__PURE__ */ x(ge, {
263
- primary: h ? {
262
+ children: /* @__PURE__ */ b(_e, {
263
+ primary: g ? {
264
264
  label: E("channel.createChannel", "Create Channel"),
265
- icon: /* @__PURE__ */ x(_, {
265
+ icon: /* @__PURE__ */ b(le, {
266
266
  size: 16,
267
267
  "aria-hidden": "true"
268
268
  }),
269
- onSelect: () => p("/channels/create")
269
+ onSelect: () => m("/channels/create")
270
270
  } : void 0,
271
271
  actions: T ? [{
272
272
  label: E("channel.export", "Export"),
273
- icon: N ? /* @__PURE__ */ x(g, {
273
+ icon: N ? /* @__PURE__ */ b(_, {
274
274
  size: 16,
275
275
  className: "animate-spin",
276
276
  "aria-hidden": "true"
277
- }) : /* @__PURE__ */ x(se, {
277
+ }) : /* @__PURE__ */ b(oe, {
278
278
  size: 16,
279
279
  "aria-hidden": "true"
280
280
  }),
281
281
  disabled: N,
282
- onSelect: () => void we()
282
+ onSelect: () => void Te()
283
283
  }] : []
284
284
  })
285
285
  })]
286
286
  }),
287
- /* @__PURE__ */ S("div", {
287
+ /* @__PURE__ */ x("div", {
288
288
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
289
289
  children: [
290
- /* @__PURE__ */ S("div", {
290
+ /* @__PURE__ */ x("div", {
291
291
  className: "relative flex-1",
292
- children: [/* @__PURE__ */ x(fe, {
292
+ children: [/* @__PURE__ */ b(pe, {
293
293
  size: 16,
294
294
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
295
- }), /* @__PURE__ */ x("input", {
295
+ }), /* @__PURE__ */ b("input", {
296
296
  "aria-label": E("channel.searchChannels", "Search channels..."),
297
297
  type: "text",
298
298
  placeholder: E("channel.searchChannels", "Search channels..."),
@@ -301,62 +301,62 @@ function T() {
301
301
  className: "w-full pl-9 pr-4 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
302
302
  })]
303
303
  }),
304
- /* @__PURE__ */ S("select", {
304
+ /* @__PURE__ */ x("select", {
305
305
  value: H.platform || "",
306
306
  onChange: (e) => U({ platform: e.target.value || void 0 }),
307
307
  className: "px-3 py-2 text-sm bg-bg-surface text-text-primary border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
308
- children: [/* @__PURE__ */ x("option", {
308
+ children: [/* @__PURE__ */ b("option", {
309
309
  value: "",
310
310
  children: E("channel.allPlatforms", "All Platforms")
311
- }), Object.entries(ye).map(([e, t]) => /* @__PURE__ */ x("option", {
311
+ }), Object.entries(S).map(([e, t]) => /* @__PURE__ */ b("option", {
312
312
  value: e,
313
313
  children: t.label
314
314
  }, e))]
315
315
  }),
316
- /* @__PURE__ */ S("select", {
316
+ /* @__PURE__ */ x("select", {
317
317
  value: H.status || "",
318
318
  onChange: (e) => U({ status: e.target.value || void 0 }),
319
319
  className: "px-3 py-2 text-sm bg-bg-surface text-text-primary border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
320
- children: [/* @__PURE__ */ x("option", {
320
+ children: [/* @__PURE__ */ b("option", {
321
321
  value: "",
322
322
  children: E("channel.allStatus", "All Status")
323
- }), Object.entries(C).map(([e, t]) => /* @__PURE__ */ x("option", {
323
+ }), Object.entries(C).map(([e, t]) => /* @__PURE__ */ b("option", {
324
324
  value: e,
325
325
  children: t.label
326
326
  }, e))]
327
327
  })
328
328
  ]
329
329
  }),
330
- P && /* @__PURE__ */ S("div", {
330
+ P && /* @__PURE__ */ x("div", {
331
331
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
332
- children: [/* @__PURE__ */ x(oe, {
332
+ children: [/* @__PURE__ */ b(p, {
333
333
  size: 20,
334
334
  className: "text-status-error-text"
335
- }), /* @__PURE__ */ x("p", {
335
+ }), /* @__PURE__ */ b("p", {
336
336
  className: "text-sm text-status-error-text flex-1",
337
337
  children: P
338
338
  })]
339
339
  }),
340
- R.length > 0 && /* @__PURE__ */ S(_e, {
340
+ R.length > 0 && /* @__PURE__ */ x(ve, {
341
341
  treatment: "plain",
342
342
  className: "flex flex-col gap-3 border-border-seam p-4 sm:flex-row sm:items-center sm:justify-between",
343
343
  "data-tour": "channels-list-bulk-actions",
344
- children: [/* @__PURE__ */ S("label", {
344
+ children: [/* @__PURE__ */ x("label", {
345
345
  className: "flex items-center gap-2 text-sm text-text-primary",
346
- children: [/* @__PURE__ */ x("input", {
346
+ children: [/* @__PURE__ */ b("input", {
347
347
  type: "checkbox",
348
348
  checked: $,
349
349
  ref: (e) => {
350
- e && (e.indeterminate = ke && !$);
350
+ e && (e.indeterminate = Ae && !$);
351
351
  },
352
- onChange: (e) => je(e.target.checked),
352
+ onChange: (e) => Me(e.target.checked),
353
353
  "aria-label": "Select all channels",
354
354
  className: "size-4 rounded border-border-subtle text-primary"
355
- }), /* @__PURE__ */ x("span", { children: E("channel.selectAllVisible", "Select all visible") })]
356
- }), /* @__PURE__ */ S("div", {
355
+ }), /* @__PURE__ */ b("span", { children: E("channel.selectAllVisible", "Select all visible") })]
356
+ }), /* @__PURE__ */ x("div", {
357
357
  className: "flex flex-wrap items-center gap-2",
358
358
  children: [
359
- /* @__PURE__ */ S("span", {
359
+ /* @__PURE__ */ x("span", {
360
360
  className: "text-sm text-text-secondary",
361
361
  children: [
362
362
  k.size,
@@ -364,47 +364,47 @@ function T() {
364
364
  E("channel.selectedCountLabel", "selected")
365
365
  ]
366
366
  }),
367
- k.size > 0 && /* @__PURE__ */ x("button", {
367
+ k.size > 0 && /* @__PURE__ */ b("button", {
368
368
  type: "button",
369
369
  onClick: () => A(/* @__PURE__ */ new Set()),
370
370
  className: "text-sm text-text-secondary hover:text-text-primary",
371
371
  children: E("channel.clearSelection", "Clear selection")
372
372
  }),
373
- /* @__PURE__ */ x(s, {
373
+ /* @__PURE__ */ b(s, {
374
374
  permission: c.CHANNEL_EXECUTE,
375
- children: /* @__PURE__ */ S("button", {
375
+ children: /* @__PURE__ */ x("button", {
376
376
  type: "button",
377
- onClick: Fe,
377
+ onClick: Ie,
378
378
  disabled: X.length === 0 || j !== null,
379
379
  className: "px-3 py-2 text-sm font-medium border border-border-subtle rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
380
380
  children: [E("channel.healthCheck", "Health Check"), X.length > 0 ? ` (${X.length})` : ""]
381
381
  })
382
382
  }),
383
- /* @__PURE__ */ x(s, {
383
+ /* @__PURE__ */ b(s, {
384
384
  permission: c.CHANNEL_UPDATE,
385
- children: /* @__PURE__ */ S("button", {
385
+ children: /* @__PURE__ */ x("button", {
386
386
  type: "button",
387
- onClick: Ne,
387
+ onClick: Pe,
388
388
  disabled: Q.length === 0 || j !== null,
389
389
  className: "px-3 py-2 text-sm font-medium border border-status-success-border/30 text-status-success-text rounded-md hover:bg-status-success-bg-subtle transition-colors disabled:opacity-50",
390
390
  children: [E("channel.activateSelected", "Activate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
391
391
  })
392
392
  }),
393
- /* @__PURE__ */ x(s, {
393
+ /* @__PURE__ */ b(s, {
394
394
  permission: c.CHANNEL_UPDATE,
395
- children: /* @__PURE__ */ S("button", {
395
+ children: /* @__PURE__ */ x("button", {
396
396
  type: "button",
397
- onClick: Pe,
397
+ onClick: Fe,
398
398
  disabled: Z.length === 0 || j !== null,
399
399
  className: "px-3 py-2 text-sm font-medium border border-status-warning-border text-status-warning-text rounded-md hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50",
400
400
  children: [E("channel.deactivateSelected", "Deactivate Selected"), Z.length > 0 ? ` (${Z.length})` : ""]
401
401
  })
402
402
  }),
403
- /* @__PURE__ */ x(s, {
403
+ /* @__PURE__ */ b(s, {
404
404
  permission: c.CHANNEL_DELETE,
405
- children: /* @__PURE__ */ S("button", {
405
+ children: /* @__PURE__ */ x("button", {
406
406
  type: "button",
407
- onClick: Me,
407
+ onClick: Ne,
408
408
  disabled: X.length === 0 || j !== null,
409
409
  className: "px-3 py-2 text-sm font-medium border border-status-error-border/30 text-status-error-text rounded-md hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
410
410
  children: [E("channel.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
@@ -413,21 +413,21 @@ function T() {
413
413
  ]
414
414
  })]
415
415
  }),
416
- B && /* @__PURE__ */ S("div", {
416
+ B && /* @__PURE__ */ x("div", {
417
417
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
418
418
  children: [
419
- /* @__PURE__ */ x(oe, {
419
+ /* @__PURE__ */ b(p, {
420
420
  size: 20,
421
421
  className: "text-status-error-text"
422
422
  }),
423
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
423
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
424
424
  className: "text-sm font-medium text-status-error-text",
425
425
  children: E("channel.loadFailed", "Failed to load channels")
426
- }), /* @__PURE__ */ x("p", {
426
+ }), /* @__PURE__ */ b("p", {
427
427
  className: "text-xs text-status-error-text",
428
428
  children: B
429
429
  })] }),
430
- /* @__PURE__ */ x("button", {
430
+ /* @__PURE__ */ b("button", {
431
431
  type: "button",
432
432
  onClick: () => J(),
433
433
  className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
@@ -435,121 +435,109 @@ function T() {
435
435
  })
436
436
  ]
437
437
  }),
438
- z && R.length === 0 && /* @__PURE__ */ x("div", {
438
+ z && R.length === 0 && /* @__PURE__ */ b("div", {
439
439
  className: "flex items-center justify-center py-12",
440
- children: /* @__PURE__ */ x(g, {
440
+ children: /* @__PURE__ */ b(_, {
441
441
  size: 32,
442
442
  className: "animate-spin text-accent-primary"
443
443
  })
444
444
  }),
445
- !z && !B && R.length === 0 && /* @__PURE__ */ S("div", {
446
- className: "flex flex-col items-center justify-center py-12 text-center",
447
- children: [
448
- /* @__PURE__ */ x(y, {
449
- size: 48,
450
- className: "text-text-secondary mb-4"
451
- }),
452
- /* @__PURE__ */ x("h3", {
453
- className: "text-lg font-semibold text-text-primary mb-2",
454
- children: E("channel.noChannelsFound", "No channels found")
455
- }),
456
- /* @__PURE__ */ x("p", {
457
- className: "text-sm text-text-secondary max-w-md mb-4",
458
- children: H.search || H.platform || H.status ? E("channel.adjustFilters", "Try adjusting your filters to see more channels.") : E("channel.createFirstChannelPrompt", "Create your first communication channel to get started.")
459
- }),
460
- h && !H.search && !H.platform && !H.status && /* @__PURE__ */ S("button", {
461
- type: "button",
462
- onClick: () => p("/channels/create"),
463
- 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",
464
- children: [/* @__PURE__ */ x(_, { size: 16 }), E("channel.createChannel", "Create Channel")]
465
- })
466
- ]
445
+ !z && !B && R.length === 0 && /* @__PURE__ */ b(ye, {
446
+ illustration: H.search || H.platform || H.status ? "empty-search" : "empty-data",
447
+ title: E("channel.noChannelsFound", "No channels found"),
448
+ description: H.search || H.platform || H.status ? E("channel.adjustFilters", "Try adjusting your filters to see more channels.") : E("channel.createFirstChannelPrompt", "Create your first communication channel to get started."),
449
+ action: g && !H.search && !H.platform && !H.status ? /* @__PURE__ */ x("button", {
450
+ type: "button",
451
+ onClick: () => m("/channels/create"),
452
+ 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",
453
+ children: [/* @__PURE__ */ b(le, { size: 16 }), E("channel.createChannel", "Create Channel")]
454
+ }) : void 0
467
455
  }),
468
- R.length > 0 && /* @__PURE__ */ x("div", {
456
+ R.length > 0 && /* @__PURE__ */ b("div", {
469
457
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
470
458
  "data-tour": "channels-list-grid",
471
459
  children: R.map((e) => {
472
- let t = Ie(e.platform), n = Le(e.status), r = Re(e.connectionHealth), i = n.icon, a = r.icon, o = Se === e.id;
473
- return /* @__PURE__ */ S(_e, {
460
+ let t = Le(e.platform), n = Re(e.status), r = ze(e.connectionHealth), i = n.icon, a = r.icon, o = Ce === e.id;
461
+ return /* @__PURE__ */ x(ve, {
474
462
  treatment: "insight",
475
463
  className: `p-4 transition-colors group ${k.has(e.id) ? "ring-2 ring-action-primary-bg border-action-primary-bg/40" : "border-border-seam"}`,
476
464
  children: [
477
- /* @__PURE__ */ S("div", {
465
+ /* @__PURE__ */ x("div", {
478
466
  className: "flex items-start justify-between mb-3",
479
- children: [/* @__PURE__ */ S("div", {
467
+ children: [/* @__PURE__ */ x("div", {
480
468
  className: "flex items-center gap-2",
481
469
  children: [
482
- /* @__PURE__ */ x("input", {
470
+ /* @__PURE__ */ b("input", {
483
471
  type: "checkbox",
484
472
  checked: k.has(e.id),
485
- onChange: (t) => Ae(e.id, t.target.checked),
473
+ onChange: (t) => je(e.id, t.target.checked),
486
474
  "aria-label": `Select channel ${e.name}`,
487
475
  className: "size-4 rounded border-border-subtle text-primary"
488
476
  }),
489
- /* @__PURE__ */ x(y, {
477
+ /* @__PURE__ */ b(de, {
490
478
  size: 20,
491
479
  className: "text-accent-primary"
492
480
  }),
493
- /* @__PURE__ */ x("span", {
481
+ /* @__PURE__ */ b("span", {
494
482
  className: `px-2 py-0.5 text-xs font-semibold rounded-full ${t.color}`,
495
483
  children: t.label
496
484
  })
497
485
  ]
498
- }), /* @__PURE__ */ S("div", {
486
+ }), /* @__PURE__ */ x("div", {
499
487
  className: "flex items-center gap-1",
500
- children: [/* @__PURE__ */ x(i, {
488
+ children: [/* @__PURE__ */ b(i, {
501
489
  size: 14,
502
490
  className: n.color.split(" ")[0]
503
- }), /* @__PURE__ */ x("span", {
504
- className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color}`,
491
+ }), /* @__PURE__ */ b("span", {
492
+ className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color} ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
505
493
  children: n.label
506
494
  })]
507
495
  })]
508
496
  }),
509
- /* @__PURE__ */ S("div", {
497
+ /* @__PURE__ */ x("div", {
510
498
  role: "button",
511
499
  tabIndex: 0,
512
- onClick: () => p(`/channels/${e.id}`),
500
+ onClick: () => m(`/channels/${e.id}`),
513
501
  onKeyDown: (t) => {
514
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), p(`/channels/${e.id}`));
502
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), m(`/channels/${e.id}`));
515
503
  },
516
504
  className: "cursor-pointer",
517
505
  children: [
518
- /* @__PURE__ */ x("h3", {
506
+ /* @__PURE__ */ b("h3", {
519
507
  className: "text-sm font-semibold text-text-primary mb-1 truncate",
520
508
  children: e.name
521
509
  }),
522
- e.description && /* @__PURE__ */ x("p", {
510
+ e.description && /* @__PURE__ */ b("p", {
523
511
  className: "text-xs text-text-secondary mb-2 line-clamp-2",
524
512
  children: e.description
525
513
  }),
526
- e.adapterType && /* @__PURE__ */ x("p", {
514
+ e.adapterType && /* @__PURE__ */ b("p", {
527
515
  className: "text-xs text-text-secondary mb-2 font-mono",
528
516
  children: e.adapterType.replace(/_/g, " ")
529
517
  }),
530
- /* @__PURE__ */ x("div", {
518
+ /* @__PURE__ */ b("div", {
531
519
  className: "flex items-center gap-3 text-xs text-text-secondary mb-2",
532
- children: /* @__PURE__ */ S("span", { children: [
520
+ children: /* @__PURE__ */ x("span", { children: [
533
521
  E("channel.priority", "Priority"),
534
522
  ": ",
535
523
  e.priority
536
524
  ] })
537
525
  }),
538
- /* @__PURE__ */ S("div", {
526
+ /* @__PURE__ */ x("div", {
539
527
  className: "flex items-center gap-3 text-xs",
540
528
  children: [
541
- /* @__PURE__ */ S("div", {
529
+ /* @__PURE__ */ x("div", {
542
530
  className: "flex items-center gap-1",
543
- children: [/* @__PURE__ */ x(a, {
531
+ children: [/* @__PURE__ */ b(a, {
544
532
  size: 12,
545
533
  className: r.color
546
- }), /* @__PURE__ */ x("span", {
534
+ }), /* @__PURE__ */ b("span", {
547
535
  className: r.color,
548
536
  children: r.label
549
537
  })]
550
538
  }),
551
- /* @__PURE__ */ x("span", { children: "•" }),
552
- /* @__PURE__ */ x("span", {
539
+ /* @__PURE__ */ b("span", { children: "•" }),
540
+ /* @__PURE__ */ b("span", {
553
541
  className: e.isConnected ? "text-status-success-text" : "text-text-secondary",
554
542
  children: e.isConnected ? E("channel.connected", "Connected") : E("channel.notConnected", "Not Connected")
555
543
  })
@@ -557,92 +545,92 @@ function T() {
557
545
  })
558
546
  ]
559
547
  }),
560
- e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
548
+ e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ x("div", {
561
549
  className: "flex flex-wrap gap-1 mt-2",
562
550
  "aria-label": "Channel tags",
563
- children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(ve, {
551
+ children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ b(be, {
564
552
  id: e.tagId,
565
553
  label: e.tagId,
566
554
  size: "sm"
567
- }, e.id)), e.tagAssignments.length > 4 && /* @__PURE__ */ S("span", {
555
+ }, e.id)), e.tagAssignments.length > 4 && /* @__PURE__ */ x("span", {
568
556
  className: "text-xs text-text-secondary",
569
557
  children: ["+", e.tagAssignments.length - 4]
570
558
  })]
571
559
  }),
572
- /* @__PURE__ */ S("div", {
560
+ /* @__PURE__ */ x("div", {
573
561
  className: "mt-3 pt-3 border-t border-border-subtle flex items-center justify-between opacity-0 group-hover:opacity-100 transition-opacity",
574
- children: [/* @__PURE__ */ S("div", {
562
+ children: [/* @__PURE__ */ x("div", {
575
563
  className: "flex items-center gap-1",
576
564
  children: [
577
- /* @__PURE__ */ x("button", {
565
+ /* @__PURE__ */ b("button", {
578
566
  type: "button",
579
- onClick: () => p(`/channels/${e.id}`),
567
+ onClick: () => m(`/channels/${e.id}`),
580
568
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
581
569
  title: E("channel.viewDetails", "View Details"),
582
- children: /* @__PURE__ */ x(ce, { size: 14 })
570
+ children: /* @__PURE__ */ b(se, { size: 14 })
583
571
  }),
584
- b && /* @__PURE__ */ x("button", {
572
+ y && /* @__PURE__ */ b("button", {
585
573
  type: "button",
586
- onClick: () => p(`/channels/${e.id}/edit`),
574
+ onClick: () => m(`/channels/${e.id}/edit`),
587
575
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
588
576
  title: E("channel.editChannel", "Edit Channel"),
589
- children: /* @__PURE__ */ x(le, { size: 14 })
577
+ children: /* @__PURE__ */ b(ce, { size: 14 })
590
578
  }),
591
- /* @__PURE__ */ x(s, {
579
+ /* @__PURE__ */ b(s, {
592
580
  permission: c.CHANNEL_EXECUTE,
593
- children: /* @__PURE__ */ x("button", {
581
+ children: /* @__PURE__ */ b("button", {
594
582
  type: "button",
595
- onClick: () => Oe(e.id),
583
+ onClick: () => ke(e.id),
596
584
  disabled: o,
597
585
  className: "p-1.5 text-text-secondary hover:text-status-info-text hover:bg-status-info-bg-subtle rounded transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",
598
586
  title: E("channel.runHealthCheck", "Run Health Check"),
599
- children: o ? /* @__PURE__ */ x(g, {
587
+ children: o ? /* @__PURE__ */ b(_, {
600
588
  size: 14,
601
589
  className: "animate-spin"
602
- }) : /* @__PURE__ */ x(de, { size: 14 })
590
+ }) : /* @__PURE__ */ b(fe, { size: 14 })
603
591
  })
604
592
  }),
605
- /* @__PURE__ */ x(s, {
593
+ /* @__PURE__ */ b(s, {
606
594
  permission: c.CHANNEL_UPDATE,
607
- children: /* @__PURE__ */ x("button", {
595
+ children: /* @__PURE__ */ b("button", {
608
596
  type: "button",
609
- onClick: () => De(e),
597
+ onClick: () => Oe(e),
610
598
  disabled: o,
611
599
  className: `p-1.5 rounded transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed ${e.status === "ACTIVE" ? "text-text-secondary hover:text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-text-secondary hover:text-status-success-text hover:bg-status-success-bg-subtle"}`,
612
600
  title: e.status === "ACTIVE" ? E("channel.deactivate", "Deactivate") : E("channel.activate", "Activate"),
613
- children: e.status === "ACTIVE" ? /* @__PURE__ */ x(v, { size: 14 }) : /* @__PURE__ */ x(ue, { size: 14 })
601
+ children: e.status === "ACTIVE" ? /* @__PURE__ */ b(v, { size: 14 }) : /* @__PURE__ */ b(ue, { size: 14 })
614
602
  })
615
603
  })
616
604
  ]
617
- }), xe === e.id ? /* @__PURE__ */ S("div", {
605
+ }), Se === e.id ? /* @__PURE__ */ x("div", {
618
606
  className: "flex items-center gap-2",
619
607
  children: [
620
- /* @__PURE__ */ x("span", {
608
+ /* @__PURE__ */ b("span", {
621
609
  className: "text-xs text-text-secondary",
622
610
  children: E("channel.deleteQuestion", "Delete?")
623
611
  }),
624
- /* @__PURE__ */ x("button", {
612
+ /* @__PURE__ */ b("button", {
625
613
  type: "button",
626
- onClick: () => Ee(e.id),
614
+ onClick: () => De(e.id),
627
615
  disabled: o,
628
616
  className: "px-2 py-1 text-xs text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer disabled:cursor-not-allowed",
629
617
  children: o ? "..." : E("channel.yes", "Yes")
630
618
  }),
631
- /* @__PURE__ */ x("button", {
619
+ /* @__PURE__ */ b("button", {
632
620
  type: "button",
633
621
  onClick: () => D(null),
634
622
  className: "px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken rounded transition-colors cursor-pointer",
635
623
  children: E("channel.no", "No")
636
624
  })
637
625
  ]
638
- }) : /* @__PURE__ */ x(s, {
626
+ }) : /* @__PURE__ */ b(s, {
639
627
  permission: c.CHANNEL_DELETE,
640
- children: /* @__PURE__ */ x("button", {
628
+ children: /* @__PURE__ */ b("button", {
641
629
  type: "button",
642
630
  onClick: () => D(e.id),
643
631
  className: "p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer",
644
632
  title: E("channel.deleteChannel", "Delete Channel"),
645
- children: /* @__PURE__ */ x(pe, { size: 14 })
633
+ children: /* @__PURE__ */ b(me, { size: 14 })
646
634
  })
647
635
  })]
648
636
  })
@@ -650,14 +638,14 @@ function T() {
650
638
  }, e.id);
651
639
  })
652
640
  }),
653
- V > F && /* @__PURE__ */ S("div", {
641
+ V > F && /* @__PURE__ */ x("div", {
654
642
  className: "flex items-center justify-between px-1 py-2",
655
- children: [/* @__PURE__ */ S("p", {
643
+ children: [/* @__PURE__ */ x("p", {
656
644
  className: "text-sm text-text-secondary",
657
645
  children: [
658
646
  E("channel.showing", "Showing"),
659
647
  " ",
660
- /* @__PURE__ */ S("span", {
648
+ /* @__PURE__ */ x("span", {
661
649
  className: "font-medium text-text-primary",
662
650
  children: [
663
651
  I * F + 1,
@@ -668,24 +656,24 @@ function T() {
668
656
  " ",
669
657
  E("channel.of", "of"),
670
658
  " ",
671
- /* @__PURE__ */ x("span", {
659
+ /* @__PURE__ */ b("span", {
672
660
  className: "font-medium text-text-primary",
673
661
  children: V
674
662
  }),
675
663
  " ",
676
664
  E("channel.channelsLower", "channels")
677
665
  ]
678
- }), /* @__PURE__ */ S("div", {
666
+ }), /* @__PURE__ */ x("div", {
679
667
  className: "flex items-center gap-2",
680
668
  children: [
681
- /* @__PURE__ */ x("button", {
669
+ /* @__PURE__ */ b("button", {
682
670
  type: "button",
683
671
  onClick: () => L((e) => Math.max(0, e - 1)),
684
672
  disabled: I === 0,
685
673
  className: "px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
686
674
  children: E("channel.previous", "Previous")
687
675
  }),
688
- /* @__PURE__ */ S("span", {
676
+ /* @__PURE__ */ x("span", {
689
677
  className: "text-sm text-text-secondary",
690
678
  children: [
691
679
  I + 1,
@@ -693,7 +681,7 @@ function T() {
693
681
  Y
694
682
  ]
695
683
  }),
696
- /* @__PURE__ */ x("button", {
684
+ /* @__PURE__ */ b("button", {
697
685
  type: "button",
698
686
  onClick: () => L((e) => Math.min(Y - 1, e + 1)),
699
687
  disabled: I >= Y - 1,