@burdenoff/microfe-channel 2026.830.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,138 +1,166 @@
1
- import { useChannel as e } from "../../../providers/ChannelProvider.js";
2
- import { useChannels as t } from "../../../hooks/useChannels.js";
3
- import { PermissionGuard as n } from "../../../components/PermissionGuard.js";
4
- import { CHANNEL_PERMISSIONS as r } from "../../../constants/permissions.js";
5
- import { MarkdownEditor as i } from "../../../components/MarkdownEditor.js";
6
- import { useState as a } from "react";
7
- import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { AlertCircle as s, ArrowLeft as c, Bell as l, CheckCircle2 as u, Globe as d, Hash as f, Inbox as p, Loader2 as m, Mail as h, MessageCircle as g, MessageSquare as _, Radio as v, Save as y, Send as b, Smartphone as x, Users as S } from "lucide-react";
9
- import { useNavigate as C } from "react-router";
10
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
11
- import { EmphasisPanel as E, GlassCard as D, OptionalFields as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
1
+ import { useTr as e } from "../../../hooks/useTr.js";
2
+ import { useChannel as t } from "../../../providers/ChannelProvider.js";
3
+ import { useChannels as n } from "../../../hooks/useChannels.js";
4
+ import { PermissionGuard as r } from "../../../components/PermissionGuard.js";
5
+ import { CHANNEL_PERMISSIONS as i } from "../../../constants/permissions.js";
6
+ import { MarkdownEditor as a } from "../../../components/MarkdownEditor.js";
7
+ import { useMemo as o, useState as s } from "react";
8
+ import { AlertCircle as c, ArrowLeft as l, Bell as u, CheckCircle2 as d, Globe as f, Hash as p, Inbox as m, Loader2 as h, Mail as g, MessageCircle as _, MessageSquare as v, Radio as y, Save as b, Send as x, Smartphone as S, Users as C } from "lucide-react";
9
+ import { useNavigate as w } from "react-router";
10
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
11
+ import { EmphasisPanel as D, GlassCard as O, OptionalFields as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/channel/modules/channels/pages/CreateChannelPage.tsx
13
- var A = [
14
- {
15
- value: "EMAIL",
16
- label: "Email",
17
- description: "Send emails via various providers",
18
- icon: h,
19
- color: "text-accent-blue bg-accent-blue-subtle border-accent-blue-subtle",
20
- adapters: [{
21
- value: "AWS_SES",
22
- label: "AWS SES"
23
- }, {
24
- value: "AZURE_ACS",
25
- label: "Azure Communication Services"
26
- }]
27
- },
28
- {
29
- value: "SMS",
30
- label: "SMS",
31
- description: "Send text messages",
32
- icon: x,
33
- color: "text-status-success-text bg-status-success-bg-subtle border-status-success-bg-subtle",
34
- adapters: [{
35
- value: "AWS_SNS",
36
- label: "AWS SNS"
37
- }, {
38
- value: "TWILIO_SMS",
39
- label: "Twilio SMS"
40
- }]
41
- },
42
- {
43
- value: "PUSH",
44
- label: "Push",
45
- description: "Mobile & web push",
46
- icon: l,
47
- color: "text-accent-purple bg-accent-purple-subtle border-accent-purple-subtle",
48
- adapters: [{
49
- value: "FCM",
50
- label: "Firebase Cloud Messaging"
51
- }]
52
- },
53
- {
54
- value: "INAPP",
55
- label: "In-App",
56
- description: "In-app notifications",
57
- icon: p,
58
- color: "text-accent-indigo bg-accent-indigo-subtle border-accent-indigo-subtle",
59
- adapters: [{
60
- value: "INAPP_NATIVE",
61
- label: "Native In-App"
62
- }]
63
- },
64
- {
65
- value: "SLACK",
66
- label: "Slack",
67
- description: "Workspace notifications",
68
- icon: f,
69
- color: "text-accent-pink bg-accent-pink-subtle border-accent-pink-subtle",
70
- adapters: [{
71
- value: "SLACK_BOT",
72
- label: "Slack Bot"
73
- }]
74
- },
75
- {
76
- value: "TEAMS",
77
- label: "Teams",
78
- description: "Teams notifications",
79
- icon: S,
80
- color: "text-accent-cyan bg-accent-cyan-subtle border-accent-cyan-subtle",
81
- adapters: [{
82
- value: "TEAMS_BOT",
83
- label: "Teams Bot"
84
- }]
85
- },
86
- {
87
- value: "DISCORD",
88
- label: "Discord",
89
- description: "Server notifications",
90
- icon: g,
91
- color: "text-accent-violet bg-accent-violet-subtle border-accent-violet-subtle",
92
- adapters: [{
93
- value: "DISCORD_BOT",
94
- label: "Discord Bot"
95
- }]
96
- },
97
- {
98
- value: "WHATSAPP",
99
- label: "WhatsApp",
100
- description: "Business messaging",
101
- icon: b,
102
- color: "text-accent-emerald bg-accent-emerald-subtle border-accent-emerald-subtle",
103
- adapters: [{
104
- value: "WHATSAPP_CLOUD",
105
- label: "WhatsApp Cloud API"
106
- }, {
107
- value: "WHATSAPP_TWILIO",
108
- label: "WhatsApp via Twilio"
109
- }]
110
- },
111
- {
112
- value: "WEBCHAT",
113
- label: "Webchat",
114
- description: "Chat widgets",
115
- icon: _,
116
- color: "text-accent-teal bg-accent-teal-subtle border-accent-teal-subtle",
117
- adapters: []
118
- },
119
- {
120
- value: "WEBHOOK",
121
- label: "Webhook",
122
- description: "HTTP webhooks",
123
- icon: d,
124
- color: "text-accent-orange bg-accent-orange-subtle border-accent-orange-subtle",
125
- adapters: [{
126
- value: "WEBHOOK_HTTP",
127
- label: "HTTP Webhook"
128
- }]
129
- }
130
- ];
131
13
  function j() {
132
- let l = C(), { organizationId: d } = e(), { createChannel: f } = t(), { t: p } = o(), h = (e, t) => {
133
- let n = p(e);
134
- return n === e ? t : n;
135
- }, [g, _] = a(!1), [b, x] = a(null), [S, j] = a({
14
+ let j = w(), { organizationId: M } = t(), { createChannel: N } = n(), P = e(), F = o(() => [
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: g,
22
+ color: "text-accent-blue bg-accent-blue-subtle border-accent-blue-subtle",
23
+ adapters: [{
24
+ value: "AWS_SES",
25
+ labelKey: "channel.adapter.awsSes",
26
+ labelFallback: "AWS SES"
27
+ }, {
28
+ value: "AZURE_ACS",
29
+ labelKey: "channel.adapter.azureAcs",
30
+ labelFallback: "Azure Communication Services"
31
+ }]
32
+ },
33
+ {
34
+ value: "SMS",
35
+ labelKey: "channel.platformLabel.sms",
36
+ labelFallback: "SMS",
37
+ descriptionKey: "channel.platformDescription.smsDescription",
38
+ descriptionFallback: "Send text messages",
39
+ icon: S,
40
+ color: "text-status-success-text bg-status-success-bg-subtle border-status-success-bg-subtle",
41
+ adapters: [{
42
+ value: "AWS_SNS",
43
+ labelKey: "channel.adapter.awsSns",
44
+ labelFallback: "AWS SNS"
45
+ }, {
46
+ value: "TWILIO_SMS",
47
+ labelKey: "channel.adapter.twilioSms",
48
+ labelFallback: "Twilio SMS"
49
+ }]
50
+ },
51
+ {
52
+ value: "PUSH",
53
+ labelKey: "channel.platformLabel.push",
54
+ labelFallback: "Push",
55
+ descriptionKey: "channel.platformDescription.pushDescription",
56
+ descriptionFallback: "Mobile & web push",
57
+ icon: u,
58
+ color: "text-accent-purple bg-accent-purple-subtle border-accent-purple-subtle",
59
+ adapters: [{
60
+ value: "FCM",
61
+ labelKey: "channel.adapter.fcm",
62
+ labelFallback: "Firebase Cloud Messaging"
63
+ }]
64
+ },
65
+ {
66
+ value: "INAPP",
67
+ labelKey: "channel.platformLabel.inApp",
68
+ labelFallback: "In-App",
69
+ descriptionKey: "channel.platformDescription.inAppDescription",
70
+ descriptionFallback: "In-app notifications",
71
+ icon: m,
72
+ color: "text-accent-indigo bg-accent-indigo-subtle border-accent-indigo-subtle",
73
+ adapters: [{
74
+ value: "INAPP_NATIVE",
75
+ labelKey: "channel.adapter.inAppNative",
76
+ labelFallback: "Native In-App"
77
+ }]
78
+ },
79
+ {
80
+ value: "SLACK",
81
+ labelKey: "channel.platformLabel.slack",
82
+ labelFallback: "Slack",
83
+ descriptionKey: "channel.platformDescription.slackDescription",
84
+ descriptionFallback: "Workspace notifications",
85
+ icon: p,
86
+ color: "text-accent-pink bg-accent-pink-subtle border-accent-pink-subtle",
87
+ adapters: [{
88
+ value: "SLACK_BOT",
89
+ labelKey: "channel.adapter.slackBot",
90
+ labelFallback: "Slack Bot"
91
+ }]
92
+ },
93
+ {
94
+ value: "TEAMS",
95
+ labelKey: "channel.platformLabel.teams",
96
+ labelFallback: "Teams",
97
+ descriptionKey: "channel.platformDescription.teamsDescription",
98
+ descriptionFallback: "Teams notifications",
99
+ icon: C,
100
+ color: "text-accent-cyan bg-accent-cyan-subtle border-accent-cyan-subtle",
101
+ adapters: [{
102
+ value: "TEAMS_BOT",
103
+ labelKey: "channel.adapter.teamsBot",
104
+ labelFallback: "Teams Bot"
105
+ }]
106
+ },
107
+ {
108
+ value: "DISCORD",
109
+ labelKey: "channel.platformLabel.discord",
110
+ labelFallback: "Discord",
111
+ descriptionKey: "channel.platformDescription.discordDescription",
112
+ descriptionFallback: "Server notifications",
113
+ icon: _,
114
+ color: "text-accent-violet bg-accent-violet-subtle border-accent-violet-subtle",
115
+ adapters: [{
116
+ value: "DISCORD_BOT",
117
+ labelKey: "channel.adapter.discordBot",
118
+ labelFallback: "Discord Bot"
119
+ }]
120
+ },
121
+ {
122
+ value: "WHATSAPP",
123
+ labelKey: "channel.platformLabel.whatsapp",
124
+ labelFallback: "WhatsApp",
125
+ descriptionKey: "channel.platformDescription.whatsappDescription",
126
+ descriptionFallback: "Business messaging",
127
+ icon: x,
128
+ color: "text-accent-emerald bg-accent-emerald-subtle border-accent-emerald-subtle",
129
+ adapters: [{
130
+ value: "WHATSAPP_CLOUD",
131
+ labelKey: "channel.adapter.whatsappCloud",
132
+ labelFallback: "WhatsApp Cloud API"
133
+ }, {
134
+ value: "WHATSAPP_TWILIO",
135
+ labelKey: "channel.adapter.whatsappTwilio",
136
+ labelFallback: "WhatsApp via Twilio"
137
+ }]
138
+ },
139
+ {
140
+ value: "WEBCHAT",
141
+ labelKey: "channel.platformLabel.webchat",
142
+ labelFallback: "Webchat",
143
+ descriptionKey: "channel.platformDescription.webchatDescription",
144
+ descriptionFallback: "Chat widgets",
145
+ icon: v,
146
+ color: "text-accent-teal bg-accent-teal-subtle border-accent-teal-subtle",
147
+ adapters: []
148
+ },
149
+ {
150
+ value: "WEBHOOK",
151
+ labelKey: "channel.platformLabel.webhook",
152
+ labelFallback: "Webhook",
153
+ descriptionKey: "channel.platformDescription.webhookDescription",
154
+ descriptionFallback: "HTTP webhooks",
155
+ icon: f,
156
+ color: "text-accent-orange bg-accent-orange-subtle border-accent-orange-subtle",
157
+ adapters: [{
158
+ value: "WEBHOOK_HTTP",
159
+ labelKey: "channel.adapter.webhookHttp",
160
+ labelFallback: "HTTP Webhook"
161
+ }]
162
+ }
163
+ ], []), [I, L] = s(!1), [R, z] = s(null), [B, V] = s({
136
164
  name: "",
137
165
  platform: "EMAIL",
138
166
  description: "",
@@ -140,211 +168,214 @@ function j() {
140
168
  status: "ACTIVE",
141
169
  priority: 100,
142
170
  platformConfig: ""
143
- }), M = A.find((e) => e.value === S.platform)?.adapters || [], N = A.find((e) => e.value === S.platform), P = (e) => {
144
- j((t) => ({
171
+ }), H = F.find((e) => e.value === B.platform)?.adapters || [], U = F.find((e) => e.value === B.platform), W = (e) => {
172
+ V((t) => ({
145
173
  ...t,
146
174
  platform: e,
147
175
  adapterType: ""
148
176
  }));
149
177
  };
150
- return /* @__PURE__ */ w(n, {
151
- permission: r.CHANNEL_CREATE,
152
- children: /* @__PURE__ */ T("div", {
178
+ return /* @__PURE__ */ T(r, {
179
+ permission: i.CHANNEL_CREATE,
180
+ children: /* @__PURE__ */ E("div", {
153
181
  className: "p-3 sm:p-6 space-y-6 max-w-5xl mx-auto",
154
182
  children: [
155
- /* @__PURE__ */ w("div", {
183
+ /* @__PURE__ */ T("div", {
156
184
  className: "flex items-center justify-between",
157
- children: /* @__PURE__ */ T("div", {
185
+ children: /* @__PURE__ */ E("div", {
158
186
  className: "flex items-center gap-3",
159
- children: [/* @__PURE__ */ w("button", {
187
+ children: [/* @__PURE__ */ T("button", {
160
188
  type: "button",
161
- onClick: () => l(-1),
189
+ onClick: () => j(-1),
162
190
  className: "p-2 text-text-secondary hover:text-text-primary hover:bg-surface-hover rounded-lg transition-colors",
163
- children: /* @__PURE__ */ w(c, { size: 20 })
164
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h1", {
191
+ children: /* @__PURE__ */ T(l, { size: 20 })
192
+ }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h1", {
165
193
  className: "text-xl font-bold text-text-primary flex items-center gap-2",
166
- children: [/* @__PURE__ */ w(v, {
194
+ children: [/* @__PURE__ */ T(y, {
167
195
  size: 22,
168
196
  className: "text-accent-primary"
169
- }), h("channel.createChannel", "Create Channel")]
170
- }), /* @__PURE__ */ w("p", {
197
+ }), P("channel.createChannel", "Create Channel")]
198
+ }), /* @__PURE__ */ T("p", {
171
199
  className: "text-sm text-text-secondary mt-0.5",
172
- children: h("channel.createChannelSubtitle", "Set up a new communication channel")
200
+ children: P("channel.createChannelSubtitle", "Set up a new communication channel")
173
201
  })] })]
174
202
  })
175
203
  }),
176
- /* @__PURE__ */ w(k, {
177
- icon: /* @__PURE__ */ w(v, {
204
+ /* @__PURE__ */ T(A, {
205
+ icon: /* @__PURE__ */ T(y, {
178
206
  size: 15,
179
207
  "aria-hidden": "true"
180
208
  }),
181
- children: h("channel.createChannelPurpose", "Set up a new way to reach people — for example a transactional email sender, an SMS gateway, a Slack workspace or a push provider. Name it, pick the platform and provider, and you will get a channel you can then authenticate and send through. Create one channel per provider account you want messages to flow through.")
209
+ children: P("channel.createChannelPurpose", "Set up a new way to reach people — for example a transactional email sender, an SMS gateway, a Slack workspace or a push provider. Name it, pick the platform and provider, and you will get a channel you can then authenticate and send through. Create one channel per provider account you want messages to flow through.")
182
210
  }),
183
- b && /* @__PURE__ */ T("div", {
211
+ R && /* @__PURE__ */ E("div", {
184
212
  className: "flex items-center gap-3 p-3 bg-error-500/10 border border-status-error-border/30 rounded-lg",
185
- children: [/* @__PURE__ */ w(s, {
213
+ children: [/* @__PURE__ */ T(c, {
186
214
  size: 16,
187
215
  className: "text-status-error-text shrink-0"
188
- }), /* @__PURE__ */ w("p", {
216
+ }), /* @__PURE__ */ T("p", {
189
217
  className: "text-sm text-error-400",
190
- children: b
218
+ children: R
191
219
  })]
192
220
  }),
193
- /* @__PURE__ */ T("form", {
221
+ /* @__PURE__ */ E("form", {
194
222
  onSubmit: async (e) => {
195
- if (e.preventDefault(), x(null), !S.name.trim()) {
196
- x(h("channel.validation.nameRequired", "Channel name is required"));
223
+ if (e.preventDefault(), z(null), !B.name.trim()) {
224
+ z(P("channel.validation.nameRequired", "Channel name is required"));
197
225
  return;
198
226
  }
199
- if (!d) {
200
- x(h("channel.validation.organizationRequired", "Organization context is required. Please ensure an organization is selected."));
227
+ if (!M) {
228
+ z(P("channel.validation.organizationRequired", "Organization context is required. Please ensure an organization is selected."));
201
229
  return;
202
230
  }
203
231
  let t;
204
- if (S.platformConfig.trim()) try {
205
- t = JSON.parse(S.platformConfig);
232
+ if (B.platformConfig.trim()) try {
233
+ t = JSON.parse(B.platformConfig);
206
234
  } catch {
207
- x(h("channel.validation.platformConfigJson", "Platform Config must be valid JSON"));
235
+ z(P("channel.validation.platformConfigJson", "Platform Config must be valid JSON"));
208
236
  return;
209
237
  }
210
- _(!0);
238
+ L(!0);
211
239
  try {
212
- let e = await f({
213
- name: S.name.trim(),
214
- platform: S.platform,
215
- organizationId: d,
216
- description: S.description.trim() || void 0,
217
- adapterType: S.adapterType || void 0,
218
- status: S.status,
219
- priority: S.priority,
240
+ let e = await N({
241
+ name: B.name.trim(),
242
+ platform: B.platform,
243
+ organizationId: M,
244
+ description: B.description.trim() || void 0,
245
+ adapterType: B.adapterType || void 0,
246
+ status: B.status,
247
+ priority: B.priority,
220
248
  platformConfig: t
221
249
  });
222
- e ? l(`../${e.id}`) : x(h("channel.createFailed", "Failed to create channel"));
250
+ e ? j(`../${e.id}`) : z(P("channel.createFailed", "Failed to create channel"));
223
251
  } catch (e) {
224
- x(e instanceof Error ? e.message : h("channel.createFailed", "Failed to create channel"));
252
+ z(e instanceof Error ? e.message : P("channel.createFailed", "Failed to create channel"));
225
253
  } finally {
226
- _(!1);
254
+ L(!1);
227
255
  }
228
256
  },
229
257
  className: "space-y-6",
230
258
  children: [
231
- /* @__PURE__ */ T("div", {
259
+ /* @__PURE__ */ E("div", {
232
260
  className: "grid gap-5 lg:grid-cols-2",
233
- children: [/* @__PURE__ */ T(E, {
261
+ children: [/* @__PURE__ */ E(D, {
234
262
  className: "p-5 space-y-4",
235
263
  children: [
236
- /* @__PURE__ */ w("h2", {
264
+ /* @__PURE__ */ T("h2", {
237
265
  className: "text-sm font-semibold text-text-primary uppercase tracking-wider",
238
- children: h("channel.basicInformation", "Basic Information")
266
+ children: P("channel.basicInformation", "Basic Information")
239
267
  }),
240
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("label", {
268
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("label", {
241
269
  className: "block text-sm font-medium text-text-primary mb-1.5",
242
270
  children: [
243
- h("channel.name", "Name"),
271
+ P("channel.name", "Name"),
244
272
  " ",
245
- /* @__PURE__ */ w("span", {
273
+ /* @__PURE__ */ T("span", {
246
274
  className: "text-status-error-text",
247
275
  children: "*"
248
276
  })
249
277
  ]
250
- }), /* @__PURE__ */ w("input", {
251
- "aria-label": h("channel.namePlaceholder", "e.g., Primary Email, SMS Alerts"),
278
+ }), /* @__PURE__ */ T("input", {
279
+ "aria-label": P("channel.namePlaceholder", "e.g., Primary Email, SMS Alerts"),
252
280
  type: "text",
253
- value: S.name,
254
- onChange: (e) => j((t) => ({
281
+ value: B.name,
282
+ onChange: (e) => V((t) => ({
255
283
  ...t,
256
284
  name: e.target.value
257
285
  })),
258
286
  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/50 placeholder:text-text-secondary",
259
- placeholder: h("channel.namePlaceholder", "e.g., Primary Email, SMS Alerts")
287
+ placeholder: P("channel.namePlaceholder", "e.g., Primary Email, SMS Alerts")
260
288
  })] }),
261
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
289
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
262
290
  htmlFor: "channel-create-description",
263
291
  className: "block text-sm font-medium text-text-primary mb-1.5",
264
- children: h("channel.description", "Description")
265
- }), /* @__PURE__ */ w(i, {
292
+ children: P("channel.description", "Description")
293
+ }), /* @__PURE__ */ T(a, {
266
294
  id: "channel-create-description",
267
- value: S.description,
268
- onChange: (e) => j((t) => ({
295
+ value: B.description,
296
+ onChange: (e) => V((t) => ({
269
297
  ...t,
270
298
  description: e
271
299
  })),
272
- "aria-label": h("channel.descriptionPlaceholder", "Optional description of this channel's purpose"),
273
- placeholder: h("channel.descriptionPlaceholder", "Optional description of this channel's purpose"),
300
+ "aria-label": P("channel.descriptionPlaceholder", "Optional description of this channel's purpose"),
301
+ placeholder: P("channel.descriptionPlaceholder", "Optional description of this channel's purpose"),
274
302
  rows: 3
275
303
  })] })
276
304
  ]
277
- }), /* @__PURE__ */ T(D, {
305
+ }), /* @__PURE__ */ E(O, {
278
306
  treatment: "plain",
279
307
  className: "p-5 border-border-seam space-y-4",
280
308
  children: [
281
- /* @__PURE__ */ w("h2", {
309
+ /* @__PURE__ */ T("h2", {
282
310
  className: "text-sm font-semibold text-text-primary uppercase tracking-wider",
283
- children: h("channel.providerStatus", "Provider & Status")
311
+ children: P("channel.providerStatus", "Provider & Status")
284
312
  }),
285
- /* @__PURE__ */ T("div", { children: [
286
- /* @__PURE__ */ w("label", {
313
+ /* @__PURE__ */ E("div", { children: [
314
+ /* @__PURE__ */ T("label", {
287
315
  className: "block text-sm font-medium text-text-primary mb-1.5",
288
- children: h("channel.providerAdapter", "Provider / Adapter")
316
+ children: P("channel.providerAdapter", "Provider / Adapter")
289
317
  }),
290
- /* @__PURE__ */ T("select", {
291
- value: S.adapterType,
292
- onChange: (e) => j((t) => ({
318
+ /* @__PURE__ */ E("select", {
319
+ value: B.adapterType,
320
+ onChange: (e) => V((t) => ({
293
321
  ...t,
294
322
  adapterType: e.target.value
295
323
  })),
296
324
  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/50 text-text-primary",
297
- children: [/* @__PURE__ */ w("option", {
325
+ children: [/* @__PURE__ */ T("option", {
298
326
  value: "",
299
- children: h("channel.selectProvider", "Select a provider (optional)")
300
- }), M.map((e) => /* @__PURE__ */ w("option", {
327
+ children: P("channel.selectProvider", "Select a provider (optional)")
328
+ }), H.map((e) => /* @__PURE__ */ T("option", {
301
329
  value: e.value,
302
- children: e.label
330
+ children: P(e.labelKey, e.labelFallback)
303
331
  }, e.value))]
304
332
  }),
305
- /* @__PURE__ */ w("p", {
333
+ /* @__PURE__ */ T("p", {
306
334
  className: "mt-1 text-[11px] text-text-secondary",
307
- children: N ? h("channel.providersAvailableForPlatform", `${M.length} providers available for ${N.label}`) : h("channel.selectPlatformFirst", "Select a platform first")
335
+ children: U ? P("channel.providersAvailableForPlatform", "{{count}} providers available for {{platform}}", {
336
+ count: H.length,
337
+ platform: P(U.labelKey, U.labelFallback)
338
+ }) : P("channel.selectPlatformFirst", "Select a platform first")
308
339
  })
309
340
  ] }),
310
- /* @__PURE__ */ T("div", {
341
+ /* @__PURE__ */ E("div", {
311
342
  className: "grid gap-4 sm:grid-cols-2",
312
- children: [/* @__PURE__ */ T("div", { children: [
313
- /* @__PURE__ */ w("label", {
343
+ children: [/* @__PURE__ */ E("div", { children: [
344
+ /* @__PURE__ */ T("label", {
314
345
  className: "block text-sm font-medium text-text-primary mb-1.5",
315
- children: h("channel.status", "Status")
346
+ children: P("channel.status", "Status")
316
347
  }),
317
- /* @__PURE__ */ T("select", {
318
- value: S.status,
319
- onChange: (e) => j((t) => ({
348
+ /* @__PURE__ */ E("select", {
349
+ value: B.status,
350
+ onChange: (e) => V((t) => ({
320
351
  ...t,
321
352
  status: e.target.value
322
353
  })),
323
354
  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/50 text-text-primary",
324
- children: [/* @__PURE__ */ w("option", {
355
+ children: [/* @__PURE__ */ T("option", {
325
356
  value: "ACTIVE",
326
- children: h("channel.status.active", "Active")
327
- }), /* @__PURE__ */ w("option", {
357
+ children: P("channel.statusLabel.active", "Active")
358
+ }), /* @__PURE__ */ T("option", {
328
359
  value: "INACTIVE",
329
- children: h("channel.status.inactive", "Inactive")
360
+ children: P("channel.statusLabel.inactive", "Inactive")
330
361
  })]
331
362
  }),
332
- /* @__PURE__ */ w("p", {
363
+ /* @__PURE__ */ T("p", {
333
364
  className: "mt-1 text-[11px] text-text-secondary",
334
- children: S.status === "ACTIVE" ? h("channel.statusHint.active", "Ready to send immediately") : h("channel.statusHint.inactive", "Configure before activating")
365
+ children: B.status === "ACTIVE" ? P("channel.statusHint.active", "Ready to send immediately") : P("channel.statusHint.inactive", "Configure before activating")
335
366
  })
336
- ] }), /* @__PURE__ */ T("div", { children: [
337
- /* @__PURE__ */ w("label", {
367
+ ] }), /* @__PURE__ */ E("div", { children: [
368
+ /* @__PURE__ */ T("label", {
338
369
  htmlFor: "create-channel-priority",
339
370
  className: "block text-sm font-medium text-text-primary mb-1.5",
340
- children: h("channel.priority", "Priority")
371
+ children: P("channel.priority", "Priority")
341
372
  }),
342
- /* @__PURE__ */ w("input", {
373
+ /* @__PURE__ */ T("input", {
343
374
  id: "create-channel-priority",
344
- "aria-label": h("channel.priority", "Priority"),
375
+ "aria-label": P("channel.priority", "Priority"),
345
376
  type: "number",
346
- value: S.priority,
347
- onChange: (e) => j((t) => ({
377
+ value: B.priority,
378
+ onChange: (e) => V((t) => ({
348
379
  ...t,
349
380
  priority: parseInt(e.target.value) || 0
350
381
  })),
@@ -352,104 +383,104 @@ function j() {
352
383
  max: 100,
353
384
  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/50"
354
385
  }),
355
- /* @__PURE__ */ w("p", {
386
+ /* @__PURE__ */ T("p", {
356
387
  className: "mt-1 text-[11px] text-text-secondary",
357
- children: h("channel.priorityHint", "Lower = higher priority (0-100)")
388
+ children: P("channel.priorityHint", "Lower = higher priority (0-100)")
358
389
  })
359
390
  ] })]
360
391
  })
361
392
  ]
362
393
  })]
363
394
  }),
364
- /* @__PURE__ */ T(D, {
395
+ /* @__PURE__ */ E(O, {
365
396
  treatment: "plain",
366
397
  className: "p-5 border-border-seam space-y-4",
367
- children: [/* @__PURE__ */ T("h2", {
398
+ children: [/* @__PURE__ */ E("h2", {
368
399
  className: "text-sm font-semibold text-text-primary uppercase tracking-wider",
369
400
  children: [
370
- h("channel.platform", "Platform"),
401
+ P("channel.platform", "Platform"),
371
402
  " ",
372
- /* @__PURE__ */ w("span", {
403
+ /* @__PURE__ */ T("span", {
373
404
  className: "text-status-error-text",
374
405
  children: "*"
375
406
  })
376
407
  ]
377
- }), /* @__PURE__ */ w("div", {
408
+ }), /* @__PURE__ */ T("div", {
378
409
  className: "grid gap-2 grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
379
- children: A.map((e) => {
380
- let t = e.icon, n = S.platform === e.value;
381
- return /* @__PURE__ */ T("button", {
410
+ children: F.map((e) => {
411
+ let t = e.icon, n = B.platform === e.value;
412
+ return /* @__PURE__ */ E("button", {
382
413
  type: "button",
383
- onClick: () => P(e.value),
414
+ onClick: () => W(e.value),
384
415
  className: `relative flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all text-center ${n ? `${e.color} border-current ring-1 ring-current` : "border-border-subtle hover:bg-surface-hover text-text-secondary hover:text-text-primary"}`,
385
416
  children: [
386
- n && /* @__PURE__ */ w(u, {
417
+ n && /* @__PURE__ */ T(d, {
387
418
  size: 14,
388
419
  className: "absolute top-1.5 right-1.5 text-current"
389
420
  }),
390
- /* @__PURE__ */ w(t, { size: 20 }),
391
- /* @__PURE__ */ w("span", {
421
+ /* @__PURE__ */ T(t, { size: 20 }),
422
+ /* @__PURE__ */ T("span", {
392
423
  className: "text-xs font-semibold",
393
- children: e.label
424
+ children: P(e.labelKey, e.labelFallback)
394
425
  }),
395
- /* @__PURE__ */ w("span", {
426
+ /* @__PURE__ */ T("span", {
396
427
  className: "text-[10px] leading-tight opacity-70",
397
- children: e.description
428
+ children: P(e.descriptionKey, e.descriptionFallback)
398
429
  })
399
430
  ]
400
431
  }, e.value);
401
432
  })
402
433
  })]
403
434
  }),
404
- /* @__PURE__ */ w(O, {
405
- title: h("channel.advancedOptions", "Advanced settings"),
406
- children: /* @__PURE__ */ w("div", {
435
+ /* @__PURE__ */ T(k, {
436
+ title: P("channel.advancedOptions", "Advanced settings"),
437
+ children: /* @__PURE__ */ T("div", {
407
438
  className: "grid gap-4 lg:grid-cols-2",
408
- children: /* @__PURE__ */ T("div", { children: [
409
- /* @__PURE__ */ T("label", {
439
+ children: /* @__PURE__ */ E("div", { children: [
440
+ /* @__PURE__ */ E("label", {
410
441
  className: "block text-sm font-medium text-text-primary mb-1.5",
411
442
  children: [
412
- h("channel.platformConfig", "Platform Config"),
443
+ P("channel.platformConfig", "Platform Config"),
413
444
  " ",
414
- /* @__PURE__ */ w("span", {
445
+ /* @__PURE__ */ T("span", {
415
446
  className: "text-[10px] text-text-secondary",
416
- children: "(JSON)"
447
+ children: P("channel.jsonMarker", "(JSON)")
417
448
  })
418
449
  ]
419
450
  }),
420
- /* @__PURE__ */ w("textarea", {
421
- "aria-label": h("channel.platformConfig", "Platform Config"),
422
- value: S.platformConfig,
423
- onChange: (e) => j((t) => ({
451
+ /* @__PURE__ */ T("textarea", {
452
+ "aria-label": P("channel.platformConfig", "Platform Config"),
453
+ value: B.platformConfig,
454
+ onChange: (e) => V((t) => ({
424
455
  ...t,
425
456
  platformConfig: e.target.value
426
457
  })),
427
458
  rows: 3,
428
459
  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/50 resize-none font-mono placeholder:text-text-secondary",
429
- placeholder: h("channel.platformConfigPlaceholder", "{\"fromEmail\": \"noreply@example.com\"}")
460
+ placeholder: P("channel.platformConfigPlaceholder", "{\"fromEmail\": \"noreply@example.com\"}")
430
461
  }),
431
- /* @__PURE__ */ w("p", {
462
+ /* @__PURE__ */ T("p", {
432
463
  className: "mt-1 text-[11px] text-text-secondary",
433
- children: h("channel.platformConfigHint", "Platform-specific configuration as JSON")
464
+ children: P("channel.platformConfigHint", "Platform-specific configuration as JSON")
434
465
  })
435
466
  ] })
436
467
  })
437
468
  }),
438
- /* @__PURE__ */ T("div", {
469
+ /* @__PURE__ */ E("div", {
439
470
  className: "flex items-center justify-between pt-2",
440
- children: [/* @__PURE__ */ w("button", {
471
+ children: [/* @__PURE__ */ T("button", {
441
472
  type: "button",
442
- onClick: () => l("/channels/list"),
473
+ onClick: () => j("/channels/list"),
443
474
  className: "px-4 py-2 text-sm text-text-secondary hover:text-text-primary hover:bg-surface-hover border border-border-subtle rounded-lg transition-colors",
444
- children: h("channel.cancel", "Cancel")
445
- }), /* @__PURE__ */ T("button", {
475
+ children: P("channel.cancel", "Cancel")
476
+ }), /* @__PURE__ */ E("button", {
446
477
  type: "submit",
447
- disabled: g || !S.name.trim(),
478
+ disabled: I || !B.name.trim(),
448
479
  className: "inline-flex items-center gap-2 px-5 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",
449
- children: [g ? /* @__PURE__ */ w(m, {
480
+ children: [I ? /* @__PURE__ */ T(h, {
450
481
  size: 16,
451
482
  className: "animate-spin"
452
- }) : /* @__PURE__ */ w(y, { size: 16 }), h("channel.createChannel", "Create Channel")]
483
+ }) : /* @__PURE__ */ T(b, { size: 16 }), P("channel.createChannel", "Create Channel")]
453
484
  })]
454
485
  })
455
486
  ]