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