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