@burdenoff/microfe-notification 2026.624.1 → 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.
- package/dist/components/FeatureDisabledPage.js +1 -1
- package/dist/components/FeatureDisabledPage.js.map +1 -1
- package/dist/components/NotificationBell.js +1 -1
- package/dist/components/NotificationBell.js.map +1 -1
- package/dist/components/NotificationCard.js +4 -3
- package/dist/components/NotificationCard.js.map +1 -1
- package/dist/components/NotificationPanel.js +4 -4
- package/dist/components/NotificationPanel.js.map +1 -1
- package/dist/pages/CreateNotificationPage.js +473 -471
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +86 -83
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +117 -111
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +43 -40
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationLandingPage.js +1 -1
- package/dist/pages/NotificationLandingPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.js +74 -74
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.js +97 -95
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +58 -56
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +309 -308
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { Fragment 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 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
|
|
18
|
+
var we = [
|
|
18
19
|
{
|
|
19
20
|
value: "EMAIL",
|
|
20
21
|
label: "Email",
|
|
21
|
-
icon:
|
|
22
|
+
icon: l,
|
|
22
23
|
description: "Send via email"
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
value: "SMS",
|
|
26
27
|
label: "SMS",
|
|
27
|
-
icon:
|
|
28
|
+
icon: u,
|
|
28
29
|
description: "Send text message"
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
value: "PUSH",
|
|
32
33
|
label: "Push",
|
|
33
|
-
icon:
|
|
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:
|
|
46
|
+
icon: u,
|
|
46
47
|
description: "Send via WhatsApp"
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
value: "SLACK",
|
|
50
51
|
label: "Slack",
|
|
51
|
-
icon:
|
|
52
|
+
icon: u,
|
|
52
53
|
description: "Send to Slack"
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
value: "TEAMS",
|
|
56
57
|
label: "Teams",
|
|
57
|
-
icon:
|
|
58
|
+
icon: u,
|
|
58
59
|
description: "Send to Microsoft Teams"
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
62
|
value: "TELEGRAM",
|
|
62
63
|
label: "Telegram",
|
|
63
|
-
icon:
|
|
64
|
+
icon: u,
|
|
64
65
|
description: "Send to Telegram"
|
|
65
66
|
},
|
|
66
67
|
{
|
|
67
68
|
value: "DISCORD",
|
|
68
69
|
label: "Discord",
|
|
69
|
-
icon:
|
|
70
|
+
icon: u,
|
|
70
71
|
description: "Send to Discord"
|
|
71
72
|
}
|
|
72
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
|
166
|
-
let
|
|
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,
|
|
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]),
|
|
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]),
|
|
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
|
-
},
|
|
199
|
-
|
|
199
|
+
}, ht = a(() => y === "template" && X ? mt(X.bodyTemplate || "") : M, [
|
|
200
|
+
y,
|
|
200
201
|
X,
|
|
201
202
|
U,
|
|
202
|
-
|
|
203
|
-
]),
|
|
204
|
-
|
|
203
|
+
M
|
|
204
|
+
]), gt = a(() => y === "template" && X?.subject ? mt(X.subject) : j, [
|
|
205
|
+
y,
|
|
205
206
|
X,
|
|
206
207
|
U,
|
|
207
|
-
|
|
208
|
-
]),
|
|
208
|
+
j
|
|
209
|
+
]), _t = [
|
|
209
210
|
"EMAIL",
|
|
210
211
|
"SMS",
|
|
211
212
|
"WHATSAPP"
|
|
212
|
-
].includes(
|
|
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(() =>
|
|
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
|
-
})), [
|
|
222
|
-
if (
|
|
222
|
+
})), [at]);
|
|
223
|
+
if (ke) return /* @__PURE__ */ f("div", {
|
|
223
224
|
className: "flex h-64 items-center justify-center",
|
|
224
|
-
children: /* @__PURE__ */
|
|
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
|
|
227
|
-
if (!
|
|
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:
|
|
230
|
+
children: u("notifications.noPermissionCreateAndSend", "You don't have permission to create and send notifications.")
|
|
230
231
|
});
|
|
231
|
-
let
|
|
232
|
+
let bt = (e) => b === "EMAIL" ? {
|
|
232
233
|
userId: e.id,
|
|
233
234
|
email: e.email
|
|
234
|
-
} :
|
|
235
|
+
} : b === "SMS" ? e.phoneNumber ? {
|
|
235
236
|
userId: e.id,
|
|
236
237
|
phoneNumber: e.phoneNumber
|
|
237
|
-
} : null :
|
|
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
|
-
},
|
|
244
|
+
}, xt = async () => (O ? await Ve({
|
|
244
245
|
search: B,
|
|
245
|
-
role:
|
|
246
|
-
status:
|
|
247
|
-
}) :
|
|
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
|
-
})),
|
|
257
|
-
if (q(null),
|
|
258
|
-
if (
|
|
259
|
-
if (L && R.length === 0) return q(
|
|
260
|
-
if (
|
|
261
|
-
if (
|
|
262
|
-
if (!
|
|
263
|
-
if (
|
|
264
|
-
} else if (!H) return q(
|
|
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
|
-
},
|
|
267
|
-
if (ee("light"),
|
|
268
|
-
|
|
267
|
+
}, wt = async () => {
|
|
268
|
+
if (ee("light"), Ct()) {
|
|
269
|
+
Le(), Re(), Y(!1);
|
|
269
270
|
try {
|
|
270
|
-
let e =
|
|
271
|
-
|
|
272
|
-
mode:
|
|
273
|
-
channel:
|
|
274
|
-
type:
|
|
275
|
-
priority:
|
|
276
|
-
recipientSource:
|
|
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(
|
|
288
|
+
q(u("notifications.noDeliverableRecipients", "No valid recipients matched the selected channel and filters"));
|
|
288
289
|
return;
|
|
289
290
|
}
|
|
290
|
-
if (
|
|
291
|
-
let t = await
|
|
291
|
+
if (y === "template") {
|
|
292
|
+
let t = await Pe({
|
|
292
293
|
templateSlug: H,
|
|
293
294
|
variables: U,
|
|
294
295
|
recipients: e,
|
|
295
|
-
platform:
|
|
296
|
-
priority:
|
|
297
|
-
topicId:
|
|
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:
|
|
314
|
-
channel:
|
|
314
|
+
body: M,
|
|
315
|
+
channel: b,
|
|
315
316
|
recipient: e,
|
|
316
|
-
subject:
|
|
317
|
-
htmlBody:
|
|
318
|
-
type:
|
|
319
|
-
priority:
|
|
320
|
-
topicId:
|
|
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
|
|
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
|
|
335
|
+
} else (await Me({
|
|
335
336
|
notification: t[0],
|
|
336
|
-
platform:
|
|
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
|
-
|
|
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
|
-
},
|
|
352
|
-
|
|
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
|
-
}]),
|
|
362
|
-
},
|
|
363
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
367
|
-
className: "sticky top-0 z-10 flex items-center justify-between px-6 py-4 bg-bg-surface border-b border-border-
|
|
368
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
371
|
-
onClick: () =>
|
|
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__ */
|
|
374
|
-
}), /* @__PURE__ */
|
|
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:
|
|
377
|
-
}), /* @__PURE__ */
|
|
377
|
+
children: u("notifications.sendTitle", "Send Notification")
|
|
378
|
+
}), /* @__PURE__ */ f("p", {
|
|
378
379
|
className: "text-sm text-text-secondary",
|
|
379
|
-
children:
|
|
380
|
+
children: u("notifications.sendSubtitle", "Compose and send notifications to users")
|
|
380
381
|
})] })]
|
|
381
|
-
}), /* @__PURE__ */ f(
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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
|
-
}) :
|
|
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__ */
|
|
399
|
-
className: "mx-6 mt-4 flex items-center justify-between p-4 bg-status-success-bg-subtle border border-border-
|
|
400
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
403
|
+
children: [/* @__PURE__ */ f(s, {
|
|
403
404
|
size: 20,
|
|
404
405
|
className: "text-status-success-text"
|
|
405
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ p("p", {
|
|
406
407
|
className: "text-sm text-status-success-text",
|
|
407
408
|
children: [
|
|
408
|
-
|
|
409
|
+
u("notifications.sentSuccessfully", "Notification sent successfully to"),
|
|
409
410
|
" ",
|
|
410
|
-
|
|
411
|
+
C.length,
|
|
411
412
|
" ",
|
|
412
|
-
|
|
413
|
-
|
|
413
|
+
u("notifications.recipientCount", "recipient"),
|
|
414
|
+
C.length === 1 ? "" : "s",
|
|
414
415
|
"!"
|
|
415
416
|
]
|
|
416
417
|
})]
|
|
417
|
-
}), /* @__PURE__ */
|
|
418
|
-
onClick:
|
|
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:
|
|
421
|
+
children: u("notifications.sendAnother", "Send Another")
|
|
421
422
|
})]
|
|
422
423
|
}),
|
|
423
|
-
|
|
424
|
-
className: "mx-6 mt-4 flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-border-
|
|
425
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
429
|
+
}), /* @__PURE__ */ f("p", {
|
|
429
430
|
className: "text-sm text-status-error-text",
|
|
430
|
-
children:
|
|
431
|
+
children: Et
|
|
431
432
|
})]
|
|
432
433
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ p("div", {
|
|
434
435
|
className: "flex gap-6 p-6",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ p("div", {
|
|
436
437
|
className: `flex-1 space-y-6 ${K ? "max-w-2xl" : ""}`,
|
|
437
438
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
440
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
443
|
+
children: [/* @__PURE__ */ f(pe, {
|
|
443
444
|
size: 18,
|
|
444
445
|
className: "text-text-secondary"
|
|
445
|
-
}), /* @__PURE__ */
|
|
446
|
+
}), /* @__PURE__ */ f("h2", {
|
|
446
447
|
className: "text-sm font-medium text-text-primary",
|
|
447
|
-
children:
|
|
448
|
+
children: u("notifications.sendMode", "Send Mode")
|
|
448
449
|
})]
|
|
449
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ p("div", {
|
|
450
451
|
className: "flex gap-2",
|
|
451
|
-
children: [/* @__PURE__ */
|
|
452
|
-
onClick: () =>
|
|
453
|
-
className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${
|
|
454
|
-
children:
|
|
455
|
-
}), /* @__PURE__ */
|
|
456
|
-
onClick: () =>
|
|
457
|
-
className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${
|
|
458
|
-
children:
|
|
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__ */
|
|
463
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
463
|
+
/* @__PURE__ */ p("div", {
|
|
464
|
+
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
464
465
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ f("h2", {
|
|
466
467
|
className: "text-sm font-medium text-text-primary mb-4",
|
|
467
|
-
children:
|
|
468
|
+
children: u("notifications.channel", "Channel")
|
|
468
469
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ f("div", {
|
|
470
471
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-2",
|
|
471
|
-
children:
|
|
472
|
+
children: we.map((e) => {
|
|
472
473
|
let t = e.icon;
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
+
return /* @__PURE__ */ p("button", {
|
|
474
475
|
onClick: () => {
|
|
475
|
-
|
|
476
|
+
Ge(e.value), Je([]), D([]), [
|
|
476
477
|
"EMAIL",
|
|
477
478
|
"SMS",
|
|
478
479
|
"WHATSAPP"
|
|
479
|
-
].includes(e.value) || (
|
|
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 ${
|
|
482
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
485
|
+
children: u(`notifications.channel.${e.value}`, e.label)
|
|
485
486
|
})]
|
|
486
487
|
}, e.value);
|
|
487
488
|
})
|
|
488
489
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ p("div", {
|
|
490
491
|
className: "mt-4 pt-4 border-t border-border-subtle",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ p("label", {
|
|
492
493
|
className: "flex items-center gap-3 cursor-pointer",
|
|
493
|
-
children: [/* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ f("input", {
|
|
494
495
|
type: "checkbox",
|
|
495
496
|
checked: L,
|
|
496
497
|
onChange: (e) => {
|
|
497
|
-
|
|
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__ */
|
|
501
|
+
}), /* @__PURE__ */ p("div", {
|
|
501
502
|
className: "flex items-center gap-2",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ f(ue, {
|
|
503
504
|
size: 16,
|
|
504
505
|
className: "text-primary-500"
|
|
505
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ f("span", {
|
|
506
507
|
className: "text-sm font-medium text-text-primary",
|
|
507
|
-
children:
|
|
508
|
+
children: u("notifications.alsoSendInApp", "Also send as In-App notification")
|
|
508
509
|
})]
|
|
509
510
|
})]
|
|
510
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ f("p", {
|
|
511
512
|
className: "text-xs text-text-secondary ml-7 mt-1",
|
|
512
|
-
children:
|
|
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__ */
|
|
518
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
519
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
522
|
+
children: [/* @__PURE__ */ f("input", {
|
|
522
523
|
type: "checkbox",
|
|
523
524
|
checked: W,
|
|
524
525
|
onChange: (e) => {
|
|
525
|
-
|
|
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__ */
|
|
529
|
+
}), /* @__PURE__ */ f("span", {
|
|
529
530
|
className: "text-sm font-medium text-text-primary",
|
|
530
|
-
children:
|
|
531
|
+
children: u("notifications.scheduleForLater", "Schedule for later")
|
|
531
532
|
})]
|
|
532
|
-
}), W && /* @__PURE__ */
|
|
533
|
+
}), W && /* @__PURE__ */ p("div", {
|
|
533
534
|
className: "mt-3 ml-7",
|
|
534
|
-
children: [/* @__PURE__ */
|
|
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) =>
|
|
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__ */
|
|
541
|
+
}), /* @__PURE__ */ p("p", {
|
|
541
542
|
className: "text-xs text-text-tertiary mt-1",
|
|
542
543
|
children: [
|
|
543
|
-
|
|
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__ */
|
|
552
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
552
|
+
/* @__PURE__ */ p("div", {
|
|
553
|
+
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
553
554
|
children: [
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ p("label", {
|
|
555
556
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
556
|
-
children: [
|
|
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__ */
|
|
562
|
-
value:
|
|
563
|
-
onChange: (e) =>
|
|
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__ */
|
|
566
|
+
children: [/* @__PURE__ */ f("option", {
|
|
566
567
|
value: "",
|
|
567
|
-
children:
|
|
568
|
-
}),
|
|
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__ */
|
|
579
|
+
/* @__PURE__ */ f("p", {
|
|
579
580
|
className: "mt-2 text-xs text-text-secondary",
|
|
580
|
-
children:
|
|
581
|
+
children: u("notifications.topicHelper", "Topics help users unsubscribe from promotional content they do not want.")
|
|
581
582
|
})
|
|
582
583
|
]
|
|
583
584
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
585
|
+
/* @__PURE__ */ p("div", {
|
|
586
|
+
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
586
587
|
children: [
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ p("div", {
|
|
588
589
|
className: "flex items-center gap-2 mb-4",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ f(ve, {
|
|
590
591
|
size: 18,
|
|
591
592
|
className: "text-text-secondary"
|
|
592
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ p("h2", {
|
|
593
594
|
className: "text-sm font-medium text-text-primary",
|
|
594
595
|
children: [
|
|
595
|
-
|
|
596
|
+
u("notifications.recipients", "Recipients"),
|
|
596
597
|
" ",
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ f("span", {
|
|
598
599
|
className: "text-status-error-text",
|
|
599
600
|
children: "*"
|
|
600
601
|
})
|
|
601
602
|
]
|
|
602
603
|
})]
|
|
603
604
|
}),
|
|
604
|
-
|
|
605
|
+
_t && /* @__PURE__ */ p("div", {
|
|
605
606
|
className: "mb-4 flex gap-2",
|
|
606
|
-
children: [/* @__PURE__ */
|
|
607
|
-
onClick: () =>
|
|
608
|
-
className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${
|
|
609
|
-
children:
|
|
610
|
-
}), /* @__PURE__ */
|
|
611
|
-
onClick: () =>
|
|
612
|
-
className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${
|
|
613
|
-
children:
|
|
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
|
-
|
|
617
|
-
recipients:
|
|
618
|
-
onChange:
|
|
619
|
-
channel:
|
|
620
|
-
disabled:
|
|
621
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
625
|
+
/* @__PURE__ */ p("div", {
|
|
625
626
|
className: "grid gap-3 md:grid-cols-[minmax(0,1fr),180px,180px]",
|
|
626
627
|
children: [
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ p("div", {
|
|
628
629
|
className: "relative",
|
|
629
|
-
children: [/* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ f("input", {
|
|
630
631
|
type: "text",
|
|
631
632
|
value: B,
|
|
632
633
|
onChange: (e) => {
|
|
633
|
-
V(e.target.value),
|
|
634
|
-
role:
|
|
635
|
-
status:
|
|
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:
|
|
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
|
-
}),
|
|
641
|
+
}), He && /* @__PURE__ */ f("div", {
|
|
641
642
|
className: "absolute right-3 top-1/2 -translate-y-1/2",
|
|
642
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
649
|
-
value:
|
|
649
|
+
/* @__PURE__ */ f("select", {
|
|
650
|
+
value: k,
|
|
650
651
|
onChange: (e) => {
|
|
651
|
-
|
|
652
|
+
Xe(e.target.value), g(B, {
|
|
652
653
|
role: e.target.value || void 0,
|
|
653
|
-
status:
|
|
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:
|
|
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__ */
|
|
663
|
-
value:
|
|
663
|
+
/* @__PURE__ */ f("select", {
|
|
664
|
+
value: A,
|
|
664
665
|
onChange: (e) => {
|
|
665
|
-
|
|
666
|
-
role:
|
|
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:
|
|
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__ */
|
|
679
|
+
/* @__PURE__ */ p("label", {
|
|
679
680
|
className: "flex items-center gap-3 text-sm text-text-secondary",
|
|
680
|
-
children: [/* @__PURE__ */
|
|
681
|
+
children: [/* @__PURE__ */ f("input", {
|
|
681
682
|
type: "checkbox",
|
|
682
|
-
checked:
|
|
683
|
-
onChange: (e) =>
|
|
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__ */
|
|
686
|
+
}), /* @__PURE__ */ f("span", { children: u("notifications.sendToAllMatchingUsers", "Send to all users matching the current search and filters") })]
|
|
686
687
|
}),
|
|
687
|
-
B && /* @__PURE__ */
|
|
688
|
+
B && /* @__PURE__ */ f("div", {
|
|
688
689
|
className: "max-h-56 overflow-y-auto rounded-lg border border-border-subtle",
|
|
689
|
-
children:
|
|
690
|
-
let t =
|
|
691
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
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
|
|
700
|
+
/* @__PURE__ */ f(d, {
|
|
700
701
|
size: 16,
|
|
701
702
|
className: t ? "text-primary-500" : "text-text-tertiary"
|
|
702
703
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ p("div", {
|
|
704
705
|
className: "flex-1",
|
|
705
706
|
children: [
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ f("div", {
|
|
707
708
|
className: "text-sm font-medium text-text-primary",
|
|
708
709
|
children: e.name
|
|
709
710
|
}),
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ f("div", {
|
|
711
712
|
className: "text-xs text-text-secondary",
|
|
712
713
|
children: e.email
|
|
713
714
|
}),
|
|
714
|
-
e.phoneNumber && /* @__PURE__ */
|
|
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__ */
|
|
721
|
+
!n && /* @__PURE__ */ f("span", {
|
|
721
722
|
className: "text-xs text-status-error-text",
|
|
722
|
-
children:
|
|
723
|
+
children: u("notifications.missingChannelTarget", "Missing channel target")
|
|
723
724
|
}),
|
|
724
|
-
t && /* @__PURE__ */
|
|
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__ */
|
|
731
|
+
}) : /* @__PURE__ */ f("div", {
|
|
731
732
|
className: "p-4 text-center text-sm text-text-secondary",
|
|
732
|
-
children:
|
|
733
|
+
children: v ? `${u("notifications.error", "Error")}: ${v}` : u("notifications.noUsersFound", "No users found")
|
|
733
734
|
})
|
|
734
735
|
}),
|
|
735
|
-
|
|
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
|
-
|
|
739
|
+
u("notifications.selectedUsers", "Selected Users"),
|
|
739
740
|
" (",
|
|
740
|
-
|
|
741
|
+
E.length,
|
|
741
742
|
")"
|
|
742
743
|
]
|
|
743
|
-
}), /* @__PURE__ */
|
|
744
|
+
}), /* @__PURE__ */ f("div", {
|
|
744
745
|
className: "flex flex-wrap gap-2",
|
|
745
|
-
children:
|
|
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
|
|
749
|
+
/* @__PURE__ */ f(d, {
|
|
749
750
|
size: 12,
|
|
750
751
|
className: "text-primary-500"
|
|
751
752
|
}),
|
|
752
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ f("span", {
|
|
753
754
|
className: "text-primary-700 dark:text-primary-300",
|
|
754
755
|
children: e.name
|
|
755
756
|
}),
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ f("button", {
|
|
757
758
|
type: "button",
|
|
758
|
-
onClick: () =>
|
|
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__ */
|
|
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__ */
|
|
773
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
773
|
+
L && /* @__PURE__ */ p("div", {
|
|
774
|
+
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
774
775
|
children: [
|
|
775
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ p("div", {
|
|
776
777
|
className: "flex items-center gap-2 mb-4",
|
|
777
|
-
children: [/* @__PURE__ */
|
|
778
|
+
children: [/* @__PURE__ */ f(ue, {
|
|
778
779
|
size: 18,
|
|
779
780
|
className: "text-primary-500"
|
|
780
|
-
}), /* @__PURE__ */
|
|
781
|
+
}), /* @__PURE__ */ p("h2", {
|
|
781
782
|
className: "text-sm font-medium text-text-primary",
|
|
782
783
|
children: [
|
|
783
|
-
|
|
784
|
+
u("notifications.inAppUsers", "In-App Notification Users"),
|
|
784
785
|
" ",
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
+
/* @__PURE__ */ f("span", {
|
|
786
787
|
className: "text-status-error-text",
|
|
787
788
|
children: "*"
|
|
788
789
|
})
|
|
789
790
|
]
|
|
790
791
|
})]
|
|
791
792
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ p("div", {
|
|
793
794
|
className: "relative mb-4",
|
|
794
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ f("input", {
|
|
795
796
|
type: "text",
|
|
796
797
|
value: B,
|
|
797
798
|
onChange: (e) => {
|
|
798
|
-
V(e.target.value),
|
|
799
|
-
role:
|
|
800
|
-
status:
|
|
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:
|
|
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
|
-
}),
|
|
806
|
+
}), He && /* @__PURE__ */ f("div", {
|
|
806
807
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2",
|
|
807
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
814
|
+
B && /* @__PURE__ */ f("div", {
|
|
814
815
|
className: "mb-4",
|
|
815
|
-
children:
|
|
816
|
+
children: _.length > 0 ? /* @__PURE__ */ f("div", {
|
|
816
817
|
className: "max-h-48 overflow-y-auto border border-border-subtle rounded-lg",
|
|
817
|
-
children:
|
|
818
|
+
children: _.map((e) => {
|
|
818
819
|
let t = R.some((t) => t.id === e.id);
|
|
819
|
-
return /* @__PURE__ */
|
|
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
|
|
827
|
+
/* @__PURE__ */ f(d, {
|
|
827
828
|
size: 16,
|
|
828
829
|
className: t ? "text-primary-500" : "text-text-tertiary"
|
|
829
830
|
}),
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ p("div", {
|
|
831
832
|
className: "flex-1",
|
|
832
|
-
children: [/* @__PURE__ */
|
|
833
|
+
children: [/* @__PURE__ */ f("div", {
|
|
833
834
|
className: "text-sm font-medium text-text-primary",
|
|
834
835
|
children: e.name
|
|
835
|
-
}), /* @__PURE__ */
|
|
836
|
+
}), /* @__PURE__ */ f("div", {
|
|
836
837
|
className: "text-xs text-text-secondary",
|
|
837
838
|
children: e.email
|
|
838
839
|
})]
|
|
839
840
|
}),
|
|
840
|
-
t && /* @__PURE__ */
|
|
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__ */
|
|
848
|
+
}) : /* @__PURE__ */ f("div", {
|
|
848
849
|
className: "text-center py-4 text-sm text-text-secondary",
|
|
849
|
-
children:
|
|
850
|
+
children: v ? `${u("notifications.error", "Error")}: ${v}` : u("notifications.noUsersFound", "No users found")
|
|
850
851
|
})
|
|
851
852
|
}),
|
|
852
|
-
R.length > 0 && /* @__PURE__ */
|
|
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
|
-
|
|
856
|
+
u("notifications.selectedUsers", "Selected Users"),
|
|
856
857
|
" (",
|
|
857
858
|
R.length,
|
|
858
859
|
")"
|
|
859
860
|
]
|
|
860
|
-
}), /* @__PURE__ */
|
|
861
|
+
}), /* @__PURE__ */ f("div", {
|
|
861
862
|
className: "flex flex-wrap gap-2",
|
|
862
|
-
children: R.map((e) => /* @__PURE__ */
|
|
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
|
|
866
|
+
/* @__PURE__ */ f(d, {
|
|
866
867
|
size: 12,
|
|
867
868
|
className: "text-primary-500"
|
|
868
869
|
}),
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ f("span", {
|
|
870
871
|
className: "text-primary-700 dark:text-primary-300",
|
|
871
872
|
children: e.name
|
|
872
873
|
}),
|
|
873
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
888
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
888
|
+
y === "template" && /* @__PURE__ */ p("div", {
|
|
889
|
+
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
889
890
|
children: [
|
|
890
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ p("h2", {
|
|
891
892
|
className: "text-sm font-medium text-text-primary mb-4",
|
|
892
893
|
children: [
|
|
893
|
-
|
|
894
|
+
u("notifications.selectTemplate", "Select Template"),
|
|
894
895
|
" ",
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ f("span", {
|
|
896
897
|
className: "text-status-error-text",
|
|
897
898
|
children: "*"
|
|
898
899
|
})
|
|
899
900
|
]
|
|
900
901
|
}),
|
|
901
|
-
|
|
902
|
+
ze ? /* @__PURE__ */ f("div", {
|
|
902
903
|
className: "flex items-center justify-center py-8",
|
|
903
|
-
children: /* @__PURE__ */
|
|
904
|
+
children: /* @__PURE__ */ f(c, {
|
|
904
905
|
size: 24,
|
|
905
906
|
className: "animate-spin text-text-tertiary"
|
|
906
907
|
})
|
|
907
|
-
}) :
|
|
908
|
+
}) : h.length === 0 ? /* @__PURE__ */ p("div", {
|
|
908
909
|
className: "text-center py-8",
|
|
909
910
|
children: [
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ f(pe, {
|
|
911
912
|
size: 32,
|
|
912
913
|
className: "mx-auto text-text-tertiary mb-2"
|
|
913
914
|
}),
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ f("p", {
|
|
915
916
|
className: "text-sm text-text-secondary",
|
|
916
|
-
children:
|
|
917
|
+
children: u("notifications.noTemplatesAvailable", "No templates available")
|
|
917
918
|
}),
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
onClick: () =>
|
|
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:
|
|
922
|
+
children: u("notifications.createATemplate", "Create a template")
|
|
922
923
|
})
|
|
923
924
|
]
|
|
924
|
-
}) : /* @__PURE__ */
|
|
925
|
+
}) : /* @__PURE__ */ p("select", {
|
|
925
926
|
value: H,
|
|
926
927
|
onChange: (e) => {
|
|
927
|
-
|
|
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__ */
|
|
931
|
+
children: [/* @__PURE__ */ f("option", {
|
|
931
932
|
value: "",
|
|
932
|
-
children:
|
|
933
|
-
}),
|
|
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
|
-
|
|
939
|
+
u(`notifications.type.${e.type}`, e.type),
|
|
939
940
|
")"
|
|
940
941
|
]
|
|
941
942
|
}, e.id))]
|
|
942
943
|
}),
|
|
943
|
-
X &&
|
|
944
|
+
X && pt.length > 0 && /* @__PURE__ */ p("div", {
|
|
944
945
|
className: "mt-4 space-y-3",
|
|
945
|
-
children: [/* @__PURE__ */
|
|
946
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
946
947
|
className: "text-sm font-medium text-text-secondary",
|
|
947
|
-
children:
|
|
948
|
-
}),
|
|
949
|
-
/* @__PURE__ */
|
|
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__ */
|
|
954
|
+
e.required && /* @__PURE__ */ f("span", {
|
|
954
955
|
className: "text-status-error-text ml-0.5",
|
|
955
956
|
children: "*"
|
|
956
957
|
}),
|
|
957
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
972
|
+
/* @__PURE__ */ f("input", {
|
|
972
973
|
type: "text",
|
|
973
974
|
value: U[e.key] || "",
|
|
974
|
-
onChange: (t) =>
|
|
975
|
+
onChange: (t) => ct((n) => ({
|
|
975
976
|
...n,
|
|
976
977
|
[e.key]: t.target.value
|
|
977
978
|
})),
|
|
978
|
-
placeholder: e.defaultValue || `${
|
|
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
|
-
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
988
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
991
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
991
992
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
992
|
-
children:
|
|
993
|
-
}), /* @__PURE__ */
|
|
994
|
-
value:
|
|
995
|
-
onChange: (e) =>
|
|
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:
|
|
998
|
+
children: Te.map((e) => /* @__PURE__ */ f("option", {
|
|
998
999
|
value: e.value,
|
|
999
|
-
children:
|
|
1000
|
+
children: u(`notifications.type.${e.value}`, e.label)
|
|
1000
1001
|
}, e.value))
|
|
1001
|
-
})] }), /* @__PURE__ */
|
|
1002
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
1002
1003
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
1003
|
-
children:
|
|
1004
|
-
}), /* @__PURE__ */
|
|
1005
|
-
value:
|
|
1006
|
-
onChange: (e) =>
|
|
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:
|
|
1009
|
+
children: Ee.map((e) => /* @__PURE__ */ f("option", {
|
|
1009
1010
|
value: e.value,
|
|
1010
|
-
children:
|
|
1011
|
+
children: u(`notifications.priority.${e.value}`, e.label)
|
|
1011
1012
|
}, e.value))
|
|
1012
1013
|
})] })]
|
|
1013
1014
|
})
|
|
1014
1015
|
}),
|
|
1015
|
-
|
|
1016
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
1017
|
-
children: [/* @__PURE__ */
|
|
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
|
-
|
|
1021
|
+
u("notifications.subjectLabel", "Subject"),
|
|
1021
1022
|
" ",
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ f("span", {
|
|
1023
1024
|
className: "text-status-error-text",
|
|
1024
1025
|
children: "*"
|
|
1025
1026
|
})
|
|
1026
1027
|
]
|
|
1027
|
-
}), /* @__PURE__ */
|
|
1028
|
+
}), /* @__PURE__ */ f("input", {
|
|
1028
1029
|
type: "text",
|
|
1029
|
-
value:
|
|
1030
|
-
onChange: (e) =>
|
|
1031
|
-
placeholder:
|
|
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__ */
|
|
1036
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
1036
|
+
/* @__PURE__ */ p("div", {
|
|
1037
|
+
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
1037
1038
|
children: [
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ p("div", {
|
|
1039
1040
|
className: "flex items-center justify-between mb-2",
|
|
1040
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ p("label", {
|
|
1041
1042
|
className: "block text-sm font-medium text-text-primary",
|
|
1042
1043
|
children: [
|
|
1043
|
-
|
|
1044
|
+
u("notifications.messageLabel", "Message"),
|
|
1044
1045
|
" ",
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
+
/* @__PURE__ */ f("span", {
|
|
1046
1047
|
className: "text-status-error-text",
|
|
1047
1048
|
children: "*"
|
|
1048
1049
|
})
|
|
1049
1050
|
]
|
|
1050
|
-
}),
|
|
1051
|
+
}), b === "EMAIL" && /* @__PURE__ */ p("label", {
|
|
1051
1052
|
className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
|
|
1052
|
-
children: [/* @__PURE__ */
|
|
1053
|
+
children: [/* @__PURE__ */ f("input", {
|
|
1053
1054
|
type: "checkbox",
|
|
1054
|
-
checked:
|
|
1055
|
-
onChange: (e) =>
|
|
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
|
-
}),
|
|
1058
|
+
}), u("notifications.includeHtmlVersion", "Include HTML version")]
|
|
1058
1059
|
})]
|
|
1059
1060
|
}),
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ f("textarea", {
|
|
1061
1062
|
rows: 6,
|
|
1062
|
-
value:
|
|
1063
|
-
onChange: (e) =>
|
|
1064
|
-
placeholder:
|
|
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
|
-
|
|
1068
|
+
b === "EMAIL" && nt && /* @__PURE__ */ p("div", {
|
|
1068
1069
|
className: "mt-4",
|
|
1069
|
-
children: [/* @__PURE__ */
|
|
1070
|
+
children: [/* @__PURE__ */ f("label", {
|
|
1070
1071
|
className: "block text-sm font-medium text-text-secondary mb-2",
|
|
1071
|
-
children:
|
|
1072
|
-
}), /* @__PURE__ */
|
|
1072
|
+
children: u("notifications.htmlContent", "HTML Content")
|
|
1073
|
+
}), /* @__PURE__ */ f("textarea", {
|
|
1073
1074
|
rows: 8,
|
|
1074
|
-
value:
|
|
1075
|
-
onChange: (e) =>
|
|
1076
|
-
placeholder:
|
|
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__ */
|
|
1084
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
1085
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
1088
|
+
children: [/* @__PURE__ */ f(he, {
|
|
1088
1089
|
size: 18,
|
|
1089
1090
|
className: "text-text-secondary"
|
|
1090
|
-
}), /* @__PURE__ */
|
|
1091
|
+
}), /* @__PURE__ */ f("h2", {
|
|
1091
1092
|
className: "text-sm font-medium text-text-primary",
|
|
1092
|
-
children:
|
|
1093
|
+
children: u("notifications.actions", "Actions")
|
|
1093
1094
|
})]
|
|
1094
|
-
}), /* @__PURE__ */
|
|
1095
|
+
}), /* @__PURE__ */ p("div", {
|
|
1095
1096
|
className: "space-y-3",
|
|
1096
|
-
children: [F.map((e, t) => /* @__PURE__ */
|
|
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__ */
|
|
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:
|
|
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__ */
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
1128
|
+
/* @__PURE__ */ f("option", {
|
|
1128
1129
|
value: "primary",
|
|
1129
1130
|
children: "Primary"
|
|
1130
1131
|
}),
|
|
1131
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ f("option", {
|
|
1132
1133
|
value: "secondary",
|
|
1133
1134
|
children: "Secondary"
|
|
1134
1135
|
}),
|
|
1135
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ f("option", {
|
|
1136
1137
|
value: "danger",
|
|
1137
1138
|
children: "Danger"
|
|
1138
1139
|
})
|
|
1139
1140
|
]
|
|
1140
1141
|
}),
|
|
1141
|
-
/* @__PURE__ */
|
|
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:
|
|
1151
|
+
children: u("notifications.remove", "Remove")
|
|
1151
1152
|
})
|
|
1152
1153
|
]
|
|
1153
|
-
}, e.id)), /* @__PURE__ */
|
|
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:
|
|
1163
|
+
children: u("notifications.addAction", "Add action")
|
|
1163
1164
|
})]
|
|
1164
1165
|
})]
|
|
1165
1166
|
}),
|
|
1166
|
-
/* @__PURE__ */
|
|
1167
|
-
className: "bg-bg-surface rounded-lg border border-border-
|
|
1168
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
1171
|
+
children: [/* @__PURE__ */ f(me, {
|
|
1171
1172
|
size: 18,
|
|
1172
1173
|
className: "text-text-secondary"
|
|
1173
|
-
}), /* @__PURE__ */
|
|
1174
|
+
}), /* @__PURE__ */ f("h2", {
|
|
1174
1175
|
className: "text-sm font-medium text-text-primary",
|
|
1175
|
-
children:
|
|
1176
|
+
children: u("notifications.media", "Media")
|
|
1176
1177
|
})]
|
|
1177
|
-
}), /* @__PURE__ */
|
|
1178
|
+
}), /* @__PURE__ */ p("div", {
|
|
1178
1179
|
className: "space-y-3",
|
|
1179
|
-
children: [
|
|
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__ */
|
|
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:
|
|
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__ */
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
1211
|
+
/* @__PURE__ */ f("option", {
|
|
1211
1212
|
value: "image",
|
|
1212
1213
|
children: "Image"
|
|
1213
1214
|
}),
|
|
1214
|
-
/* @__PURE__ */
|
|
1215
|
+
/* @__PURE__ */ f("option", {
|
|
1215
1216
|
value: "video",
|
|
1216
1217
|
children: "Video"
|
|
1217
1218
|
}),
|
|
1218
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ f("option", {
|
|
1219
1220
|
value: "file",
|
|
1220
1221
|
children: "File"
|
|
1221
1222
|
})
|
|
1222
1223
|
]
|
|
1223
1224
|
}),
|
|
1224
|
-
/* @__PURE__ */
|
|
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:
|
|
1233
|
+
children: u("notifications.remove", "Remove")
|
|
1233
1234
|
})
|
|
1234
1235
|
]
|
|
1235
|
-
}, `${e.kind}-${t}`)), /* @__PURE__ */
|
|
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:
|
|
1244
|
+
children: u("notifications.addMedia", "Add media")
|
|
1244
1245
|
})]
|
|
1245
1246
|
})]
|
|
1246
1247
|
})
|
|
1247
1248
|
]
|
|
1248
|
-
}), K && /* @__PURE__ */
|
|
1249
|
+
}), K && /* @__PURE__ */ f("div", {
|
|
1249
1250
|
className: "w-96 flex-shrink-0",
|
|
1250
|
-
children: /* @__PURE__ */
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
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:
|
|
1258
|
+
children: u("notifications.preview", "Preview")
|
|
1257
1259
|
})
|
|
1258
|
-
}), /* @__PURE__ */
|
|
1260
|
+
}), /* @__PURE__ */ p("div", {
|
|
1259
1261
|
className: "p-4",
|
|
1260
1262
|
children: [
|
|
1261
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ p("div", {
|
|
1262
1264
|
className: "flex items-center gap-2 mb-4",
|
|
1263
1265
|
children: [
|
|
1264
|
-
/* @__PURE__ */
|
|
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:
|
|
1268
|
+
children: u(`notifications.channel.${b}`, b)
|
|
1267
1269
|
}),
|
|
1268
|
-
/* @__PURE__ */
|
|
1270
|
+
/* @__PURE__ */ f("span", {
|
|
1269
1271
|
className: "px-2 py-1 text-xs font-medium bg-bg-sunken text-text-secondary rounded",
|
|
1270
|
-
children:
|
|
1272
|
+
children: u(`notifications.type.${x}`, x)
|
|
1271
1273
|
}),
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
className: `px-2 py-1 text-xs font-medium rounded ${
|
|
1274
|
-
children:
|
|
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__ */
|
|
1280
|
+
/* @__PURE__ */ p("div", {
|
|
1279
1281
|
className: "mb-4",
|
|
1280
|
-
children: [/* @__PURE__ */
|
|
1282
|
+
children: [/* @__PURE__ */ f("p", {
|
|
1281
1283
|
className: "text-xs text-text-secondary mb-1",
|
|
1282
|
-
children:
|
|
1283
|
-
}),
|
|
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:
|
|
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
|
-
|
|
1294
|
+
C.length,
|
|
1293
1295
|
" ",
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
+
u("notifications.recipientCount", "recipient"),
|
|
1297
|
+
C.length === 1 ? "" : "s"
|
|
1296
1298
|
]
|
|
1297
1299
|
})]
|
|
1298
1300
|
}),
|
|
1299
|
-
|
|
1301
|
+
b === "EMAIL" && gt && /* @__PURE__ */ p("div", {
|
|
1300
1302
|
className: "mb-4",
|
|
1301
|
-
children: [/* @__PURE__ */
|
|
1303
|
+
children: [/* @__PURE__ */ f("p", {
|
|
1302
1304
|
className: "text-xs text-text-secondary mb-1",
|
|
1303
|
-
children:
|
|
1304
|
-
}), /* @__PURE__ */
|
|
1305
|
+
children: u("notifications.subjectLabel", "Subject")
|
|
1306
|
+
}), /* @__PURE__ */ f("p", {
|
|
1305
1307
|
className: "text-sm font-medium text-text-primary",
|
|
1306
|
-
children:
|
|
1308
|
+
children: gt
|
|
1307
1309
|
})]
|
|
1308
1310
|
}),
|
|
1309
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
1310
1312
|
className: "text-xs text-text-secondary mb-1",
|
|
1311
|
-
children:
|
|
1312
|
-
}),
|
|
1313
|
+
children: u("notifications.messageLabel", "Message")
|
|
1314
|
+
}), ht ? /* @__PURE__ */ f("div", {
|
|
1313
1315
|
className: "p-3 bg-bg-canvas rounded-lg",
|
|
1314
|
-
children: /* @__PURE__ */
|
|
1316
|
+
children: /* @__PURE__ */ f("p", {
|
|
1315
1317
|
className: "text-sm text-text-secondary whitespace-pre-wrap",
|
|
1316
|
-
children:
|
|
1318
|
+
children: ht
|
|
1317
1319
|
})
|
|
1318
|
-
}) : /* @__PURE__ */
|
|
1320
|
+
}) : /* @__PURE__ */ f("p", {
|
|
1319
1321
|
className: "text-sm text-text-tertiary italic",
|
|
1320
|
-
children:
|
|
1322
|
+
children: u("notifications.noMessageContent", "No message content")
|
|
1321
1323
|
})] }),
|
|
1322
|
-
|
|
1324
|
+
N && /* @__PURE__ */ p("div", {
|
|
1323
1325
|
className: "mt-4",
|
|
1324
|
-
children: [/* @__PURE__ */
|
|
1326
|
+
children: [/* @__PURE__ */ f("p", {
|
|
1325
1327
|
className: "text-xs text-text-secondary mb-1",
|
|
1326
|
-
children:
|
|
1327
|
-
}), /* @__PURE__ */
|
|
1328
|
+
children: u("notifications.topic", "Topic")
|
|
1329
|
+
}), /* @__PURE__ */ f("p", {
|
|
1328
1330
|
className: "text-sm text-text-primary",
|
|
1329
|
-
children:
|
|
1331
|
+
children: Ue.find((e) => e.id === N)?.name || N
|
|
1330
1332
|
})]
|
|
1331
1333
|
}),
|
|
1332
|
-
Q.length > 0 && /* @__PURE__ */
|
|
1334
|
+
Q.length > 0 && /* @__PURE__ */ p("div", {
|
|
1333
1335
|
className: "mt-4",
|
|
1334
|
-
children: [/* @__PURE__ */
|
|
1336
|
+
children: [/* @__PURE__ */ f("p", {
|
|
1335
1337
|
className: "text-xs text-text-secondary mb-1",
|
|
1336
|
-
children:
|
|
1337
|
-
}), /* @__PURE__ */
|
|
1338
|
+
children: u("notifications.actions", "Actions")
|
|
1339
|
+
}), /* @__PURE__ */ f("div", {
|
|
1338
1340
|
className: "flex flex-wrap gap-2",
|
|
1339
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
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__ */
|
|
1347
|
+
$.length > 0 && /* @__PURE__ */ p("div", {
|
|
1346
1348
|
className: "mt-4 space-y-2",
|
|
1347
|
-
children: [/* @__PURE__ */
|
|
1349
|
+
children: [/* @__PURE__ */ f("p", {
|
|
1348
1350
|
className: "text-xs text-text-secondary",
|
|
1349
|
-
children:
|
|
1350
|
-
}), $.map((e) => /* @__PURE__ */
|
|
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
|
-
|
|
1357
|
+
y === "template" && X && /* @__PURE__ */ p("div", {
|
|
1356
1358
|
className: "mt-4 pt-4 border-t border-border-subtle",
|
|
1357
1359
|
children: [
|
|
1358
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ f("p", {
|
|
1359
1361
|
className: "text-xs text-text-secondary mb-1",
|
|
1360
|
-
children:
|
|
1362
|
+
children: u("notifications.usingTemplate", "Using Template")
|
|
1361
1363
|
}),
|
|
1362
|
-
/* @__PURE__ */
|
|
1364
|
+
/* @__PURE__ */ f("p", {
|
|
1363
1365
|
className: "text-sm font-medium text-text-primary",
|
|
1364
1366
|
children: X.name
|
|
1365
1367
|
}),
|
|
1366
|
-
/* @__PURE__ */
|
|
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 {
|
|
1383
|
+
export { ke as CreateNotificationPage };
|
|
1382
1384
|
|
|
1383
1385
|
//# sourceMappingURL=CreateNotificationPage.js.map
|