@burdenoff/microfe-channel 2026.805.1 → 2026.830.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.
Files changed (50) hide show
  1. package/dist/channel/ChannelRoot.d.ts.map +1 -1
  2. package/dist/channel/ChannelRoot.js +32 -35
  3. package/dist/channel/ChannelRoot.js.map +1 -1
  4. package/dist/channel/components/AdapterCredentialsForm.d.ts.map +1 -1
  5. package/dist/channel/components/AdapterCredentialsForm.js +52 -58
  6. package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
  7. package/dist/channel/components/FeatureNotEnabled.d.ts.map +1 -1
  8. package/dist/channel/components/FeatureNotEnabled.js +27 -22
  9. package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
  10. package/dist/channel/components/MarkdownEditor.d.ts.map +1 -1
  11. package/dist/channel/components/MarkdownEditor.js +78 -77
  12. package/dist/channel/components/MarkdownEditor.js.map +1 -1
  13. package/dist/channel/components/PermissionGuard.d.ts.map +1 -1
  14. package/dist/channel/components/PermissionGuard.js +6 -9
  15. package/dist/channel/components/PermissionGuard.js.map +1 -1
  16. package/dist/channel/hooks/useTr.d.ts +17 -0
  17. package/dist/channel/hooks/useTr.d.ts.map +1 -0
  18. package/dist/channel/hooks/useTr.js +14 -0
  19. package/dist/channel/hooks/useTr.js.map +1 -0
  20. package/dist/channel/modules/channels/i18n.js +24 -24
  21. package/dist/channel/modules/channels/i18n.js.map +1 -1
  22. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +2 -2
  23. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  24. package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +1 -1
  25. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +232 -226
  26. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +1 -1
  28. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +152 -146
  29. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  30. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +1 -1
  31. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +112 -114
  32. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  33. package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts.map +1 -1
  34. package/dist/channel/modules/channels/pages/CreateChannelPage.js +300 -269
  35. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  36. package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts.map +1 -1
  37. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +108 -102
  38. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  39. package/dist/channel/modules/channels/pages/EditChannelPage.d.ts.map +1 -1
  40. package/dist/channel/modules/channels/pages/EditChannelPage.js +384 -343
  41. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  42. package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +1 -1
  43. package/dist/channel/modules/channels/pages/SendMessagePage.js +170 -156
  44. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  45. package/dist/channel/pages/ChannelLandingPage.d.ts.map +1 -1
  46. package/dist/channel/pages/ChannelLandingPage.js +47 -50
  47. package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
  48. package/dist/translations/en.d.ts +271 -4
  49. package/dist/translations/en.d.ts.map +1 -1
  50. package/package.json +1 -1
@@ -1,393 +1,434 @@
1
- import { nativeImpact as e, nativeNotify as t } from "../../../../utils/nativeBridge.js";
2
- import { useChannel as n, useChannels as r } from "../../../hooks/useChannels.js";
3
- import { PermissionGuard as i } from "../../../components/PermissionGuard.js";
4
- import { CHANNEL_PERMISSIONS as a } from "../../../constants/permissions.js";
5
- import { MarkdownEditor as o } from "../../../components/MarkdownEditor.js";
6
- import { useEffect as s, useRef as c, useState as l } from "react";
7
- import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { AlertCircle as u, ArrowLeft as d, Bell as f, Hash as p, Inbox as m, Loader2 as h, Mail as g, MessageCircle as _, MessageSquare as v, Save as y, Send as b, Smartphone as x, Trash2 as S, Users as C } from "lucide-react";
9
- import { useNavigate as w, useParams as T } from "react-router";
10
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
11
- import { EmphasisPanel as te, GlassCard as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
1
+ import { useTr as e } from "../../../hooks/useTr.js";
2
+ import { nativeImpact as t, nativeNotify as n } from "../../../../utils/nativeBridge.js";
3
+ import { useChannel as r, useChannels as i } from "../../../hooks/useChannels.js";
4
+ import { PermissionGuard as a } from "../../../components/PermissionGuard.js";
5
+ import { CHANNEL_PERMISSIONS as o } from "../../../constants/permissions.js";
6
+ import { MarkdownEditor as ee } from "../../../components/MarkdownEditor.js";
7
+ import { useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
8
+ import { AlertCircle as d, ArrowLeft as te, Bell as ne, Hash as re, Inbox as ie, Loader2 as f, Mail as p, MessageCircle as m, MessageSquare as h, Save as g, Send as _, Smartphone as v, Trash2 as y, Users as b } from "lucide-react";
9
+ import { useNavigate as x, useParams as S } from "react-router";
10
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
11
+ import { EmphasisPanel as ae, GlassCard as oe, PagePurpose as se } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/channel/modules/channels/pages/EditChannelPage.tsx
13
- var j = [
14
- {
15
- value: "EMAIL",
16
- label: "Email",
17
- description: "Send emails via various providers",
18
- icon: g,
19
- color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
20
- adapters: [
21
- {
22
- value: "AWS_SES",
23
- label: "AWS SES"
24
- },
25
- {
26
- value: "MAILGUN",
27
- label: "Mailgun"
28
- },
29
- {
30
- value: "POSTMARK",
31
- label: "Postmark"
32
- },
33
- {
34
- value: "MANDRILL",
35
- label: "Mandrill"
36
- },
37
- {
38
- value: "RESEND",
39
- label: "Resend"
40
- },
41
- {
42
- value: "AZURE_ACS",
43
- label: "Azure Communication Services"
44
- },
45
- {
46
- value: "SMTP",
47
- label: "Custom SMTP"
48
- }
49
- ]
50
- },
51
- {
52
- value: "SMS",
53
- label: "SMS",
54
- description: "Send text messages",
55
- icon: x,
56
- color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
57
- adapters: [
58
- {
59
- value: "TWILIO_SMS",
60
- label: "Twilio"
61
- },
62
- {
63
- value: "AWS_SNS",
64
- label: "AWS SNS"
65
- },
66
- {
67
- value: "VONAGE",
68
- label: "Vonage"
69
- },
70
- {
71
- value: "PLIVO",
72
- label: "Plivo"
73
- },
74
- {
75
- value: "MESSAGEBIRD",
76
- label: "MessageBird"
77
- },
78
- {
79
- value: "INFOBIP",
80
- label: "Infobip"
81
- }
82
- ]
83
- },
84
- {
85
- value: "PUSH",
86
- label: "Push",
87
- description: "Mobile & web push",
88
- icon: f,
89
- color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
90
- adapters: [
91
- {
92
- value: "FCM",
93
- label: "Firebase Cloud Messaging"
94
- },
95
- {
96
- value: "APNS",
97
- label: "Apple Push Notification Service"
98
- },
99
- {
100
- value: "ONESIGNAL",
101
- label: "OneSignal"
102
- },
103
- {
104
- value: "EXPO",
105
- label: "Expo Push"
106
- }
107
- ]
108
- },
109
- {
110
- value: "INAPP",
111
- label: "In-App",
112
- description: "Internal in-app notifications",
113
- icon: m,
114
- color: "text-status-warning-text bg-status-warning-bg-subtle border-status-warning-border/30",
115
- adapters: [{
116
- value: "INAPP_NATIVE",
117
- label: "Native In-App"
118
- }]
119
- },
120
- {
121
- value: "WHATSAPP",
122
- label: "WhatsApp",
123
- description: "WhatsApp Business messaging",
124
- icon: v,
125
- color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
126
- adapters: [{
127
- value: "WHATSAPP_CLOUD",
128
- label: "WhatsApp Cloud API"
129
- }, {
130
- value: "WHATSAPP_TWILIO",
131
- label: "WhatsApp via Twilio"
132
- }]
133
- },
134
- {
135
- value: "SLACK",
136
- label: "Slack",
137
- description: "Slack bot & channels",
138
- icon: p,
139
- color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
140
- adapters: [{
141
- value: "SLACK_BOT",
142
- label: "Slack Bot"
143
- }]
144
- },
145
- {
146
- value: "TEAMS",
147
- label: "Teams",
148
- description: "Microsoft Teams",
149
- icon: C,
150
- color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
151
- adapters: [{
152
- value: "TEAMS_BOT",
153
- label: "Teams Bot"
154
- }]
155
- },
156
- {
157
- value: "DISCORD",
158
- label: "Discord",
159
- description: "Discord bots & webhooks",
160
- icon: _,
161
- color: "text-accent-indigo bg-accent-indigo-subtle border-accent-indigo/30",
162
- adapters: [{
163
- value: "DISCORD_BOT",
164
- label: "Discord Bot"
165
- }]
166
- },
167
- {
168
- value: "WEBCHAT",
169
- label: "Webchat",
170
- description: "Website live chat",
171
- icon: v,
172
- color: "text-accent-teal bg-accent-teal-subtle border-accent-teal/30",
173
- adapters: [{
174
- value: "WEBCHAT_NATIVE",
175
- label: "Native Webchat"
176
- }]
177
- },
178
- {
179
- value: "WEBHOOK",
180
- label: "Webhook",
181
- description: "Generic HTTP webhook",
182
- icon: b,
183
- color: "text-text-secondary bg-bg-sunken/50 border-border-subtle",
184
- adapters: [{
185
- value: "WEBHOOK_HTTP",
186
- label: "HTTP Webhook"
187
- }]
188
- }
189
- ], M = [
190
- {
191
- value: 0,
192
- label: "0 - Lowest"
193
- },
194
- {
195
- value: 1,
196
- label: "1 - Low"
197
- },
198
- {
199
- value: 2,
200
- label: "2 - Normal"
201
- },
202
- {
203
- value: 3,
204
- label: "3 - High"
205
- },
206
- {
207
- value: 4,
208
- label: "4 - Highest"
209
- }
210
- ];
211
- function N() {
212
- let f = w(), { channelId: p } = T(), { channel: m, isLoading: g, error: _ } = n(p), { updateChannel: v, deleteChannel: b } = r(), { t: x } = ee(), C = (e, t) => {
213
- let n = x(e);
214
- return n === e ? t : n;
215
- }, [N, P] = l(""), [F, I] = l(""), [L, R] = l("AWS_SES"), [z, B] = l(2), [V, H] = l("INACTIVE"), [U, W] = l(!1), [G, K] = l(!1), [q, J] = l(null), [Y, X] = l(!1), Z = c(null);
13
+ function E() {
14
+ let E = x(), { channelId: D } = S(), { channel: O, isLoading: ce, error: le } = r(D), { updateChannel: k, deleteChannel: A } = i(), j = e(), M = c(() => [
15
+ {
16
+ value: "EMAIL",
17
+ labelKey: "channel.platformLabel.email",
18
+ labelFallback: "Email",
19
+ descriptionKey: "channel.platformDescription.emailDescription",
20
+ descriptionFallback: "Send emails via various providers",
21
+ icon: p,
22
+ color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
23
+ adapters: [
24
+ {
25
+ value: "AWS_SES",
26
+ labelKey: "channel.adapter.awsSes",
27
+ labelFallback: "AWS SES"
28
+ },
29
+ {
30
+ value: "MAILGUN",
31
+ labelKey: "channel.adapter.mailgun",
32
+ labelFallback: "Mailgun"
33
+ },
34
+ {
35
+ value: "POSTMARK",
36
+ labelKey: "channel.adapter.postmark",
37
+ labelFallback: "Postmark"
38
+ },
39
+ {
40
+ value: "MANDRILL",
41
+ labelKey: "channel.adapter.mandrill",
42
+ labelFallback: "Mandrill"
43
+ },
44
+ {
45
+ value: "RESEND",
46
+ labelKey: "channel.adapter.resend",
47
+ labelFallback: "Resend"
48
+ },
49
+ {
50
+ value: "AZURE_ACS",
51
+ labelKey: "channel.adapter.azureAcs",
52
+ labelFallback: "Azure Communication Services"
53
+ },
54
+ {
55
+ value: "SMTP",
56
+ labelKey: "channel.adapter.smtp",
57
+ labelFallback: "Custom SMTP"
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ value: "SMS",
63
+ labelKey: "channel.platformLabel.sms",
64
+ labelFallback: "SMS",
65
+ descriptionKey: "channel.platformDescription.smsDescription",
66
+ descriptionFallback: "Send text messages",
67
+ icon: v,
68
+ color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
69
+ adapters: [
70
+ {
71
+ value: "TWILIO_SMS",
72
+ labelKey: "channel.adapter.twilio",
73
+ labelFallback: "Twilio"
74
+ },
75
+ {
76
+ value: "AWS_SNS",
77
+ labelKey: "channel.adapter.awsSns",
78
+ labelFallback: "AWS SNS"
79
+ },
80
+ {
81
+ value: "VONAGE",
82
+ labelKey: "channel.adapter.vonage",
83
+ labelFallback: "Vonage"
84
+ },
85
+ {
86
+ value: "PLIVO",
87
+ labelKey: "channel.adapter.plivo",
88
+ labelFallback: "Plivo"
89
+ },
90
+ {
91
+ value: "MESSAGEBIRD",
92
+ labelKey: "channel.adapter.messagebird",
93
+ labelFallback: "MessageBird"
94
+ },
95
+ {
96
+ value: "INFOBIP",
97
+ labelKey: "channel.adapter.infobip",
98
+ labelFallback: "Infobip"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ value: "PUSH",
104
+ labelKey: "channel.platformLabel.push",
105
+ labelFallback: "Push",
106
+ descriptionKey: "channel.platformDescription.pushDescription",
107
+ descriptionFallback: "Mobile & web push",
108
+ icon: ne,
109
+ color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
110
+ adapters: [
111
+ {
112
+ value: "FCM",
113
+ labelKey: "channel.adapter.fcm",
114
+ labelFallback: "Firebase Cloud Messaging"
115
+ },
116
+ {
117
+ value: "APNS",
118
+ labelKey: "channel.adapter.apns",
119
+ labelFallback: "Apple Push Notification Service"
120
+ },
121
+ {
122
+ value: "ONESIGNAL",
123
+ labelKey: "channel.adapter.onesignal",
124
+ labelFallback: "OneSignal"
125
+ },
126
+ {
127
+ value: "EXPO",
128
+ labelKey: "channel.adapter.expo",
129
+ labelFallback: "Expo Push"
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ value: "INAPP",
135
+ labelKey: "channel.platformLabel.inApp",
136
+ labelFallback: "In-App",
137
+ descriptionKey: "channel.platformDescription.inAppDescription",
138
+ descriptionFallback: "Internal in-app notifications",
139
+ icon: ie,
140
+ color: "text-status-warning-text bg-status-warning-bg-subtle border-status-warning-border/30",
141
+ adapters: [{
142
+ value: "INAPP_NATIVE",
143
+ labelKey: "channel.adapter.inAppNative",
144
+ labelFallback: "Native In-App"
145
+ }]
146
+ },
147
+ {
148
+ value: "WHATSAPP",
149
+ labelKey: "channel.platformLabel.whatsapp",
150
+ labelFallback: "WhatsApp",
151
+ descriptionKey: "channel.platformDescription.whatsappDescription",
152
+ descriptionFallback: "WhatsApp Business messaging",
153
+ icon: h,
154
+ color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
155
+ adapters: [{
156
+ value: "WHATSAPP_CLOUD",
157
+ labelKey: "channel.adapter.whatsappCloud",
158
+ labelFallback: "WhatsApp Cloud API"
159
+ }, {
160
+ value: "WHATSAPP_TWILIO",
161
+ labelKey: "channel.adapter.whatsappTwilio",
162
+ labelFallback: "WhatsApp via Twilio"
163
+ }]
164
+ },
165
+ {
166
+ value: "SLACK",
167
+ labelKey: "channel.platformLabel.slack",
168
+ labelFallback: "Slack",
169
+ descriptionKey: "channel.platformDescription.slackDescription",
170
+ descriptionFallback: "Slack bot & channels",
171
+ icon: re,
172
+ color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
173
+ adapters: [{
174
+ value: "SLACK_BOT",
175
+ labelKey: "channel.adapter.slackBot",
176
+ labelFallback: "Slack Bot"
177
+ }]
178
+ },
179
+ {
180
+ value: "TEAMS",
181
+ labelKey: "channel.platformLabel.teams",
182
+ labelFallback: "Teams",
183
+ descriptionKey: "channel.platformDescription.teamsDescription",
184
+ descriptionFallback: "Microsoft Teams",
185
+ icon: b,
186
+ color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
187
+ adapters: [{
188
+ value: "TEAMS_BOT",
189
+ labelKey: "channel.adapter.teamsBot",
190
+ labelFallback: "Teams Bot"
191
+ }]
192
+ },
193
+ {
194
+ value: "DISCORD",
195
+ labelKey: "channel.platformLabel.discord",
196
+ labelFallback: "Discord",
197
+ descriptionKey: "channel.platformDescription.discordDescription",
198
+ descriptionFallback: "Discord bots & webhooks",
199
+ icon: m,
200
+ color: "text-accent-indigo bg-accent-indigo-subtle border-accent-indigo/30",
201
+ adapters: [{
202
+ value: "DISCORD_BOT",
203
+ labelKey: "channel.adapter.discordBot",
204
+ labelFallback: "Discord Bot"
205
+ }]
206
+ },
207
+ {
208
+ value: "WEBCHAT",
209
+ labelKey: "channel.platformLabel.webchat",
210
+ labelFallback: "Webchat",
211
+ descriptionKey: "channel.platformDescription.webchatDescription",
212
+ descriptionFallback: "Website live chat",
213
+ icon: h,
214
+ color: "text-accent-teal bg-accent-teal-subtle border-accent-teal/30",
215
+ adapters: [{
216
+ value: "WEBCHAT_NATIVE",
217
+ labelKey: "channel.adapter.webchatNative",
218
+ labelFallback: "Native Webchat"
219
+ }]
220
+ },
221
+ {
222
+ value: "WEBHOOK",
223
+ labelKey: "channel.platformLabel.webhook",
224
+ labelFallback: "Webhook",
225
+ descriptionKey: "channel.platformDescription.webhookDescription",
226
+ descriptionFallback: "Generic HTTP webhook",
227
+ icon: _,
228
+ color: "text-text-secondary bg-bg-sunken/50 border-border-subtle",
229
+ adapters: [{
230
+ value: "WEBHOOK_HTTP",
231
+ labelKey: "channel.adapter.webhookHttp",
232
+ labelFallback: "HTTP Webhook"
233
+ }]
234
+ }
235
+ ], []), N = c(() => [
236
+ {
237
+ value: 0,
238
+ label: j("channel.priorityLabel.lowest", "0 - Lowest")
239
+ },
240
+ {
241
+ value: 1,
242
+ label: j("channel.priorityLabel.low", "1 - Low")
243
+ },
244
+ {
245
+ value: 2,
246
+ label: j("channel.priorityLabel.normal", "2 - Normal")
247
+ },
248
+ {
249
+ value: 3,
250
+ label: j("channel.priorityLabel.high", "3 - High")
251
+ },
252
+ {
253
+ value: 4,
254
+ label: j("channel.priorityLabel.highest", "4 - Highest")
255
+ }
256
+ ], [j]), [P, F] = u(""), [I, L] = u(""), [R, z] = u("AWS_SES"), [B, V] = u(2), [H, U] = u("INACTIVE"), [W, G] = u(!1), [K, q] = u(!1), [J, Y] = u(null), [X, Z] = u(!1), Q = l(null);
216
257
  s(() => {
217
- m && m.id !== Z.current && (Z.current = m.id, Promise.resolve().then(() => {
218
- P(m.name || ""), I(m.description || ""), R(m.adapterType || "AWS_SES"), B(m.priority || 2), H(m.status || "INACTIVE");
258
+ O && O.id !== Q.current && (Q.current = O.id, Promise.resolve().then(() => {
259
+ F(O.name || ""), L(O.description || ""), z(O.adapterType || "AWS_SES"), V(O.priority || 2), U(O.status || "INACTIVE");
219
260
  }));
220
- }, [m]);
221
- let Q = m?.platform || "EMAIL", $ = j.find((e) => e.value === Q);
222
- return g ? /* @__PURE__ */ D("div", {
261
+ }, [O]);
262
+ let ue = O?.platform || "EMAIL", $ = M.find((e) => e.value === ue);
263
+ return ce ? /* @__PURE__ */ w("div", {
223
264
  className: "flex items-center justify-center min-h-screen",
224
- children: /* @__PURE__ */ D(h, { className: "size-8 animate-spin text-text-secondary" })
225
- }) : _ || !m ? /* @__PURE__ */ O("div", {
265
+ children: /* @__PURE__ */ w(f, { className: "size-8 animate-spin text-text-secondary" })
266
+ }) : le || !O ? /* @__PURE__ */ T("div", {
226
267
  className: "flex flex-col items-center justify-center min-h-screen gap-4",
227
268
  children: [
228
- /* @__PURE__ */ D(u, { className: "size-12 text-status-error-text" }),
229
- /* @__PURE__ */ D("h1", {
269
+ /* @__PURE__ */ w(d, { className: "size-12 text-status-error-text" }),
270
+ /* @__PURE__ */ w("h1", {
230
271
  className: "text-xl font-semibold",
231
- children: C("channel.channelNotFound", "Channel not found")
272
+ children: j("channel.channelNotFound", "Channel not found")
232
273
  }),
233
- /* @__PURE__ */ D("button", {
274
+ /* @__PURE__ */ w("button", {
234
275
  type: "button",
235
- onClick: () => f("../list"),
276
+ onClick: () => E("../list"),
236
277
  className: "text-primary hover:underline",
237
- children: C("channel.backToChannels", "Back to channels")
278
+ children: j("channel.backToChannels", "Back to channels")
238
279
  })
239
280
  ]
240
- }) : /* @__PURE__ */ D(i, {
241
- permission: a.CHANNEL_UPDATE,
242
- children: /* @__PURE__ */ O("div", {
281
+ }) : /* @__PURE__ */ w(a, {
282
+ permission: o.CHANNEL_UPDATE,
283
+ children: /* @__PURE__ */ T("div", {
243
284
  className: "min-h-screen bg-bg-surface",
244
- children: [/* @__PURE__ */ D("div", {
285
+ children: [/* @__PURE__ */ w("div", {
245
286
  className: "border-b bg-bg-surface",
246
- children: /* @__PURE__ */ D("div", {
287
+ children: /* @__PURE__ */ w("div", {
247
288
  className: "container mx-auto px-6 py-4",
248
- children: /* @__PURE__ */ O("div", {
289
+ children: /* @__PURE__ */ T("div", {
249
290
  className: "flex items-center gap-4",
250
- children: [/* @__PURE__ */ D("button", {
291
+ children: [/* @__PURE__ */ w("button", {
251
292
  type: "button",
252
- onClick: () => f(`/channels/${p}`),
293
+ onClick: () => E(`/channels/${D}`),
253
294
  className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
254
- children: /* @__PURE__ */ D(d, { className: "size-5 " })
255
- }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h1", {
295
+ children: /* @__PURE__ */ w(te, { className: "size-5 " })
296
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
256
297
  className: "text-2xl font-bold",
257
- children: C("channel.editChannel", "Edit Channel")
258
- }), /* @__PURE__ */ D("p", {
298
+ children: j("channel.editChannel", "Edit Channel")
299
+ }), /* @__PURE__ */ w("p", {
259
300
  className: "text-sm text-text-secondary",
260
- children: C("channel.updateChannelConfig", "Update channel configuration")
301
+ children: j("channel.updateChannelConfig", "Update channel configuration")
261
302
  })] })]
262
303
  })
263
304
  })
264
- }), /* @__PURE__ */ D("div", {
305
+ }), /* @__PURE__ */ w("div", {
265
306
  className: "container mx-auto px-6 py-8 max-w-2xl",
266
- children: /* @__PURE__ */ O("div", {
307
+ children: /* @__PURE__ */ T("div", {
267
308
  className: "space-y-6",
268
309
  children: [
269
- /* @__PURE__ */ D(A, {
270
- icon: /* @__PURE__ */ D(y, {
310
+ /* @__PURE__ */ w(se, {
311
+ icon: /* @__PURE__ */ w(g, {
271
312
  size: 15,
272
313
  "aria-hidden": "true"
273
314
  }),
274
- children: C("channel.editChannelPurpose", "Change how this channel behaves — its name, description, priority and status. The platform and provider stay fixed (they define what the channel is); to swap credentials use the channel's connection instead. Use this to rename a channel, bump its priority, or temporarily deactivate it without deleting it.")
315
+ children: j("channel.editChannelPurpose", "Change how this channel behaves — its name, description, priority and status. The platform and provider stay fixed (they define what the channel is); to swap credentials use the channel's connection instead. Use this to rename a channel, bump its priority, or temporarily deactivate it without deleting it.")
275
316
  }),
276
- q && /* @__PURE__ */ O("div", {
317
+ J && /* @__PURE__ */ T("div", {
277
318
  className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
278
- children: [/* @__PURE__ */ D(u, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ D("p", {
319
+ children: [/* @__PURE__ */ w(d, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ w("p", {
279
320
  className: "text-sm text-status-error-text",
280
- children: q
321
+ children: J
281
322
  })]
282
323
  }),
283
- /* @__PURE__ */ O(k, {
324
+ /* @__PURE__ */ T(oe, {
284
325
  treatment: "insight",
285
326
  className: "p-4 border-border-seam space-y-2",
286
- children: [/* @__PURE__ */ D("div", {
327
+ children: [/* @__PURE__ */ w("div", {
287
328
  className: "flex items-center gap-2",
288
- children: $ && /* @__PURE__ */ O(E, { children: [(() => {
329
+ children: $ && /* @__PURE__ */ T(C, { children: [(() => {
289
330
  let e = $.icon;
290
- return /* @__PURE__ */ D(e, { className: "size-5 text-text-secondary" });
291
- })(), /* @__PURE__ */ D("span", {
331
+ return /* @__PURE__ */ w(e, { className: "size-5 text-text-secondary" });
332
+ })(), /* @__PURE__ */ w("span", {
292
333
  className: "font-medium",
293
- children: Q
334
+ children: j($.labelKey, $.labelFallback)
294
335
  })] })
295
- }), /* @__PURE__ */ D("p", {
336
+ }), /* @__PURE__ */ w("p", {
296
337
  className: "text-sm text-text-secondary",
297
- children: C("channel.platformLockedHint", "Platform cannot be changed after channel creation. Create a new channel to use a different platform.")
338
+ children: j("channel.platformLockedHint", "Platform cannot be changed after channel creation. Create a new channel to use a different platform.")
298
339
  })]
299
340
  }),
300
- /* @__PURE__ */ O(te, {
341
+ /* @__PURE__ */ T(ae, {
301
342
  className: "p-5 space-y-6",
302
343
  children: [
303
- /* @__PURE__ */ O("div", {
344
+ /* @__PURE__ */ T("div", {
304
345
  className: "space-y-2",
305
- children: [/* @__PURE__ */ O("label", {
346
+ children: [/* @__PURE__ */ T("label", {
306
347
  className: "text-sm font-medium",
307
- children: [C("channel.channelName", "Channel Name"), " *"]
308
- }), /* @__PURE__ */ D("input", {
309
- "aria-label": C("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
348
+ children: [j("channel.channelName", "Channel Name"), " *"]
349
+ }), /* @__PURE__ */ w("input", {
350
+ "aria-label": j("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
310
351
  type: "text",
311
- value: N,
312
- onChange: (e) => P(e.target.value),
313
- placeholder: C("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
352
+ value: P,
353
+ onChange: (e) => F(e.target.value),
354
+ placeholder: j("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
314
355
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
315
356
  })]
316
357
  }),
317
- /* @__PURE__ */ O("div", {
358
+ /* @__PURE__ */ T("div", {
318
359
  className: "space-y-2",
319
- children: [/* @__PURE__ */ D("label", {
360
+ children: [/* @__PURE__ */ w("label", {
320
361
  htmlFor: "channel-edit-description",
321
362
  className: "text-sm font-medium",
322
- children: C("channel.description", "Description")
323
- }), /* @__PURE__ */ D(o, {
363
+ children: j("channel.description", "Description")
364
+ }), /* @__PURE__ */ w(ee, {
324
365
  id: "channel-edit-description",
325
- value: F,
326
- onChange: I,
327
- "aria-label": C("channel.editDescriptionPlaceholder", "Optional description for this channel"),
328
- placeholder: C("channel.editDescriptionPlaceholder", "Optional description for this channel"),
366
+ value: I,
367
+ onChange: L,
368
+ "aria-label": j("channel.editDescriptionPlaceholder", "Optional description for this channel"),
369
+ placeholder: j("channel.editDescriptionPlaceholder", "Optional description for this channel"),
329
370
  rows: 3
330
371
  })]
331
372
  }),
332
- $ && /* @__PURE__ */ O("div", {
373
+ $ && /* @__PURE__ */ T("div", {
333
374
  className: "space-y-2",
334
- children: [/* @__PURE__ */ D("label", {
375
+ children: [/* @__PURE__ */ w("label", {
335
376
  className: "text-sm font-medium",
336
- children: C("channel.adapterProvider", "Adapter / Provider")
337
- }), /* @__PURE__ */ D("select", {
338
- value: L,
339
- onChange: (e) => R(e.target.value),
377
+ children: j("channel.adapterProvider", "Adapter / Provider")
378
+ }), /* @__PURE__ */ w("select", {
379
+ value: R,
380
+ onChange: (e) => z(e.target.value),
340
381
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
341
- children: $.adapters.map((e) => /* @__PURE__ */ D("option", {
382
+ children: $.adapters.map((e) => /* @__PURE__ */ w("option", {
342
383
  value: e.value,
343
- children: e.label
384
+ children: j(e.labelKey, e.labelFallback)
344
385
  }, e.value))
345
386
  })]
346
387
  }),
347
- /* @__PURE__ */ O("div", {
388
+ /* @__PURE__ */ T("div", {
348
389
  className: "grid grid-cols-2 gap-4",
349
- children: [/* @__PURE__ */ O("div", {
390
+ children: [/* @__PURE__ */ T("div", {
350
391
  className: "space-y-2",
351
392
  children: [
352
- /* @__PURE__ */ D("label", {
393
+ /* @__PURE__ */ w("label", {
353
394
  className: "text-sm font-medium",
354
- children: C("channel.priority", "Priority")
395
+ children: j("channel.priority", "Priority")
355
396
  }),
356
- /* @__PURE__ */ D("select", {
357
- value: z,
358
- onChange: (e) => B(Number(e.target.value)),
397
+ /* @__PURE__ */ w("select", {
398
+ value: B,
399
+ onChange: (e) => V(Number(e.target.value)),
359
400
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
360
- children: M.map((e) => /* @__PURE__ */ D("option", {
401
+ children: N.map((e) => /* @__PURE__ */ w("option", {
361
402
  value: e.value,
362
403
  children: e.label
363
404
  }, e.value))
364
405
  }),
365
- /* @__PURE__ */ D("p", {
406
+ /* @__PURE__ */ w("p", {
366
407
  className: "text-xs text-text-secondary",
367
- children: C("channel.priorityFailoverHint", "Higher priority channels are used first in failover")
408
+ children: j("channel.priorityFailoverHint", "Higher priority channels are used first in failover")
368
409
  })
369
410
  ]
370
- }), /* @__PURE__ */ O("div", {
411
+ }), /* @__PURE__ */ T("div", {
371
412
  className: "space-y-2",
372
- children: [/* @__PURE__ */ D("label", {
413
+ children: [/* @__PURE__ */ w("label", {
373
414
  className: "text-sm font-medium",
374
- children: C("channel.status", "Status")
375
- }), /* @__PURE__ */ O("select", {
376
- value: V,
377
- onChange: (e) => H(e.target.value),
415
+ children: j("channel.status", "Status")
416
+ }), /* @__PURE__ */ T("select", {
417
+ value: H,
418
+ onChange: (e) => U(e.target.value),
378
419
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
379
420
  children: [
380
- /* @__PURE__ */ D("option", {
421
+ /* @__PURE__ */ w("option", {
381
422
  value: "INACTIVE",
382
- children: C("channel.status.inactive", "Inactive")
423
+ children: j("channel.statusLabel.inactive", "Inactive")
383
424
  }),
384
- /* @__PURE__ */ D("option", {
425
+ /* @__PURE__ */ w("option", {
385
426
  value: "ACTIVE",
386
- children: C("channel.status.active", "Active")
427
+ children: j("channel.statusLabel.active", "Active")
387
428
  }),
388
- /* @__PURE__ */ D("option", {
429
+ /* @__PURE__ */ w("option", {
389
430
  value: "SUSPENDED",
390
- children: C("channel.status.suspended", "Suspended")
431
+ children: j("channel.statusLabel.suspended", "Suspended")
391
432
  })
392
433
  ]
393
434
  })]
@@ -395,80 +436,80 @@ function N() {
395
436
  })
396
437
  ]
397
438
  }),
398
- /* @__PURE__ */ O("div", {
439
+ /* @__PURE__ */ T("div", {
399
440
  className: "flex items-center justify-between pt-6 border-t",
400
- children: [/* @__PURE__ */ D("div", { children: Y ? /* @__PURE__ */ O("div", {
441
+ children: [/* @__PURE__ */ w("div", { children: X ? /* @__PURE__ */ T("div", {
401
442
  className: "flex items-center gap-2",
402
443
  children: [
403
- /* @__PURE__ */ D("span", {
444
+ /* @__PURE__ */ w("span", {
404
445
  className: "text-sm text-text-secondary",
405
- children: C("channel.confirmDelete", "Confirm delete?")
446
+ children: j("channel.confirmDelete", "Confirm delete?")
406
447
  }),
407
- /* @__PURE__ */ O("button", {
448
+ /* @__PURE__ */ T("button", {
408
449
  type: "button",
409
450
  onClick: async () => {
410
- if (!(!p || !Y)) {
411
- e("medium"), K(!0);
451
+ if (!(!D || !X)) {
452
+ t("medium"), q(!0);
412
453
  try {
413
- await b(p) ? (t("success"), f("../list")) : t("error");
454
+ await A(D) ? (n("success"), E("../list")) : n("error");
414
455
  } catch (e) {
415
- t("error"), J(e instanceof Error ? e.message : C("channel.deleteFailed", "Failed to delete channel")), K(!1);
456
+ n("error"), Y(e instanceof Error ? e.message : j("channel.deleteFailed", "Failed to delete channel")), q(!1);
416
457
  }
417
458
  }
418
459
  },
419
- disabled: G,
460
+ disabled: K,
420
461
  className: "px-4 py-2 text-sm bg-status-error-bg text-status-error-text rounded-lg hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
421
- children: [G ? /* @__PURE__ */ D(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ D(S, { className: "size-4 " }), C("channel.delete", "Delete")]
462
+ children: [K ? /* @__PURE__ */ w(f, { className: "size-4 animate-spin" }) : /* @__PURE__ */ w(y, { className: "size-4 " }), j("channel.delete", "Delete")]
422
463
  }),
423
- /* @__PURE__ */ D("button", {
464
+ /* @__PURE__ */ w("button", {
424
465
  type: "button",
425
- onClick: () => X(!1),
466
+ onClick: () => Z(!1),
426
467
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
427
- children: C("channel.cancel", "Cancel")
468
+ children: j("channel.cancel", "Cancel")
428
469
  })
429
470
  ]
430
- }) : /* @__PURE__ */ D(i, {
431
- permission: a.CHANNEL_DELETE,
432
- children: /* @__PURE__ */ O("button", {
471
+ }) : /* @__PURE__ */ w(a, {
472
+ permission: o.CHANNEL_DELETE,
473
+ children: /* @__PURE__ */ T("button", {
433
474
  type: "button",
434
- onClick: () => X(!0),
475
+ onClick: () => Z(!0),
435
476
  className: "px-4 py-2 text-sm text-status-error-text hover:bg-status-error-bg/10 rounded-lg transition-colors flex items-center gap-2",
436
- children: [/* @__PURE__ */ D(S, { className: "size-4 " }), C("channel.deleteChannel", "Delete Channel")]
477
+ children: [/* @__PURE__ */ w(y, { className: "size-4 " }), j("channel.deleteChannel", "Delete Channel")]
437
478
  })
438
- }) }), /* @__PURE__ */ O("div", {
479
+ }) }), /* @__PURE__ */ T("div", {
439
480
  className: "flex items-center gap-3",
440
- children: [/* @__PURE__ */ D("button", {
481
+ children: [/* @__PURE__ */ w("button", {
441
482
  type: "button",
442
- onClick: () => f(`/channels/${p}`),
483
+ onClick: () => E(`/channels/${D}`),
443
484
  className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
444
- children: C("channel.cancel", "Cancel")
445
- }), /* @__PURE__ */ O("button", {
485
+ children: j("channel.cancel", "Cancel")
486
+ }), /* @__PURE__ */ T("button", {
446
487
  type: "button",
447
488
  onClick: async () => {
448
- if (p) {
449
- if (!N.trim()) {
450
- J(C("channel.validation.nameRequired", "Channel name is required"));
489
+ if (D) {
490
+ if (!P.trim()) {
491
+ Y(j("channel.validation.nameRequired", "Channel name is required"));
451
492
  return;
452
493
  }
453
- W(!0), J(null);
494
+ G(!0), Y(null);
454
495
  try {
455
- await v(p, {
456
- name: N.trim(),
457
- description: F.trim() || void 0,
458
- adapterType: L,
459
- priority: z,
460
- status: V
461
- }) ? f(`/channels/${p}`) : J(C("channel.updateFailed", "Failed to update channel"));
496
+ await k(D, {
497
+ name: P.trim(),
498
+ description: I.trim() || void 0,
499
+ adapterType: R,
500
+ priority: B,
501
+ status: H
502
+ }) ? E(`/channels/${D}`) : Y(j("channel.updateFailed", "Failed to update channel"));
462
503
  } catch (e) {
463
- J(e instanceof Error ? e.message : C("channel.updateFailed", "Failed to update channel"));
504
+ Y(e instanceof Error ? e.message : j("channel.updateFailed", "Failed to update channel"));
464
505
  } finally {
465
- W(!1);
506
+ G(!1);
466
507
  }
467
508
  }
468
509
  },
469
- disabled: U || !N.trim(),
510
+ disabled: W || !P.trim(),
470
511
  className: "px-6 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors flex items-center gap-2 disabled:opacity-50",
471
- children: [U ? /* @__PURE__ */ D(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ D(y, { className: "size-4 " }), C("channel.saveChanges", "Save Changes")]
512
+ children: [W ? /* @__PURE__ */ w(f, { className: "size-4 animate-spin" }) : /* @__PURE__ */ w(g, { className: "size-4 " }), j("channel.saveChanges", "Save Changes")]
472
513
  })]
473
514
  })]
474
515
  })
@@ -479,6 +520,6 @@ function N() {
479
520
  });
480
521
  }
481
522
  //#endregion
482
- export { N as EditChannelPage };
523
+ export { E as EditChannelPage };
483
524
 
484
525
  //# sourceMappingURL=EditChannelPage.js.map