@burdenoff/microfe-channel 2026.1013.2 → 2026.1114.1

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