@burdenoff/microfe-notification 2026.624.2 → 2026.625.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.
@@ -10,27 +10,28 @@ import { useUserSearch as ie } from "../hooks/useUserSearch.js";
10
10
  import { RecipientSelector as ae } from "../components/RecipientSelector.js";
11
11
  import { useMemo as a, useState as o } from "react";
12
12
  import { useGlobalUi as oe, usePermissions as se } from "@burdenoff/fe-libs/shared/providers/shell";
13
- import { AlertCircle as ce, ArrowLeft as le, Bell as ue, CheckCircle2 as s, Eye as de, EyeOff as fe, FileText as pe, ImagePlus as me, Link2 as he, Loader2 as c, Mail as ge, MessageSquare as l, Send as _e, Smartphone as ve, User as u, Users as ye, X as be } from "lucide-react";
14
- import { useNavigate as xe } from "react-router-dom";
15
- import { Fragment as Se, jsx as d, jsxs as f } from "react/jsx-runtime";
13
+ import { AlertCircle as ce, ArrowLeft as le, Bell as ue, CheckCircle2 as s, Eye as de, EyeOff as fe, FileText as pe, ImagePlus as me, Link2 as he, Loader2 as c, Mail as l, MessageSquare as u, Send as ge, Smartphone as _e, User as d, Users as ve, X as ye } from "lucide-react";
14
+ import { useNavigate as be } from "react-router-dom";
15
+ import { Fragment as xe, jsx as f, jsxs as p } from "react/jsx-runtime";
16
+ import { CTAOverflowMenu as Se, GlassCard as Ce } from "@burdenoff/fe-libs/ui";
16
17
  //#region src/pages/CreateNotificationPage.tsx
17
- var Ce = [
18
+ var we = [
18
19
  {
19
20
  value: "EMAIL",
20
21
  label: "Email",
21
- icon: ge,
22
+ icon: l,
22
23
  description: "Send via email"
23
24
  },
24
25
  {
25
26
  value: "SMS",
26
27
  label: "SMS",
27
- icon: l,
28
+ icon: u,
28
29
  description: "Send text message"
29
30
  },
30
31
  {
31
32
  value: "PUSH",
32
33
  label: "Push",
33
- icon: ve,
34
+ icon: _e,
34
35
  description: "Mobile push notification"
35
36
  },
36
37
  {
@@ -42,34 +43,34 @@ var Ce = [
42
43
  {
43
44
  value: "WHATSAPP",
44
45
  label: "WhatsApp",
45
- icon: l,
46
+ icon: u,
46
47
  description: "Send via WhatsApp"
47
48
  },
48
49
  {
49
50
  value: "SLACK",
50
51
  label: "Slack",
51
- icon: l,
52
+ icon: u,
52
53
  description: "Send to Slack"
53
54
  },
54
55
  {
55
56
  value: "TEAMS",
56
57
  label: "Teams",
57
- icon: l,
58
+ icon: u,
58
59
  description: "Send to Microsoft Teams"
59
60
  },
60
61
  {
61
62
  value: "TELEGRAM",
62
63
  label: "Telegram",
63
- icon: l,
64
+ icon: u,
64
65
  description: "Send to Telegram"
65
66
  },
66
67
  {
67
68
  value: "DISCORD",
68
69
  label: "Discord",
69
- icon: l,
70
+ icon: u,
70
71
  description: "Send to Discord"
71
72
  }
72
- ], we = [
73
+ ], Te = [
73
74
  {
74
75
  value: "TRANSACTIONAL",
75
76
  label: "Transactional",
@@ -90,7 +91,7 @@ var Ce = [
90
91
  label: "Alert",
91
92
  description: "Important alerts and warnings"
92
93
  }
93
- ], Te = [
94
+ ], Ee = [
94
95
  {
95
96
  value: "LOW",
96
97
  label: "Low",
@@ -111,7 +112,7 @@ var Ce = [
111
112
  label: "Urgent",
112
113
  color: "bg-status-error-bg-subtle text-status-error-text"
113
114
  }
114
- ], Ee = [
115
+ ], De = [
115
116
  {
116
117
  value: "",
117
118
  label: "All Roles"
@@ -140,7 +141,7 @@ var Ce = [
140
141
  value: "GUEST",
141
142
  label: "Guest"
142
143
  }
143
- ], De = [
144
+ ], Oe = [
144
145
  {
145
146
  value: "",
146
147
  label: "All Statuses"
@@ -162,8 +163,8 @@ var Ce = [
162
163
  label: "Inactive"
163
164
  }
164
165
  ];
165
- function Oe() {
166
- let ge = xe(), l = n(), { hasPermission: ve, isLoading: Oe, refreshPermissions: ke } = se(), { showToast: Ae } = oe(), { sendNotification: je, sendBatch: Me, sendWithTemplate: Ne, isSending: p, error: Pe, lastResult: Fe, clearError: Ie, clearResult: Le } = ne(), { templates: m, isLoading: Re } = re(), { trackNotificationSent: ze } = e(), { searchUsers: h, fetchAllUsers: Be, results: g, isLoading: Ve, error: _ } = ie(), { topics: He } = t({ isActive: !0 }), [v, Ue] = o("compose"), [y, We] = o("EMAIL"), [b, Ge] = o("MARKETING"), [x, Ke] = o("MEDIUM"), [S, qe] = o([]), [C, w] = o("manual"), [T, E] = o([]), [D, Je] = o(!1), [O, Ye] = o(""), [k, Xe] = o(""), [A, Ze] = o(""), [j, Qe] = o(""), [$e, et] = o(""), [tt, nt] = o(!1), [M, rt] = o(""), [N, P] = o([{
166
+ function ke() {
167
+ let l = be(), u = n(), { hasPermission: _e, isLoading: ke, refreshPermissions: Ae } = se(), { showToast: je } = oe(), { sendNotification: Me, sendBatch: Ne, sendWithTemplate: Pe, isSending: m, error: Fe, lastResult: Ie, clearError: Le, clearResult: Re } = ne(), { templates: h, isLoading: ze } = re(), { trackNotificationSent: Be } = e(), { searchUsers: g, fetchAllUsers: Ve, results: _, isLoading: He, error: v } = ie(), { topics: Ue } = t({ isActive: !0 }), [y, We] = o("compose"), [b, Ge] = o("EMAIL"), [x, Ke] = o("MARKETING"), [S, qe] = o("MEDIUM"), [C, Je] = o([]), [w, T] = o("manual"), [E, D] = o([]), [O, Ye] = o(!1), [k, Xe] = o(""), [A, Ze] = o(""), [j, Qe] = o(""), [M, $e] = o(""), [et, tt] = o(""), [nt, rt] = o(!1), [N, it] = o(""), [at, P] = o([{
167
168
  url: "",
168
169
  label: "",
169
170
  kind: "image"
@@ -172,14 +173,14 @@ function Oe() {
172
173
  label: "",
173
174
  url: "",
174
175
  style: "primary"
175
- }]), [L, it] = o(!1), [R, z] = o([]), [B, V] = o(""), [H, at] = o(""), [U, ot] = o({}), [W, st] = o(!1), [G, ct] = o(""), [K, lt] = o(!0), [ut, q] = o(null), [J, Y] = o(!1), X = a(() => m.find((e) => e.slug === H), [m, H]), Z = a(() => {
176
+ }]), [L, ot] = o(!1), [R, z] = o([]), [B, V] = o(""), [H, st] = o(""), [U, ct] = o({}), [W, lt] = o(!1), [G, ut] = o(""), [K, dt] = o(!0), [ft, q] = o(null), [J, Y] = o(!1), X = a(() => h.find((e) => e.slug === H), [h, H]), Z = a(() => {
176
177
  if (!X?.variables) return null;
177
178
  try {
178
179
  return typeof X.variables == "string" ? JSON.parse(X.variables) : X.variables;
179
180
  } catch {
180
181
  return null;
181
182
  }
182
- }, [X]), dt = a(() => Z ? Array.isArray(Z) ? Z.filter((e) => e && typeof e.name == "string").map((e) => ({
183
+ }, [X]), pt = a(() => Z ? Array.isArray(Z) ? Z.filter((e) => e && typeof e.name == "string").map((e) => ({
183
184
  key: e.name,
184
185
  type: e.type || "string",
185
186
  required: !!e.required,
@@ -191,60 +192,60 @@ function Oe() {
191
192
  required: !1,
192
193
  description: "",
193
194
  defaultValue: ""
194
- })) : [] : [], [Z]), ft = (e) => {
195
+ })) : [] : [], [Z]), mt = (e) => {
195
196
  let t = e;
196
197
  for (let [e, n] of Object.entries(U)) t = t.replace(RegExp(`\\{\\{${e}\\}\\}`, "g"), n || `{{${e}}}`);
197
198
  return t;
198
- }, pt = a(() => v === "template" && X ? ft(X.bodyTemplate || "") : j, [
199
- v,
199
+ }, ht = a(() => y === "template" && X ? mt(X.bodyTemplate || "") : M, [
200
+ y,
200
201
  X,
201
202
  U,
202
- j
203
- ]), mt = a(() => v === "template" && X?.subject ? ft(X.subject) : A, [
204
- v,
203
+ M
204
+ ]), gt = a(() => y === "template" && X?.subject ? mt(X.subject) : j, [
205
+ y,
205
206
  X,
206
207
  U,
207
- A
208
- ]), ht = [
208
+ j
209
+ ]), _t = [
209
210
  "EMAIL",
210
211
  "SMS",
211
212
  "WHATSAPP"
212
- ].includes(y), Q = a(() => F.filter((e) => e.label.trim() && e.url.trim()).map((e) => ({
213
+ ].includes(b), Q = a(() => F.filter((e) => e.label.trim() && e.url.trim()).map((e) => ({
213
214
  id: e.id,
214
215
  label: e.label.trim(),
215
216
  url: e.url.trim(),
216
217
  style: e.style
217
- })), [F]), $ = a(() => N.filter((e) => e.url.trim()).map((e) => ({
218
+ })), [F]), $ = a(() => at.filter((e) => e.url.trim()).map((e) => ({
218
219
  url: e.url.trim(),
219
220
  label: e.label.trim() || void 0,
220
221
  kind: e.kind
221
- })), [N]);
222
- if (Oe) return /* @__PURE__ */ d("div", {
222
+ })), [at]);
223
+ if (ke) return /* @__PURE__ */ f("div", {
223
224
  className: "flex h-64 items-center justify-center",
224
- children: /* @__PURE__ */ d("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
225
+ children: /* @__PURE__ */ f("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
225
226
  });
226
- let gt = ve(te.NOTIFICATION_CREATE), _t = ve(te.NOTIFICATION_SEND);
227
- if (!gt || !_t) return /* @__PURE__ */ d("div", {
227
+ let vt = _e(te.NOTIFICATION_CREATE), yt = _e(te.NOTIFICATION_SEND);
228
+ if (!vt || !yt) return /* @__PURE__ */ f("div", {
228
229
  className: "p-8 text-center text-text-secondary",
229
- children: l("notifications.noPermissionCreateAndSend", "You don't have permission to create and send notifications.")
230
+ children: u("notifications.noPermissionCreateAndSend", "You don't have permission to create and send notifications.")
230
231
  });
231
- let vt = (e) => y === "EMAIL" ? {
232
+ let bt = (e) => b === "EMAIL" ? {
232
233
  userId: e.id,
233
234
  email: e.email
234
- } : y === "SMS" ? e.phoneNumber ? {
235
+ } : b === "SMS" ? e.phoneNumber ? {
235
236
  userId: e.id,
236
237
  phoneNumber: e.phoneNumber
237
- } : null : y === "WHATSAPP" ? e.phoneNumber ? {
238
+ } : null : b === "WHATSAPP" ? e.phoneNumber ? {
238
239
  userId: e.id,
239
240
  whatsappNumber: e.phoneNumber
240
241
  } : null : {
241
242
  userId: e.id,
242
243
  email: e.email
243
- }, yt = async () => (D ? await Be({
244
+ }, xt = async () => (O ? await Ve({
244
245
  search: B,
245
- role: O || void 0,
246
- status: k || void 0
247
- }) : T).map((e) => vt(e)).filter((e) => !!e), bt = () => S.map((e) => ({
246
+ role: k || void 0,
247
+ status: A || void 0
248
+ }) : E).map((e) => bt(e)).filter((e) => !!e), St = () => C.map((e) => ({
248
249
  email: e.email,
249
250
  phoneNumber: e.phoneNumber,
250
251
  pushToken: e.pushToken,
@@ -253,27 +254,27 @@ function Oe() {
253
254
  teamsUserId: e.teamsUserId,
254
255
  webhookUrl: e.webhookUrl,
255
256
  userId: e.userId
256
- })), xt = () => {
257
- if (q(null), C === "manual" && S.length === 0) return q(l("notifications.addRecipientRequired", "Please add at least one recipient")), !1;
258
- if (C === "directory" && T.length === 0 && !D) return q(l("notifications.selectDirectoryUsersRequired", "Please select at least one user")), !1;
259
- if (L && R.length === 0) return q(l("notifications.selectUsersRequired", "Please select users for in-app notifications")), !1;
260
- if (b === "MARKETING" && !M) return q(l("notifications.selectTopicRequired", "Please choose a topic for promotional notifications")), !1;
261
- if (v === "compose") {
262
- if (!j.trim()) return q(l("notifications.bodyRequired", "Message body is required")), !1;
263
- if (y === "EMAIL" && !A.trim()) return q(l("notifications.subjectRequired", "Subject is required for email notifications")), !1;
264
- } else if (!H) return q(l("notifications.selectTemplateRequired", "Please select a template")), !1;
257
+ })), Ct = () => {
258
+ if (q(null), w === "manual" && C.length === 0) return q(u("notifications.addRecipientRequired", "Please add at least one recipient")), !1;
259
+ if (w === "directory" && E.length === 0 && !O) return q(u("notifications.selectDirectoryUsersRequired", "Please select at least one user")), !1;
260
+ if (L && R.length === 0) return q(u("notifications.selectUsersRequired", "Please select users for in-app notifications")), !1;
261
+ if (x === "MARKETING" && !N) return q(u("notifications.selectTopicRequired", "Please choose a topic for promotional notifications")), !1;
262
+ if (y === "compose") {
263
+ if (!M.trim()) return q(u("notifications.bodyRequired", "Message body is required")), !1;
264
+ if (b === "EMAIL" && !j.trim()) return q(u("notifications.subjectRequired", "Subject is required for email notifications")), !1;
265
+ } else if (!H) return q(u("notifications.selectTemplateRequired", "Please select a template")), !1;
265
266
  return !0;
266
- }, St = async () => {
267
- if (ee("light"), xt()) {
268
- Ie(), Le(), Y(!1);
267
+ }, wt = async () => {
268
+ if (ee("light"), Ct()) {
269
+ Le(), Re(), Y(!1);
269
270
  try {
270
- let e = C === "directory" ? await yt() : bt(), t = e.length + (L ? R.length : 0), n = (e, n) => {
271
- ze({
272
- mode: v,
273
- channel: y,
274
- type: v === "template" && X?.type || b,
275
- priority: x,
276
- recipientSource: C,
271
+ let e = w === "directory" ? await xt() : St(), t = e.length + (L ? R.length : 0), n = (e, n) => {
272
+ Be({
273
+ mode: y,
274
+ channel: b,
275
+ type: y === "template" && X?.type || x,
276
+ priority: S,
277
+ recipientSource: w,
277
278
  recipientCount: t,
278
279
  successCount: e,
279
280
  failedCount: n,
@@ -284,17 +285,17 @@ function Oe() {
284
285
  });
285
286
  };
286
287
  if (e.length === 0) {
287
- q(l("notifications.noDeliverableRecipients", "No valid recipients matched the selected channel and filters"));
288
+ q(u("notifications.noDeliverableRecipients", "No valid recipients matched the selected channel and filters"));
288
289
  return;
289
290
  }
290
- if (v === "template") {
291
- let t = await Ne({
291
+ if (y === "template") {
292
+ let t = await Pe({
292
293
  templateSlug: H,
293
294
  variables: U,
294
295
  recipients: e,
295
- platform: y,
296
- priority: x,
297
- topicId: M || void 0,
296
+ platform: b,
297
+ priority: S,
298
+ topicId: N || void 0,
298
299
  actions: Q,
299
300
  media: $,
300
301
  redirectUrl: Q[0]?.url,
@@ -310,20 +311,20 @@ function Oe() {
310
311
  t && t.totalTriggered > 0 && (n(t.totalTriggered, t.totalFailed), Y(!0), i("success"));
311
312
  } else {
312
313
  let t = e.map((e) => ({
313
- body: j,
314
- channel: y,
314
+ body: M,
315
+ channel: b,
315
316
  recipient: e,
316
- subject: y === "EMAIL" ? A : void 0,
317
- htmlBody: tt && $e ? $e : void 0,
318
- type: b,
319
- priority: x,
320
- topicId: M || void 0,
317
+ subject: b === "EMAIL" ? j : void 0,
318
+ htmlBody: nt && et ? et : void 0,
319
+ type: x,
320
+ priority: S,
321
+ topicId: N || void 0,
321
322
  redirectUrl: Q[0]?.url,
322
323
  actions: Q,
323
324
  media: $
324
325
  }));
325
326
  if (W || t.length > 1) {
326
- let e = await Me({
327
+ let e = await Ne({
327
328
  notifications: t,
328
329
  ...W && G && {
329
330
  scheduledFor: new Date(G).toISOString(),
@@ -331,9 +332,9 @@ function Oe() {
331
332
  }
332
333
  });
333
334
  e && (e.successCount > 0 || e.totalRequested > 0) && (n(e.successCount, e.failureCount), Y(!0), i("success"));
334
- } else (await je({
335
+ } else (await Me({
335
336
  notification: t[0],
336
- platform: y,
337
+ platform: b,
337
338
  ...L && {
338
339
  includeInApp: L,
339
340
  userIds: R.map((e) => e.id)
@@ -342,14 +343,14 @@ function Oe() {
342
343
  }
343
344
  } catch (e) {
344
345
  if (i("error"), r(e)) {
345
- Ie(), Ae(l("notifications.permissionDeniedOnSend", "You don't have permission to send that notification. Refreshing access…"), "warning"), ke().catch((e) => console.warn("[permissions] refresh failed after send denial:", e));
346
+ Le(), je(u("notifications.permissionDeniedOnSend", "You don't have permission to send that notification. Refreshing access…"), "warning"), Ae().catch((e) => console.warn("[permissions] refresh failed after send denial:", e));
346
347
  return;
347
348
  }
348
349
  console.error("Failed to send notification:", e);
349
350
  }
350
351
  }
351
- }, Ct = () => {
352
- qe([]), w("manual"), E([]), Je(!1), Ye(""), Xe(""), Ze(""), Qe(""), et(""), rt(""), P([{
352
+ }, Tt = () => {
353
+ Je([]), T("manual"), D([]), Ye(!1), Xe(""), Ze(""), Qe(""), $e(""), tt(""), it(""), P([{
353
354
  url: "",
354
355
  label: "",
355
356
  kind: "image"
@@ -358,189 +359,189 @@ function Oe() {
358
359
  label: "",
359
360
  url: "",
360
361
  style: "primary"
361
- }]), at(""), ot({}), it(!1), z([]), V(""), st(!1), ct(""), Y(!1), Ie(), Le();
362
- }, wt = ut || Pe;
363
- return /* @__PURE__ */ f("div", {
362
+ }]), st(""), ct({}), ot(!1), z([]), V(""), lt(!1), ut(""), Y(!1), Le(), Re();
363
+ }, Et = ft || Fe;
364
+ return /* @__PURE__ */ p("div", {
364
365
  className: "min-h-screen bg-bg-canvas",
365
366
  children: [
366
- /* @__PURE__ */ f("div", {
367
- className: "sticky top-0 z-10 flex items-center justify-between px-6 py-4 bg-bg-surface border-b border-border-subtle",
368
- children: [/* @__PURE__ */ f("div", {
367
+ /* @__PURE__ */ p("div", {
368
+ className: "sticky top-0 z-10 flex items-center justify-between gap-3 px-6 py-4 bg-bg-surface border-b border-border-seam",
369
+ children: [/* @__PURE__ */ p("div", {
369
370
  className: "flex items-center gap-4",
370
- children: [/* @__PURE__ */ d("button", {
371
- onClick: () => ge("/notifications/center"),
371
+ children: [/* @__PURE__ */ f("button", {
372
+ onClick: () => l("/notifications/center"),
372
373
  className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
373
- children: /* @__PURE__ */ d(le, { size: 20 })
374
- }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
374
+ children: /* @__PURE__ */ f(le, { size: 20 })
375
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
375
376
  className: "text-xl font-semibold text-text-primary",
376
- children: l("notifications.sendTitle", "Send Notification")
377
- }), /* @__PURE__ */ d("p", {
377
+ children: u("notifications.sendTitle", "Send Notification")
378
+ }), /* @__PURE__ */ f("p", {
378
379
  className: "text-sm text-text-secondary",
379
- children: l("notifications.sendSubtitle", "Compose and send notifications to users")
380
+ children: u("notifications.sendSubtitle", "Compose and send notifications to users")
380
381
  })] })]
381
- }), /* @__PURE__ */ f("div", {
382
- className: "flex items-center gap-3",
383
- children: [/* @__PURE__ */ f("button", {
384
- onClick: () => lt(!K),
385
- className: `flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-lg transition-colors ${K ? "bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300" : "text-text-secondary hover:bg-bg-sunken"}`,
386
- children: [d(K ? fe : de, { size: 16 }), l("notifications.preview", "Preview")]
387
- }), /* @__PURE__ */ f("button", {
388
- onClick: St,
389
- disabled: p || J,
390
- className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
391
- children: [p ? /* @__PURE__ */ d(c, {
382
+ }), /* @__PURE__ */ f(Se, {
383
+ primary: {
384
+ label: m ? u("notifications.sending", "Sending...") : J ? u("notifications.sent", "Sent!") : W ? u("notifications.schedule", "Schedule") : u("notifications.sendNotification", "Send Notification"),
385
+ onSelect: wt,
386
+ disabled: m || J,
387
+ icon: m ? /* @__PURE__ */ f(c, {
392
388
  size: 16,
393
389
  className: "animate-spin"
394
- }) : d(J ? s : _e, { size: 16 }), p ? l("notifications.sending", "Sending...") : J ? l("notifications.sent", "Sent!") : W ? l("notifications.schedule", "Schedule") : l("notifications.sendNotification", "Send Notification")]
395
- })]
390
+ }) : f(J ? s : ge, { size: 16 })
391
+ },
392
+ actions: [{
393
+ label: K ? u("notifications.hidePreview", "Hide preview") : u("notifications.showPreview", "Show preview"),
394
+ onSelect: () => dt(!K),
395
+ icon: f(K ? fe : de, { size: 16 })
396
+ }]
396
397
  })]
397
398
  }),
398
- J && /* @__PURE__ */ f("div", {
399
- className: "mx-6 mt-4 flex items-center justify-between p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
400
- children: [/* @__PURE__ */ f("div", {
399
+ J && /* @__PURE__ */ p("div", {
400
+ className: "mx-6 mt-4 flex items-center justify-between p-4 bg-status-success-bg-subtle border border-border-seam rounded-lg",
401
+ children: [/* @__PURE__ */ p("div", {
401
402
  className: "flex items-center gap-3",
402
- children: [/* @__PURE__ */ d(s, {
403
+ children: [/* @__PURE__ */ f(s, {
403
404
  size: 20,
404
405
  className: "text-status-success-text"
405
- }), /* @__PURE__ */ f("p", {
406
+ }), /* @__PURE__ */ p("p", {
406
407
  className: "text-sm text-status-success-text",
407
408
  children: [
408
- l("notifications.sentSuccessfully", "Notification sent successfully to"),
409
+ u("notifications.sentSuccessfully", "Notification sent successfully to"),
409
410
  " ",
410
- S.length,
411
+ C.length,
411
412
  " ",
412
- l("notifications.recipientCount", "recipient"),
413
- S.length === 1 ? "" : "s",
413
+ u("notifications.recipientCount", "recipient"),
414
+ C.length === 1 ? "" : "s",
414
415
  "!"
415
416
  ]
416
417
  })]
417
- }), /* @__PURE__ */ d("button", {
418
- onClick: Ct,
418
+ }), /* @__PURE__ */ f("button", {
419
+ onClick: Tt,
419
420
  className: "px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle rounded-lg transition-colors",
420
- children: l("notifications.sendAnother", "Send Another")
421
+ children: u("notifications.sendAnother", "Send Another")
421
422
  })]
422
423
  }),
423
- wt && /* @__PURE__ */ f("div", {
424
- className: "mx-6 mt-4 flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
425
- children: [/* @__PURE__ */ d(ce, {
424
+ Et && /* @__PURE__ */ p("div", {
425
+ className: "mx-6 mt-4 flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-border-seam rounded-lg",
426
+ children: [/* @__PURE__ */ f(ce, {
426
427
  size: 20,
427
428
  className: "text-status-error-text flex-shrink-0"
428
- }), /* @__PURE__ */ d("p", {
429
+ }), /* @__PURE__ */ f("p", {
429
430
  className: "text-sm text-status-error-text",
430
- children: wt
431
+ children: Et
431
432
  })]
432
433
  }),
433
- /* @__PURE__ */ f("div", {
434
+ /* @__PURE__ */ p("div", {
434
435
  className: "flex gap-6 p-6",
435
- children: [/* @__PURE__ */ f("div", {
436
+ children: [/* @__PURE__ */ p("div", {
436
437
  className: `flex-1 space-y-6 ${K ? "max-w-2xl" : ""}`,
437
438
  children: [
438
- /* @__PURE__ */ f("div", {
439
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
440
- children: [/* @__PURE__ */ f("div", {
439
+ /* @__PURE__ */ p("div", {
440
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
441
+ children: [/* @__PURE__ */ p("div", {
441
442
  className: "flex items-center gap-2 mb-4",
442
- children: [/* @__PURE__ */ d(pe, {
443
+ children: [/* @__PURE__ */ f(pe, {
443
444
  size: 18,
444
445
  className: "text-text-secondary"
445
- }), /* @__PURE__ */ d("h2", {
446
+ }), /* @__PURE__ */ f("h2", {
446
447
  className: "text-sm font-medium text-text-primary",
447
- children: l("notifications.sendMode", "Send Mode")
448
+ children: u("notifications.sendMode", "Send Mode")
448
449
  })]
449
- }), /* @__PURE__ */ f("div", {
450
+ }), /* @__PURE__ */ p("div", {
450
451
  className: "flex gap-2",
451
- children: [/* @__PURE__ */ d("button", {
452
- onClick: () => Ue("compose"),
453
- className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${v === "compose" ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
454
- children: l("notifications.composeMessage", "Compose Message")
455
- }), /* @__PURE__ */ d("button", {
456
- onClick: () => Ue("template"),
457
- className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${v === "template" ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
458
- children: l("notifications.useTemplate", "Use Template")
452
+ children: [/* @__PURE__ */ f("button", {
453
+ onClick: () => We("compose"),
454
+ className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${y === "compose" ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
455
+ children: u("notifications.composeMessage", "Compose Message")
456
+ }), /* @__PURE__ */ f("button", {
457
+ onClick: () => We("template"),
458
+ className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${y === "template" ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
459
+ children: u("notifications.useTemplate", "Use Template")
459
460
  })]
460
461
  })]
461
462
  }),
462
- /* @__PURE__ */ f("div", {
463
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
463
+ /* @__PURE__ */ p("div", {
464
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
464
465
  children: [
465
- /* @__PURE__ */ d("h2", {
466
+ /* @__PURE__ */ f("h2", {
466
467
  className: "text-sm font-medium text-text-primary mb-4",
467
- children: l("notifications.channel", "Channel")
468
+ children: u("notifications.channel", "Channel")
468
469
  }),
469
- /* @__PURE__ */ d("div", {
470
+ /* @__PURE__ */ f("div", {
470
471
  className: "grid grid-cols-2 sm:grid-cols-4 gap-2",
471
- children: Ce.map((e) => {
472
+ children: we.map((e) => {
472
473
  let t = e.icon;
473
- return /* @__PURE__ */ f("button", {
474
+ return /* @__PURE__ */ p("button", {
474
475
  onClick: () => {
475
- We(e.value), qe([]), E([]), [
476
+ Ge(e.value), Je([]), D([]), [
476
477
  "EMAIL",
477
478
  "SMS",
478
479
  "WHATSAPP"
479
- ].includes(e.value) || (w("manual"), Je(!1));
480
+ ].includes(e.value) || (T("manual"), Ye(!1));
480
481
  },
481
- className: `flex flex-col items-center gap-2 p-3 rounded-lg border transition-colors ${y === e.value ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
482
- children: [/* @__PURE__ */ d(t, { size: 20 }), /* @__PURE__ */ d("span", {
482
+ className: `flex flex-col items-center gap-2 p-3 rounded-lg border transition-colors ${b === e.value ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
483
+ children: [/* @__PURE__ */ f(t, { size: 20 }), /* @__PURE__ */ f("span", {
483
484
  className: "text-xs font-medium",
484
- children: l(`notifications.channel.${e.value}`, e.label)
485
+ children: u(`notifications.channel.${e.value}`, e.label)
485
486
  })]
486
487
  }, e.value);
487
488
  })
488
489
  }),
489
- /* @__PURE__ */ f("div", {
490
+ /* @__PURE__ */ p("div", {
490
491
  className: "mt-4 pt-4 border-t border-border-subtle",
491
- children: [/* @__PURE__ */ f("label", {
492
+ children: [/* @__PURE__ */ p("label", {
492
493
  className: "flex items-center gap-3 cursor-pointer",
493
- children: [/* @__PURE__ */ d("input", {
494
+ children: [/* @__PURE__ */ f("input", {
494
495
  type: "checkbox",
495
496
  checked: L,
496
497
  onChange: (e) => {
497
- it(e.target.checked), e.target.checked || (z([]), V(""));
498
+ ot(e.target.checked), e.target.checked || (z([]), V(""));
498
499
  },
499
500
  className: "w-4 h-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
500
- }), /* @__PURE__ */ f("div", {
501
+ }), /* @__PURE__ */ p("div", {
501
502
  className: "flex items-center gap-2",
502
- children: [/* @__PURE__ */ d(ue, {
503
+ children: [/* @__PURE__ */ f(ue, {
503
504
  size: 16,
504
505
  className: "text-primary-500"
505
- }), /* @__PURE__ */ d("span", {
506
+ }), /* @__PURE__ */ f("span", {
506
507
  className: "text-sm font-medium text-text-primary",
507
- children: l("notifications.alsoSendInApp", "Also send as In-App notification")
508
+ children: u("notifications.alsoSendInApp", "Also send as In-App notification")
508
509
  })]
509
510
  })]
510
- }), /* @__PURE__ */ d("p", {
511
+ }), /* @__PURE__ */ f("p", {
511
512
  className: "text-xs text-text-secondary ml-7 mt-1",
512
- children: l("notifications.inAppDescription", "Show this notification in the app's notification center alongside the selected channel")
513
+ children: u("notifications.inAppDescription", "Show this notification in the app's notification center alongside the selected channel")
513
514
  })]
514
515
  })
515
516
  ]
516
517
  }),
517
- /* @__PURE__ */ f("div", {
518
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
519
- children: [/* @__PURE__ */ f("label", {
518
+ /* @__PURE__ */ p("div", {
519
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
520
+ children: [/* @__PURE__ */ p("label", {
520
521
  className: "flex items-center gap-3 cursor-pointer",
521
- children: [/* @__PURE__ */ d("input", {
522
+ children: [/* @__PURE__ */ f("input", {
522
523
  type: "checkbox",
523
524
  checked: W,
524
525
  onChange: (e) => {
525
- st(e.target.checked), e.target.checked || ct("");
526
+ lt(e.target.checked), e.target.checked || ut("");
526
527
  },
527
528
  className: "w-4 h-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
528
- }), /* @__PURE__ */ d("span", {
529
+ }), /* @__PURE__ */ f("span", {
529
530
  className: "text-sm font-medium text-text-primary",
530
- children: l("notifications.scheduleForLater", "Schedule for later")
531
+ children: u("notifications.scheduleForLater", "Schedule for later")
531
532
  })]
532
- }), W && /* @__PURE__ */ f("div", {
533
+ }), W && /* @__PURE__ */ p("div", {
533
534
  className: "mt-3 ml-7",
534
- children: [/* @__PURE__ */ d("input", {
535
+ children: [/* @__PURE__ */ f("input", {
535
536
  type: "datetime-local",
536
537
  value: G,
537
538
  min: (/* @__PURE__ */ new Date()).toISOString().slice(0, 16),
538
- onChange: (e) => ct(e.target.value),
539
+ onChange: (e) => ut(e.target.value),
539
540
  className: "px-4 py-2 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
540
- }), /* @__PURE__ */ f("p", {
541
+ }), /* @__PURE__ */ p("p", {
541
542
  className: "text-xs text-text-tertiary mt-1",
542
543
  children: [
543
- l("notifications.timezone", "Timezone"),
544
+ u("notifications.timezone", "Timezone"),
544
545
  ":",
545
546
  " ",
546
547
  Intl.DateTimeFormat().resolvedOptions().timeZone
@@ -548,24 +549,24 @@ function Oe() {
548
549
  })]
549
550
  })]
550
551
  }),
551
- /* @__PURE__ */ f("div", {
552
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
552
+ /* @__PURE__ */ p("div", {
553
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
553
554
  children: [
554
- /* @__PURE__ */ f("label", {
555
+ /* @__PURE__ */ p("label", {
555
556
  className: "block text-sm font-medium text-text-primary mb-2",
556
- children: [l("notifications.topic", "Topic"), b === "MARKETING" && /* @__PURE__ */ d("span", {
557
+ children: [u("notifications.topic", "Topic"), x === "MARKETING" && /* @__PURE__ */ f("span", {
557
558
  className: "text-status-error-text ml-1",
558
559
  children: "*"
559
560
  })]
560
561
  }),
561
- /* @__PURE__ */ f("select", {
562
- value: M,
563
- onChange: (e) => rt(e.target.value),
562
+ /* @__PURE__ */ p("select", {
563
+ value: N,
564
+ onChange: (e) => it(e.target.value),
564
565
  className: "w-full rounded-lg border border-border-subtle bg-bg-canvas px-4 py-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-500",
565
- children: [/* @__PURE__ */ d("option", {
566
+ children: [/* @__PURE__ */ f("option", {
566
567
  value: "",
567
- children: l("notifications.selectTopic", "Select a topic")
568
- }), He.map((e) => /* @__PURE__ */ f("option", {
568
+ children: u("notifications.selectTopic", "Select a topic")
569
+ }), Ue.map((e) => /* @__PURE__ */ p("option", {
569
570
  value: e.id,
570
571
  children: [
571
572
  e.name,
@@ -575,189 +576,189 @@ function Oe() {
575
576
  ]
576
577
  }, e.id))]
577
578
  }),
578
- /* @__PURE__ */ d("p", {
579
+ /* @__PURE__ */ f("p", {
579
580
  className: "mt-2 text-xs text-text-secondary",
580
- children: l("notifications.topicHelper", "Topics help users unsubscribe from promotional content they do not want.")
581
+ children: u("notifications.topicHelper", "Topics help users unsubscribe from promotional content they do not want.")
581
582
  })
582
583
  ]
583
584
  }),
584
- /* @__PURE__ */ f("div", {
585
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
585
+ /* @__PURE__ */ p("div", {
586
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
586
587
  children: [
587
- /* @__PURE__ */ f("div", {
588
+ /* @__PURE__ */ p("div", {
588
589
  className: "flex items-center gap-2 mb-4",
589
- children: [/* @__PURE__ */ d(ye, {
590
+ children: [/* @__PURE__ */ f(ve, {
590
591
  size: 18,
591
592
  className: "text-text-secondary"
592
- }), /* @__PURE__ */ f("h2", {
593
+ }), /* @__PURE__ */ p("h2", {
593
594
  className: "text-sm font-medium text-text-primary",
594
595
  children: [
595
- l("notifications.recipients", "Recipients"),
596
+ u("notifications.recipients", "Recipients"),
596
597
  " ",
597
- /* @__PURE__ */ d("span", {
598
+ /* @__PURE__ */ f("span", {
598
599
  className: "text-status-error-text",
599
600
  children: "*"
600
601
  })
601
602
  ]
602
603
  })]
603
604
  }),
604
- ht && /* @__PURE__ */ f("div", {
605
+ _t && /* @__PURE__ */ p("div", {
605
606
  className: "mb-4 flex gap-2",
606
- children: [/* @__PURE__ */ d("button", {
607
- onClick: () => w("manual"),
608
- className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${C === "manual" ? "border-primary-500 bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"}`,
609
- children: l("notifications.manualRecipients", "Manual recipients")
610
- }), /* @__PURE__ */ d("button", {
611
- onClick: () => w("directory"),
612
- className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${C === "directory" ? "border-primary-500 bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"}`,
613
- children: l("notifications.userDirectory", "User directory")
607
+ children: [/* @__PURE__ */ f("button", {
608
+ onClick: () => T("manual"),
609
+ className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${w === "manual" ? "border-primary-500 bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"}`,
610
+ children: u("notifications.manualRecipients", "Manual recipients")
611
+ }), /* @__PURE__ */ f("button", {
612
+ onClick: () => T("directory"),
613
+ className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${w === "directory" ? "border-primary-500 bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"}`,
614
+ children: u("notifications.userDirectory", "User directory")
614
615
  })]
615
616
  }),
616
- C === "manual" || !ht ? /* @__PURE__ */ d(ae, {
617
- recipients: S,
618
- onChange: qe,
619
- channel: y,
620
- disabled: p || J
621
- }) : /* @__PURE__ */ f("div", {
617
+ w === "manual" || !_t ? /* @__PURE__ */ f(ae, {
618
+ recipients: C,
619
+ onChange: Je,
620
+ channel: b,
621
+ disabled: m || J
622
+ }) : /* @__PURE__ */ p("div", {
622
623
  className: "space-y-4",
623
624
  children: [
624
- /* @__PURE__ */ f("div", {
625
+ /* @__PURE__ */ p("div", {
625
626
  className: "grid gap-3 md:grid-cols-[minmax(0,1fr),180px,180px]",
626
627
  children: [
627
- /* @__PURE__ */ f("div", {
628
+ /* @__PURE__ */ p("div", {
628
629
  className: "relative",
629
- children: [/* @__PURE__ */ d("input", {
630
+ children: [/* @__PURE__ */ f("input", {
630
631
  type: "text",
631
632
  value: B,
632
633
  onChange: (e) => {
633
- V(e.target.value), h(e.target.value, {
634
- role: O || void 0,
635
- status: k || void 0
634
+ V(e.target.value), g(e.target.value, {
635
+ role: k || void 0,
636
+ status: A || void 0
636
637
  });
637
638
  },
638
- placeholder: l("notifications.searchUsersPlaceholder", "Search users by email or name..."),
639
+ placeholder: u("notifications.searchUsersPlaceholder", "Search users by email or name..."),
639
640
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
640
- }), Ve && /* @__PURE__ */ d("div", {
641
+ }), He && /* @__PURE__ */ f("div", {
641
642
  className: "absolute right-3 top-1/2 -translate-y-1/2",
642
- children: /* @__PURE__ */ d(c, {
643
+ children: /* @__PURE__ */ f(c, {
643
644
  size: 16,
644
645
  className: "animate-spin text-text-tertiary"
645
646
  })
646
647
  })]
647
648
  }),
648
- /* @__PURE__ */ d("select", {
649
- value: O,
649
+ /* @__PURE__ */ f("select", {
650
+ value: k,
650
651
  onChange: (e) => {
651
- Ye(e.target.value), h(B, {
652
+ Xe(e.target.value), g(B, {
652
653
  role: e.target.value || void 0,
653
- status: k || void 0
654
+ status: A || void 0
654
655
  });
655
656
  },
656
657
  className: "rounded-lg border border-border-subtle bg-bg-canvas px-4 py-3 text-sm text-text-primary",
657
- children: Ee.map((e) => /* @__PURE__ */ d("option", {
658
+ children: De.map((e) => /* @__PURE__ */ f("option", {
658
659
  value: e.value,
659
660
  children: e.label
660
661
  }, e.value))
661
662
  }),
662
- /* @__PURE__ */ d("select", {
663
- value: k,
663
+ /* @__PURE__ */ f("select", {
664
+ value: A,
664
665
  onChange: (e) => {
665
- Xe(e.target.value), h(B, {
666
- role: O || void 0,
666
+ Ze(e.target.value), g(B, {
667
+ role: k || void 0,
667
668
  status: e.target.value || void 0
668
669
  });
669
670
  },
670
671
  className: "rounded-lg border border-border-subtle bg-bg-canvas px-4 py-3 text-sm text-text-primary",
671
- children: De.map((e) => /* @__PURE__ */ d("option", {
672
+ children: Oe.map((e) => /* @__PURE__ */ f("option", {
672
673
  value: e.value,
673
674
  children: e.label
674
675
  }, e.value))
675
676
  })
676
677
  ]
677
678
  }),
678
- /* @__PURE__ */ f("label", {
679
+ /* @__PURE__ */ p("label", {
679
680
  className: "flex items-center gap-3 text-sm text-text-secondary",
680
- children: [/* @__PURE__ */ d("input", {
681
+ children: [/* @__PURE__ */ f("input", {
681
682
  type: "checkbox",
682
- checked: D,
683
- onChange: (e) => Je(e.target.checked),
683
+ checked: O,
684
+ onChange: (e) => Ye(e.target.checked),
684
685
  className: "h-4 w-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
685
- }), /* @__PURE__ */ d("span", { children: l("notifications.sendToAllMatchingUsers", "Send to all users matching the current search and filters") })]
686
+ }), /* @__PURE__ */ f("span", { children: u("notifications.sendToAllMatchingUsers", "Send to all users matching the current search and filters") })]
686
687
  }),
687
- B && /* @__PURE__ */ d("div", {
688
+ B && /* @__PURE__ */ f("div", {
688
689
  className: "max-h-56 overflow-y-auto rounded-lg border border-border-subtle",
689
- children: g.length > 0 ? g.map((e) => {
690
- let t = T.some((t) => t.id === e.id), n = y === "EMAIL" ? !!e.email : y === "SMS" || y === "WHATSAPP" ? !!e.phoneNumber : !0;
691
- return /* @__PURE__ */ f("button", {
690
+ children: _.length > 0 ? _.map((e) => {
691
+ let t = E.some((t) => t.id === e.id), n = b === "EMAIL" ? !!e.email : b === "SMS" || b === "WHATSAPP" ? !!e.phoneNumber : !0;
692
+ return /* @__PURE__ */ p("button", {
692
693
  type: "button",
693
694
  disabled: !n,
694
695
  onClick: () => {
695
- E(t ? (t) => t.filter((t) => t.id !== e.id) : (t) => [...t, e]);
696
+ D(t ? (t) => t.filter((t) => t.id !== e.id) : (t) => [...t, e]);
696
697
  },
697
698
  className: `flex w-full items-center gap-3 p-3 text-left transition-colors ${t ? "bg-primary-50 dark:bg-primary-900/30" : "hover:bg-bg-canvas"} ${n ? "" : "cursor-not-allowed opacity-50"}`,
698
699
  children: [
699
- /* @__PURE__ */ d(u, {
700
+ /* @__PURE__ */ f(d, {
700
701
  size: 16,
701
702
  className: t ? "text-primary-500" : "text-text-tertiary"
702
703
  }),
703
- /* @__PURE__ */ f("div", {
704
+ /* @__PURE__ */ p("div", {
704
705
  className: "flex-1",
705
706
  children: [
706
- /* @__PURE__ */ d("div", {
707
+ /* @__PURE__ */ f("div", {
707
708
  className: "text-sm font-medium text-text-primary",
708
709
  children: e.name
709
710
  }),
710
- /* @__PURE__ */ d("div", {
711
+ /* @__PURE__ */ f("div", {
711
712
  className: "text-xs text-text-secondary",
712
713
  children: e.email
713
714
  }),
714
- e.phoneNumber && /* @__PURE__ */ d("div", {
715
+ e.phoneNumber && /* @__PURE__ */ f("div", {
715
716
  className: "text-xs text-text-tertiary",
716
717
  children: e.phoneNumber
717
718
  })
718
719
  ]
719
720
  }),
720
- !n && /* @__PURE__ */ d("span", {
721
+ !n && /* @__PURE__ */ f("span", {
721
722
  className: "text-xs text-status-error-text",
722
- children: l("notifications.missingChannelTarget", "Missing channel target")
723
+ children: u("notifications.missingChannelTarget", "Missing channel target")
723
724
  }),
724
- t && /* @__PURE__ */ d(s, {
725
+ t && /* @__PURE__ */ f(s, {
725
726
  size: 16,
726
727
  className: "text-primary-500"
727
728
  })
728
729
  ]
729
730
  }, e.id);
730
- }) : /* @__PURE__ */ d("div", {
731
+ }) : /* @__PURE__ */ f("div", {
731
732
  className: "p-4 text-center text-sm text-text-secondary",
732
- children: _ ? `${l("notifications.error", "Error")}: ${_}` : l("notifications.noUsersFound", "No users found")
733
+ children: v ? `${u("notifications.error", "Error")}: ${v}` : u("notifications.noUsersFound", "No users found")
733
734
  })
734
735
  }),
735
- T.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("h3", {
736
+ E.length > 0 && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("h3", {
736
737
  className: "mb-2 text-sm font-medium text-text-secondary",
737
738
  children: [
738
- l("notifications.selectedUsers", "Selected Users"),
739
+ u("notifications.selectedUsers", "Selected Users"),
739
740
  " (",
740
- T.length,
741
+ E.length,
741
742
  ")"
742
743
  ]
743
- }), /* @__PURE__ */ d("div", {
744
+ }), /* @__PURE__ */ f("div", {
744
745
  className: "flex flex-wrap gap-2",
745
- children: T.map((e) => /* @__PURE__ */ f("div", {
746
+ children: E.map((e) => /* @__PURE__ */ p("div", {
746
747
  className: "flex items-center gap-2 rounded-full border border-primary-200 bg-primary-50 px-3 py-1.5 text-sm dark:border-primary-800 dark:bg-primary-900/30",
747
748
  children: [
748
- /* @__PURE__ */ d(u, {
749
+ /* @__PURE__ */ f(d, {
749
750
  size: 12,
750
751
  className: "text-primary-500"
751
752
  }),
752
- /* @__PURE__ */ d("span", {
753
+ /* @__PURE__ */ f("span", {
753
754
  className: "text-primary-700 dark:text-primary-300",
754
755
  children: e.name
755
756
  }),
756
- /* @__PURE__ */ d("button", {
757
+ /* @__PURE__ */ f("button", {
757
758
  type: "button",
758
- onClick: () => E((t) => t.filter((t) => t.id !== e.id)),
759
+ onClick: () => D((t) => t.filter((t) => t.id !== e.id)),
759
760
  className: "rounded-full p-0.5 hover:bg-primary-100 dark:hover:bg-primary-800",
760
- children: /* @__PURE__ */ d(be, {
761
+ children: /* @__PURE__ */ f(ye, {
761
762
  size: 12,
762
763
  className: "text-primary-500"
763
764
  })
@@ -769,112 +770,112 @@ function Oe() {
769
770
  })
770
771
  ]
771
772
  }),
772
- L && /* @__PURE__ */ f("div", {
773
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
773
+ L && /* @__PURE__ */ p("div", {
774
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
774
775
  children: [
775
- /* @__PURE__ */ f("div", {
776
+ /* @__PURE__ */ p("div", {
776
777
  className: "flex items-center gap-2 mb-4",
777
- children: [/* @__PURE__ */ d(ue, {
778
+ children: [/* @__PURE__ */ f(ue, {
778
779
  size: 18,
779
780
  className: "text-primary-500"
780
- }), /* @__PURE__ */ f("h2", {
781
+ }), /* @__PURE__ */ p("h2", {
781
782
  className: "text-sm font-medium text-text-primary",
782
783
  children: [
783
- l("notifications.inAppUsers", "In-App Notification Users"),
784
+ u("notifications.inAppUsers", "In-App Notification Users"),
784
785
  " ",
785
- /* @__PURE__ */ d("span", {
786
+ /* @__PURE__ */ f("span", {
786
787
  className: "text-status-error-text",
787
788
  children: "*"
788
789
  })
789
790
  ]
790
791
  })]
791
792
  }),
792
- /* @__PURE__ */ f("div", {
793
+ /* @__PURE__ */ p("div", {
793
794
  className: "relative mb-4",
794
- children: [/* @__PURE__ */ d("input", {
795
+ children: [/* @__PURE__ */ f("input", {
795
796
  type: "text",
796
797
  value: B,
797
798
  onChange: (e) => {
798
- V(e.target.value), h(e.target.value, {
799
- role: O || void 0,
800
- status: k || void 0
799
+ V(e.target.value), g(e.target.value, {
800
+ role: k || void 0,
801
+ status: A || void 0
801
802
  });
802
803
  },
803
- placeholder: l("notifications.searchUsersPlaceholder", "Search users by email or name..."),
804
+ placeholder: u("notifications.searchUsersPlaceholder", "Search users by email or name..."),
804
805
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
805
- }), Ve && /* @__PURE__ */ d("div", {
806
+ }), He && /* @__PURE__ */ f("div", {
806
807
  className: "absolute right-3 top-1/2 transform -translate-y-1/2",
807
- children: /* @__PURE__ */ d(c, {
808
+ children: /* @__PURE__ */ f(c, {
808
809
  size: 16,
809
810
  className: "animate-spin text-text-tertiary"
810
811
  })
811
812
  })]
812
813
  }),
813
- B && /* @__PURE__ */ d("div", {
814
+ B && /* @__PURE__ */ f("div", {
814
815
  className: "mb-4",
815
- children: g.length > 0 ? /* @__PURE__ */ d("div", {
816
+ children: _.length > 0 ? /* @__PURE__ */ f("div", {
816
817
  className: "max-h-48 overflow-y-auto border border-border-subtle rounded-lg",
817
- children: g.map((e) => {
818
+ children: _.map((e) => {
818
819
  let t = R.some((t) => t.id === e.id);
819
- return /* @__PURE__ */ f("button", {
820
+ return /* @__PURE__ */ p("button", {
820
821
  type: "button",
821
822
  onClick: () => {
822
823
  z(t ? (t) => t.filter((t) => t.id !== e.id) : (t) => [...t, e]);
823
824
  },
824
825
  className: `w-full flex items-center gap-3 p-3 text-left hover:bg-bg-canvas transition-colors ${t ? "bg-primary-50 dark:bg-primary-900/30" : ""}`,
825
826
  children: [
826
- /* @__PURE__ */ d(u, {
827
+ /* @__PURE__ */ f(d, {
827
828
  size: 16,
828
829
  className: t ? "text-primary-500" : "text-text-tertiary"
829
830
  }),
830
- /* @__PURE__ */ f("div", {
831
+ /* @__PURE__ */ p("div", {
831
832
  className: "flex-1",
832
- children: [/* @__PURE__ */ d("div", {
833
+ children: [/* @__PURE__ */ f("div", {
833
834
  className: "text-sm font-medium text-text-primary",
834
835
  children: e.name
835
- }), /* @__PURE__ */ d("div", {
836
+ }), /* @__PURE__ */ f("div", {
836
837
  className: "text-xs text-text-secondary",
837
838
  children: e.email
838
839
  })]
839
840
  }),
840
- t && /* @__PURE__ */ d(s, {
841
+ t && /* @__PURE__ */ f(s, {
841
842
  size: 16,
842
843
  className: "text-primary-500"
843
844
  })
844
845
  ]
845
846
  }, e.id);
846
847
  })
847
- }) : /* @__PURE__ */ d("div", {
848
+ }) : /* @__PURE__ */ f("div", {
848
849
  className: "text-center py-4 text-sm text-text-secondary",
849
- children: _ ? `${l("notifications.error", "Error")}: ${_}` : l("notifications.noUsersFound", "No users found")
850
+ children: v ? `${u("notifications.error", "Error")}: ${v}` : u("notifications.noUsersFound", "No users found")
850
851
  })
851
852
  }),
852
- R.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("h3", {
853
+ R.length > 0 && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("h3", {
853
854
  className: "text-sm font-medium text-text-secondary mb-2",
854
855
  children: [
855
- l("notifications.selectedUsers", "Selected Users"),
856
+ u("notifications.selectedUsers", "Selected Users"),
856
857
  " (",
857
858
  R.length,
858
859
  ")"
859
860
  ]
860
- }), /* @__PURE__ */ d("div", {
861
+ }), /* @__PURE__ */ f("div", {
861
862
  className: "flex flex-wrap gap-2",
862
- children: R.map((e) => /* @__PURE__ */ f("div", {
863
+ children: R.map((e) => /* @__PURE__ */ p("div", {
863
864
  className: "flex items-center gap-2 px-3 py-1.5 bg-primary-50 dark:bg-primary-900/30 border border-primary-200 dark:border-primary-800 rounded-full text-sm",
864
865
  children: [
865
- /* @__PURE__ */ d(u, {
866
+ /* @__PURE__ */ f(d, {
866
867
  size: 12,
867
868
  className: "text-primary-500"
868
869
  }),
869
- /* @__PURE__ */ d("span", {
870
+ /* @__PURE__ */ f("span", {
870
871
  className: "text-primary-700 dark:text-primary-300",
871
872
  children: e.name
872
873
  }),
873
- /* @__PURE__ */ d("button", {
874
+ /* @__PURE__ */ f("button", {
874
875
  type: "button",
875
876
  onClick: () => z((t) => t.filter((t) => t.id !== e.id)),
876
877
  className: "p-0.5 hover:bg-primary-100 dark:hover:bg-primary-800 rounded-full transition-colors",
877
- children: /* @__PURE__ */ d(be, {
878
+ children: /* @__PURE__ */ f(ye, {
878
879
  size: 12,
879
880
  className: "text-primary-500"
880
881
  })
@@ -884,77 +885,77 @@ function Oe() {
884
885
  })] })
885
886
  ]
886
887
  }),
887
- v === "template" && /* @__PURE__ */ f("div", {
888
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
888
+ y === "template" && /* @__PURE__ */ p("div", {
889
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
889
890
  children: [
890
- /* @__PURE__ */ f("h2", {
891
+ /* @__PURE__ */ p("h2", {
891
892
  className: "text-sm font-medium text-text-primary mb-4",
892
893
  children: [
893
- l("notifications.selectTemplate", "Select Template"),
894
+ u("notifications.selectTemplate", "Select Template"),
894
895
  " ",
895
- /* @__PURE__ */ d("span", {
896
+ /* @__PURE__ */ f("span", {
896
897
  className: "text-status-error-text",
897
898
  children: "*"
898
899
  })
899
900
  ]
900
901
  }),
901
- Re ? /* @__PURE__ */ d("div", {
902
+ ze ? /* @__PURE__ */ f("div", {
902
903
  className: "flex items-center justify-center py-8",
903
- children: /* @__PURE__ */ d(c, {
904
+ children: /* @__PURE__ */ f(c, {
904
905
  size: 24,
905
906
  className: "animate-spin text-text-tertiary"
906
907
  })
907
- }) : m.length === 0 ? /* @__PURE__ */ f("div", {
908
+ }) : h.length === 0 ? /* @__PURE__ */ p("div", {
908
909
  className: "text-center py-8",
909
910
  children: [
910
- /* @__PURE__ */ d(pe, {
911
+ /* @__PURE__ */ f(pe, {
911
912
  size: 32,
912
913
  className: "mx-auto text-text-tertiary mb-2"
913
914
  }),
914
- /* @__PURE__ */ d("p", {
915
+ /* @__PURE__ */ f("p", {
915
916
  className: "text-sm text-text-secondary",
916
- children: l("notifications.noTemplatesAvailable", "No templates available")
917
+ children: u("notifications.noTemplatesAvailable", "No templates available")
917
918
  }),
918
- /* @__PURE__ */ d("button", {
919
- onClick: () => ge("/notifications/templates/new"),
919
+ /* @__PURE__ */ f("button", {
920
+ onClick: () => l("/notifications/templates/new"),
920
921
  className: "mt-2 text-sm text-primary-600 hover:text-primary-700",
921
- children: l("notifications.createATemplate", "Create a template")
922
+ children: u("notifications.createATemplate", "Create a template")
922
923
  })
923
924
  ]
924
- }) : /* @__PURE__ */ f("select", {
925
+ }) : /* @__PURE__ */ p("select", {
925
926
  value: H,
926
927
  onChange: (e) => {
927
- at(e.target.value), ot({});
928
+ st(e.target.value), ct({});
928
929
  },
929
930
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500",
930
- children: [/* @__PURE__ */ d("option", {
931
+ children: [/* @__PURE__ */ f("option", {
931
932
  value: "",
932
- children: l("notifications.selectATemplate", "Select a template...")
933
- }), m.filter((e) => e.enabled).map((e) => /* @__PURE__ */ f("option", {
933
+ children: u("notifications.selectATemplate", "Select a template...")
934
+ }), h.filter((e) => e.enabled).map((e) => /* @__PURE__ */ p("option", {
934
935
  value: e.slug,
935
936
  children: [
936
937
  e.name,
937
938
  " (",
938
- l(`notifications.type.${e.type}`, e.type),
939
+ u(`notifications.type.${e.type}`, e.type),
939
940
  ")"
940
941
  ]
941
942
  }, e.id))]
942
943
  }),
943
- X && dt.length > 0 && /* @__PURE__ */ f("div", {
944
+ X && pt.length > 0 && /* @__PURE__ */ p("div", {
944
945
  className: "mt-4 space-y-3",
945
- children: [/* @__PURE__ */ d("h3", {
946
+ children: [/* @__PURE__ */ f("h3", {
946
947
  className: "text-sm font-medium text-text-secondary",
947
- children: l("notifications.templateVariables", "Template Variables")
948
- }), dt.map((e) => /* @__PURE__ */ f("div", { children: [
949
- /* @__PURE__ */ f("label", {
948
+ children: u("notifications.templateVariables", "Template Variables")
949
+ }), pt.map((e) => /* @__PURE__ */ p("div", { children: [
950
+ /* @__PURE__ */ p("label", {
950
951
  className: "block text-xs text-text-secondary mb-1",
951
952
  children: [
952
953
  e.key,
953
- e.required && /* @__PURE__ */ d("span", {
954
+ e.required && /* @__PURE__ */ f("span", {
954
955
  className: "text-status-error-text ml-0.5",
955
956
  children: "*"
956
957
  }),
957
- /* @__PURE__ */ f("span", {
958
+ /* @__PURE__ */ p("span", {
958
959
  className: "text-text-tertiary ml-1",
959
960
  children: [
960
961
  "(",
@@ -964,159 +965,159 @@ function Oe() {
964
965
  })
965
966
  ]
966
967
  }),
967
- e.description && /* @__PURE__ */ d("p", {
968
+ e.description && /* @__PURE__ */ f("p", {
968
969
  className: "text-xs text-text-tertiary mb-1",
969
970
  children: e.description
970
971
  }),
971
- /* @__PURE__ */ d("input", {
972
+ /* @__PURE__ */ f("input", {
972
973
  type: "text",
973
974
  value: U[e.key] || "",
974
- onChange: (t) => ot((n) => ({
975
+ onChange: (t) => ct((n) => ({
975
976
  ...n,
976
977
  [e.key]: t.target.value
977
978
  })),
978
- placeholder: e.defaultValue || `${l("notifications.enterVariablePrefix", "Enter")} ${e.key}...`,
979
+ placeholder: e.defaultValue || `${u("notifications.enterVariablePrefix", "Enter")} ${e.key}...`,
979
980
  className: "w-full px-3 py-2 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
980
981
  })
981
982
  ] }, e.key))]
982
983
  })
983
984
  ]
984
985
  }),
985
- v === "compose" && /* @__PURE__ */ f(Se, { children: [
986
- /* @__PURE__ */ d("div", {
987
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
988
- children: /* @__PURE__ */ f("div", {
986
+ y === "compose" && /* @__PURE__ */ p(xe, { children: [
987
+ /* @__PURE__ */ f("div", {
988
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
989
+ children: /* @__PURE__ */ p("div", {
989
990
  className: "grid grid-cols-2 gap-4",
990
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
991
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
991
992
  className: "block text-sm font-medium text-text-primary mb-2",
992
- children: l("notifications.typeLabel", "Type")
993
- }), /* @__PURE__ */ d("select", {
994
- value: b,
995
- onChange: (e) => Ge(e.target.value),
993
+ children: u("notifications.typeLabel", "Type")
994
+ }), /* @__PURE__ */ f("select", {
995
+ value: x,
996
+ onChange: (e) => Ke(e.target.value),
996
997
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500",
997
- children: we.map((e) => /* @__PURE__ */ d("option", {
998
+ children: Te.map((e) => /* @__PURE__ */ f("option", {
998
999
  value: e.value,
999
- children: l(`notifications.type.${e.value}`, e.label)
1000
+ children: u(`notifications.type.${e.value}`, e.label)
1000
1001
  }, e.value))
1001
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
1002
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
1002
1003
  className: "block text-sm font-medium text-text-primary mb-2",
1003
- children: l("notifications.priorityLabel", "Priority")
1004
- }), /* @__PURE__ */ d("select", {
1005
- value: x,
1006
- onChange: (e) => Ke(e.target.value),
1004
+ children: u("notifications.priorityLabel", "Priority")
1005
+ }), /* @__PURE__ */ f("select", {
1006
+ value: S,
1007
+ onChange: (e) => qe(e.target.value),
1007
1008
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500",
1008
- children: Te.map((e) => /* @__PURE__ */ d("option", {
1009
+ children: Ee.map((e) => /* @__PURE__ */ f("option", {
1009
1010
  value: e.value,
1010
- children: l(`notifications.priority.${e.value}`, e.label)
1011
+ children: u(`notifications.priority.${e.value}`, e.label)
1011
1012
  }, e.value))
1012
1013
  })] })]
1013
1014
  })
1014
1015
  }),
1015
- y === "EMAIL" && /* @__PURE__ */ f("div", {
1016
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
1017
- children: [/* @__PURE__ */ f("label", {
1016
+ b === "EMAIL" && /* @__PURE__ */ p("div", {
1017
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
1018
+ children: [/* @__PURE__ */ p("label", {
1018
1019
  className: "block text-sm font-medium text-text-primary mb-2",
1019
1020
  children: [
1020
- l("notifications.subjectLabel", "Subject"),
1021
+ u("notifications.subjectLabel", "Subject"),
1021
1022
  " ",
1022
- /* @__PURE__ */ d("span", {
1023
+ /* @__PURE__ */ f("span", {
1023
1024
  className: "text-status-error-text",
1024
1025
  children: "*"
1025
1026
  })
1026
1027
  ]
1027
- }), /* @__PURE__ */ d("input", {
1028
+ }), /* @__PURE__ */ f("input", {
1028
1029
  type: "text",
1029
- value: A,
1030
- onChange: (e) => Ze(e.target.value),
1031
- placeholder: l("notifications.enterSubjectPlaceholder", "Enter email subject..."),
1030
+ value: j,
1031
+ onChange: (e) => Qe(e.target.value),
1032
+ placeholder: u("notifications.enterSubjectPlaceholder", "Enter email subject..."),
1032
1033
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
1033
1034
  })]
1034
1035
  }),
1035
- /* @__PURE__ */ f("div", {
1036
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
1036
+ /* @__PURE__ */ p("div", {
1037
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
1037
1038
  children: [
1038
- /* @__PURE__ */ f("div", {
1039
+ /* @__PURE__ */ p("div", {
1039
1040
  className: "flex items-center justify-between mb-2",
1040
- children: [/* @__PURE__ */ f("label", {
1041
+ children: [/* @__PURE__ */ p("label", {
1041
1042
  className: "block text-sm font-medium text-text-primary",
1042
1043
  children: [
1043
- l("notifications.messageLabel", "Message"),
1044
+ u("notifications.messageLabel", "Message"),
1044
1045
  " ",
1045
- /* @__PURE__ */ d("span", {
1046
+ /* @__PURE__ */ f("span", {
1046
1047
  className: "text-status-error-text",
1047
1048
  children: "*"
1048
1049
  })
1049
1050
  ]
1050
- }), y === "EMAIL" && /* @__PURE__ */ f("label", {
1051
+ }), b === "EMAIL" && /* @__PURE__ */ p("label", {
1051
1052
  className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
1052
- children: [/* @__PURE__ */ d("input", {
1053
+ children: [/* @__PURE__ */ f("input", {
1053
1054
  type: "checkbox",
1054
- checked: tt,
1055
- onChange: (e) => nt(e.target.checked),
1055
+ checked: nt,
1056
+ onChange: (e) => rt(e.target.checked),
1056
1057
  className: "w-4 h-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
1057
- }), l("notifications.includeHtmlVersion", "Include HTML version")]
1058
+ }), u("notifications.includeHtmlVersion", "Include HTML version")]
1058
1059
  })]
1059
1060
  }),
1060
- /* @__PURE__ */ d("textarea", {
1061
+ /* @__PURE__ */ f("textarea", {
1061
1062
  rows: 6,
1062
- value: j,
1063
- onChange: (e) => Qe(e.target.value),
1064
- placeholder: l("notifications.enterMessagePlaceholder", "Enter your message..."),
1063
+ value: M,
1064
+ onChange: (e) => $e(e.target.value),
1065
+ placeholder: u("notifications.enterMessagePlaceholder", "Enter your message..."),
1065
1066
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 resize-none"
1066
1067
  }),
1067
- y === "EMAIL" && tt && /* @__PURE__ */ f("div", {
1068
+ b === "EMAIL" && nt && /* @__PURE__ */ p("div", {
1068
1069
  className: "mt-4",
1069
- children: [/* @__PURE__ */ d("label", {
1070
+ children: [/* @__PURE__ */ f("label", {
1070
1071
  className: "block text-sm font-medium text-text-secondary mb-2",
1071
- children: l("notifications.htmlContent", "HTML Content")
1072
- }), /* @__PURE__ */ d("textarea", {
1072
+ children: u("notifications.htmlContent", "HTML Content")
1073
+ }), /* @__PURE__ */ f("textarea", {
1073
1074
  rows: 8,
1074
- value: $e,
1075
- onChange: (e) => et(e.target.value),
1076
- placeholder: l("notifications.htmlPlaceholder", "<html>...</html>"),
1075
+ value: et,
1076
+ onChange: (e) => tt(e.target.value),
1077
+ placeholder: u("notifications.htmlPlaceholder", "<html>...</html>"),
1077
1078
  className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 resize-none font-mono"
1078
1079
  })]
1079
1080
  })
1080
1081
  ]
1081
1082
  })
1082
1083
  ] }),
1083
- /* @__PURE__ */ f("div", {
1084
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
1085
- children: [/* @__PURE__ */ f("div", {
1084
+ /* @__PURE__ */ p("div", {
1085
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
1086
+ children: [/* @__PURE__ */ p("div", {
1086
1087
  className: "mb-4 flex items-center gap-2",
1087
- children: [/* @__PURE__ */ d(he, {
1088
+ children: [/* @__PURE__ */ f(he, {
1088
1089
  size: 18,
1089
1090
  className: "text-text-secondary"
1090
- }), /* @__PURE__ */ d("h2", {
1091
+ }), /* @__PURE__ */ f("h2", {
1091
1092
  className: "text-sm font-medium text-text-primary",
1092
- children: l("notifications.actions", "Actions")
1093
+ children: u("notifications.actions", "Actions")
1093
1094
  })]
1094
- }), /* @__PURE__ */ f("div", {
1095
+ }), /* @__PURE__ */ p("div", {
1095
1096
  className: "space-y-3",
1096
- children: [F.map((e, t) => /* @__PURE__ */ f("div", {
1097
+ children: [F.map((e, t) => /* @__PURE__ */ p("div", {
1097
1098
  className: "grid gap-3 rounded-lg border border-border-subtle bg-bg-canvas p-3 md:grid-cols-[1fr,1fr,160px,auto]",
1098
1099
  children: [
1099
- /* @__PURE__ */ d("input", {
1100
+ /* @__PURE__ */ f("input", {
1100
1101
  type: "text",
1101
1102
  value: e.label,
1102
1103
  onChange: (e) => I((n) => n.map((n, r) => r === t ? {
1103
1104
  ...n,
1104
1105
  label: e.target.value
1105
1106
  } : n)),
1106
- placeholder: l("notifications.actionLabel", "Action label"),
1107
+ placeholder: u("notifications.actionLabel", "Action label"),
1107
1108
  className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
1108
1109
  }),
1109
- /* @__PURE__ */ d("input", {
1110
+ /* @__PURE__ */ f("input", {
1110
1111
  type: "url",
1111
1112
  value: e.url,
1112
1113
  onChange: (e) => I((n) => n.map((n, r) => r === t ? {
1113
1114
  ...n,
1114
1115
  url: e.target.value
1115
1116
  } : n)),
1116
- placeholder: l("notifications.actionUrl", "https://..."),
1117
+ placeholder: u("notifications.actionUrl", "https://..."),
1117
1118
  className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
1118
1119
  }),
1119
- /* @__PURE__ */ f("select", {
1120
+ /* @__PURE__ */ p("select", {
1120
1121
  value: e.style,
1121
1122
  onChange: (e) => I((n) => n.map((n, r) => r === t ? {
1122
1123
  ...n,
@@ -1124,21 +1125,21 @@ function Oe() {
1124
1125
  } : n)),
1125
1126
  className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary",
1126
1127
  children: [
1127
- /* @__PURE__ */ d("option", {
1128
+ /* @__PURE__ */ f("option", {
1128
1129
  value: "primary",
1129
1130
  children: "Primary"
1130
1131
  }),
1131
- /* @__PURE__ */ d("option", {
1132
+ /* @__PURE__ */ f("option", {
1132
1133
  value: "secondary",
1133
1134
  children: "Secondary"
1134
1135
  }),
1135
- /* @__PURE__ */ d("option", {
1136
+ /* @__PURE__ */ f("option", {
1136
1137
  value: "danger",
1137
1138
  children: "Danger"
1138
1139
  })
1139
1140
  ]
1140
1141
  }),
1141
- /* @__PURE__ */ d("button", {
1142
+ /* @__PURE__ */ f("button", {
1142
1143
  type: "button",
1143
1144
  onClick: () => I((e) => e.length === 1 ? [{
1144
1145
  id: "primary-action",
@@ -1147,10 +1148,10 @@ function Oe() {
1147
1148
  style: "primary"
1148
1149
  }] : e.filter((e, n) => n !== t)),
1149
1150
  className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
1150
- children: l("notifications.remove", "Remove")
1151
+ children: u("notifications.remove", "Remove")
1151
1152
  })
1152
1153
  ]
1153
- }, e.id)), /* @__PURE__ */ d("button", {
1154
+ }, e.id)), /* @__PURE__ */ f("button", {
1154
1155
  type: "button",
1155
1156
  onClick: () => I((e) => [...e, {
1156
1157
  id: `action-${e.length + 1}`,
@@ -1159,47 +1160,47 @@ function Oe() {
1159
1160
  style: "secondary"
1160
1161
  }]),
1161
1162
  className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
1162
- children: l("notifications.addAction", "Add action")
1163
+ children: u("notifications.addAction", "Add action")
1163
1164
  })]
1164
1165
  })]
1165
1166
  }),
1166
- /* @__PURE__ */ f("div", {
1167
- className: "bg-bg-surface rounded-lg border border-border-subtle p-4",
1168
- children: [/* @__PURE__ */ f("div", {
1167
+ /* @__PURE__ */ p("div", {
1168
+ className: "bg-bg-surface rounded-lg border border-border-seam p-4",
1169
+ children: [/* @__PURE__ */ p("div", {
1169
1170
  className: "mb-4 flex items-center gap-2",
1170
- children: [/* @__PURE__ */ d(me, {
1171
+ children: [/* @__PURE__ */ f(me, {
1171
1172
  size: 18,
1172
1173
  className: "text-text-secondary"
1173
- }), /* @__PURE__ */ d("h2", {
1174
+ }), /* @__PURE__ */ f("h2", {
1174
1175
  className: "text-sm font-medium text-text-primary",
1175
- children: l("notifications.media", "Media")
1176
+ children: u("notifications.media", "Media")
1176
1177
  })]
1177
- }), /* @__PURE__ */ f("div", {
1178
+ }), /* @__PURE__ */ p("div", {
1178
1179
  className: "space-y-3",
1179
- children: [N.map((e, t) => /* @__PURE__ */ f("div", {
1180
+ children: [at.map((e, t) => /* @__PURE__ */ p("div", {
1180
1181
  className: "grid gap-3 rounded-lg border border-border-subtle bg-bg-canvas p-3 md:grid-cols-[1fr,220px,140px,auto]",
1181
1182
  children: [
1182
- /* @__PURE__ */ d("input", {
1183
+ /* @__PURE__ */ f("input", {
1183
1184
  type: "url",
1184
1185
  value: e.url,
1185
1186
  onChange: (e) => P((n) => n.map((n, r) => r === t ? {
1186
1187
  ...n,
1187
1188
  url: e.target.value
1188
1189
  } : n)),
1189
- placeholder: l("notifications.mediaUrl", "Media URL"),
1190
+ placeholder: u("notifications.mediaUrl", "Media URL"),
1190
1191
  className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
1191
1192
  }),
1192
- /* @__PURE__ */ d("input", {
1193
+ /* @__PURE__ */ f("input", {
1193
1194
  type: "text",
1194
1195
  value: e.label,
1195
1196
  onChange: (e) => P((n) => n.map((n, r) => r === t ? {
1196
1197
  ...n,
1197
1198
  label: e.target.value
1198
1199
  } : n)),
1199
- placeholder: l("notifications.mediaLabel", "Caption / label"),
1200
+ placeholder: u("notifications.mediaLabel", "Caption / label"),
1200
1201
  className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
1201
1202
  }),
1202
- /* @__PURE__ */ f("select", {
1203
+ /* @__PURE__ */ p("select", {
1203
1204
  value: e.kind,
1204
1205
  onChange: (e) => P((n) => n.map((n, r) => r === t ? {
1205
1206
  ...n,
@@ -1207,21 +1208,21 @@ function Oe() {
1207
1208
  } : n)),
1208
1209
  className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary",
1209
1210
  children: [
1210
- /* @__PURE__ */ d("option", {
1211
+ /* @__PURE__ */ f("option", {
1211
1212
  value: "image",
1212
1213
  children: "Image"
1213
1214
  }),
1214
- /* @__PURE__ */ d("option", {
1215
+ /* @__PURE__ */ f("option", {
1215
1216
  value: "video",
1216
1217
  children: "Video"
1217
1218
  }),
1218
- /* @__PURE__ */ d("option", {
1219
+ /* @__PURE__ */ f("option", {
1219
1220
  value: "file",
1220
1221
  children: "File"
1221
1222
  })
1222
1223
  ]
1223
1224
  }),
1224
- /* @__PURE__ */ d("button", {
1225
+ /* @__PURE__ */ f("button", {
1225
1226
  type: "button",
1226
1227
  onClick: () => P((e) => e.length === 1 ? [{
1227
1228
  url: "",
@@ -1229,10 +1230,10 @@ function Oe() {
1229
1230
  kind: "image"
1230
1231
  }] : e.filter((e, n) => n !== t)),
1231
1232
  className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
1232
- children: l("notifications.remove", "Remove")
1233
+ children: u("notifications.remove", "Remove")
1233
1234
  })
1234
1235
  ]
1235
- }, `${e.kind}-${t}`)), /* @__PURE__ */ d("button", {
1236
+ }, `${e.kind}-${t}`)), /* @__PURE__ */ f("button", {
1236
1237
  type: "button",
1237
1238
  onClick: () => P((e) => [...e, {
1238
1239
  url: "",
@@ -1240,130 +1241,131 @@ function Oe() {
1240
1241
  kind: "image"
1241
1242
  }]),
1242
1243
  className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
1243
- children: l("notifications.addMedia", "Add media")
1244
+ children: u("notifications.addMedia", "Add media")
1244
1245
  })]
1245
1246
  })]
1246
1247
  })
1247
1248
  ]
1248
- }), K && /* @__PURE__ */ d("div", {
1249
+ }), K && /* @__PURE__ */ f("div", {
1249
1250
  className: "w-96 flex-shrink-0",
1250
- children: /* @__PURE__ */ f("div", {
1251
- className: "sticky top-24 bg-bg-surface rounded-lg border border-border-subtle overflow-hidden",
1252
- children: [/* @__PURE__ */ d("div", {
1253
- className: "px-4 py-3 bg-bg-canvas border-b border-border-subtle",
1254
- children: /* @__PURE__ */ d("h3", {
1251
+ children: /* @__PURE__ */ p(Ce, {
1252
+ treatment: "plain",
1253
+ className: "sticky top-24 border-border-seam p-0 overflow-hidden",
1254
+ children: [/* @__PURE__ */ f("div", {
1255
+ className: "px-4 py-3 bg-accent-wash border-b border-border-seam",
1256
+ children: /* @__PURE__ */ f("h3", {
1255
1257
  className: "text-sm font-medium text-text-primary",
1256
- children: l("notifications.preview", "Preview")
1258
+ children: u("notifications.preview", "Preview")
1257
1259
  })
1258
- }), /* @__PURE__ */ f("div", {
1260
+ }), /* @__PURE__ */ p("div", {
1259
1261
  className: "p-4",
1260
1262
  children: [
1261
- /* @__PURE__ */ f("div", {
1263
+ /* @__PURE__ */ p("div", {
1262
1264
  className: "flex items-center gap-2 mb-4",
1263
1265
  children: [
1264
- /* @__PURE__ */ d("span", {
1266
+ /* @__PURE__ */ f("span", {
1265
1267
  className: "px-2 py-1 text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 rounded",
1266
- children: l(`notifications.channel.${y}`, y)
1268
+ children: u(`notifications.channel.${b}`, b)
1267
1269
  }),
1268
- /* @__PURE__ */ d("span", {
1270
+ /* @__PURE__ */ f("span", {
1269
1271
  className: "px-2 py-1 text-xs font-medium bg-bg-sunken text-text-secondary rounded",
1270
- children: l(`notifications.type.${b}`, b)
1272
+ children: u(`notifications.type.${x}`, x)
1271
1273
  }),
1272
- /* @__PURE__ */ d("span", {
1273
- className: `px-2 py-1 text-xs font-medium rounded ${Te.find((e) => e.value === x)?.color || ""}`,
1274
- children: l(`notifications.priority.${x}`, x)
1274
+ /* @__PURE__ */ f("span", {
1275
+ className: `px-2 py-1 text-xs font-medium rounded ${Ee.find((e) => e.value === S)?.color || ""}`,
1276
+ children: u(`notifications.priority.${S}`, S)
1275
1277
  })
1276
1278
  ]
1277
1279
  }),
1278
- /* @__PURE__ */ f("div", {
1280
+ /* @__PURE__ */ p("div", {
1279
1281
  className: "mb-4",
1280
- children: [/* @__PURE__ */ d("p", {
1282
+ children: [/* @__PURE__ */ f("p", {
1281
1283
  className: "text-xs text-text-secondary mb-1",
1282
- children: l("notifications.recipients", "Recipients")
1283
- }), S.length === 0 ? C === "directory" ? /* @__PURE__ */ d("p", {
1284
+ children: u("notifications.recipients", "Recipients")
1285
+ }), C.length === 0 ? w === "directory" ? /* @__PURE__ */ f("p", {
1284
1286
  className: "text-sm text-text-primary",
1285
- children: D ? l("notifications.allMatchingUsers", "All matching directory users") : `${T.length} ${l("notifications.recipientCount", "recipient")}${T.length === 1 ? "" : "s"}`
1286
- }) : /* @__PURE__ */ d("p", {
1287
- className: "text-sm text-text-tertiary italic",
1288
- children: l("notifications.noRecipientsSelected", "No recipients selected")
1287
+ children: O ? u("notifications.allMatchingUsers", "All matching directory users") : `${E.length} ${u("notifications.recipientCount", "recipient")}${E.length === 1 ? "" : "s"}`
1289
1288
  }) : /* @__PURE__ */ f("p", {
1289
+ className: "text-sm text-text-tertiary italic",
1290
+ children: u("notifications.noRecipientsSelected", "No recipients selected")
1291
+ }) : /* @__PURE__ */ p("p", {
1290
1292
  className: "text-sm text-text-primary",
1291
1293
  children: [
1292
- S.length,
1294
+ C.length,
1293
1295
  " ",
1294
- l("notifications.recipientCount", "recipient"),
1295
- S.length === 1 ? "" : "s"
1296
+ u("notifications.recipientCount", "recipient"),
1297
+ C.length === 1 ? "" : "s"
1296
1298
  ]
1297
1299
  })]
1298
1300
  }),
1299
- y === "EMAIL" && mt && /* @__PURE__ */ f("div", {
1301
+ b === "EMAIL" && gt && /* @__PURE__ */ p("div", {
1300
1302
  className: "mb-4",
1301
- children: [/* @__PURE__ */ d("p", {
1303
+ children: [/* @__PURE__ */ f("p", {
1302
1304
  className: "text-xs text-text-secondary mb-1",
1303
- children: l("notifications.subjectLabel", "Subject")
1304
- }), /* @__PURE__ */ d("p", {
1305
+ children: u("notifications.subjectLabel", "Subject")
1306
+ }), /* @__PURE__ */ f("p", {
1305
1307
  className: "text-sm font-medium text-text-primary",
1306
- children: mt
1308
+ children: gt
1307
1309
  })]
1308
1310
  }),
1309
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
1311
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
1310
1312
  className: "text-xs text-text-secondary mb-1",
1311
- children: l("notifications.messageLabel", "Message")
1312
- }), pt ? /* @__PURE__ */ d("div", {
1313
+ children: u("notifications.messageLabel", "Message")
1314
+ }), ht ? /* @__PURE__ */ f("div", {
1313
1315
  className: "p-3 bg-bg-canvas rounded-lg",
1314
- children: /* @__PURE__ */ d("p", {
1316
+ children: /* @__PURE__ */ f("p", {
1315
1317
  className: "text-sm text-text-secondary whitespace-pre-wrap",
1316
- children: pt
1318
+ children: ht
1317
1319
  })
1318
- }) : /* @__PURE__ */ d("p", {
1320
+ }) : /* @__PURE__ */ f("p", {
1319
1321
  className: "text-sm text-text-tertiary italic",
1320
- children: l("notifications.noMessageContent", "No message content")
1322
+ children: u("notifications.noMessageContent", "No message content")
1321
1323
  })] }),
1322
- M && /* @__PURE__ */ f("div", {
1324
+ N && /* @__PURE__ */ p("div", {
1323
1325
  className: "mt-4",
1324
- children: [/* @__PURE__ */ d("p", {
1326
+ children: [/* @__PURE__ */ f("p", {
1325
1327
  className: "text-xs text-text-secondary mb-1",
1326
- children: l("notifications.topic", "Topic")
1327
- }), /* @__PURE__ */ d("p", {
1328
+ children: u("notifications.topic", "Topic")
1329
+ }), /* @__PURE__ */ f("p", {
1328
1330
  className: "text-sm text-text-primary",
1329
- children: He.find((e) => e.id === M)?.name || M
1331
+ children: Ue.find((e) => e.id === N)?.name || N
1330
1332
  })]
1331
1333
  }),
1332
- Q.length > 0 && /* @__PURE__ */ f("div", {
1334
+ Q.length > 0 && /* @__PURE__ */ p("div", {
1333
1335
  className: "mt-4",
1334
- children: [/* @__PURE__ */ d("p", {
1336
+ children: [/* @__PURE__ */ f("p", {
1335
1337
  className: "text-xs text-text-secondary mb-1",
1336
- children: l("notifications.actions", "Actions")
1337
- }), /* @__PURE__ */ d("div", {
1338
+ children: u("notifications.actions", "Actions")
1339
+ }), /* @__PURE__ */ f("div", {
1338
1340
  className: "flex flex-wrap gap-2",
1339
- children: Q.map((e) => /* @__PURE__ */ d("span", {
1341
+ children: Q.map((e) => /* @__PURE__ */ f("span", {
1340
1342
  className: "rounded-full bg-bg-sunken px-2 py-1 text-xs text-secondary",
1341
1343
  children: e.label
1342
1344
  }, e.id))
1343
1345
  })]
1344
1346
  }),
1345
- $.length > 0 && /* @__PURE__ */ f("div", {
1347
+ $.length > 0 && /* @__PURE__ */ p("div", {
1346
1348
  className: "mt-4 space-y-2",
1347
- children: [/* @__PURE__ */ d("p", {
1349
+ children: [/* @__PURE__ */ f("p", {
1348
1350
  className: "text-xs text-text-secondary",
1349
- children: l("notifications.media", "Media")
1350
- }), $.map((e) => /* @__PURE__ */ d("div", {
1351
+ children: u("notifications.media", "Media")
1352
+ }), $.map((e) => /* @__PURE__ */ f("div", {
1351
1353
  className: "rounded-lg border border-border-subtle bg-bg-canvas p-2 text-xs text-text-secondary",
1352
1354
  children: e.label || e.url
1353
1355
  }, e.url))]
1354
1356
  }),
1355
- v === "template" && X && /* @__PURE__ */ f("div", {
1357
+ y === "template" && X && /* @__PURE__ */ p("div", {
1356
1358
  className: "mt-4 pt-4 border-t border-border-subtle",
1357
1359
  children: [
1358
- /* @__PURE__ */ d("p", {
1360
+ /* @__PURE__ */ f("p", {
1359
1361
  className: "text-xs text-text-secondary mb-1",
1360
- children: l("notifications.usingTemplate", "Using Template")
1362
+ children: u("notifications.usingTemplate", "Using Template")
1361
1363
  }),
1362
- /* @__PURE__ */ d("p", {
1364
+ /* @__PURE__ */ f("p", {
1363
1365
  className: "text-sm font-medium text-text-primary",
1364
1366
  children: X.name
1365
1367
  }),
1366
- /* @__PURE__ */ d("p", {
1368
+ /* @__PURE__ */ f("p", {
1367
1369
  className: "text-xs text-text-secondary font-mono",
1368
1370
  children: X.slug
1369
1371
  })
@@ -1378,6 +1380,6 @@ function Oe() {
1378
1380
  });
1379
1381
  }
1380
1382
  //#endregion
1381
- export { Oe as CreateNotificationPage };
1383
+ export { ke as CreateNotificationPage };
1382
1384
 
1383
1385
  //# sourceMappingURL=CreateNotificationPage.js.map