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