@burdenoff/microfe-eventfullymanaged 2026.1110.2 → 2026.1110.4

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.
@@ -1,20 +1,20 @@
1
- import { useAnnouncementsQuery as e, useCommunicationCampaignsQuery as t, usePublishAnnouncementMutation as n, useSendCommunicationCampaignMutation as r, useUpsertAnnouncementMutation as i, useUpsertCommunicationCampaignMutation as a } from "../../api/eventApi.js";
2
- import { Pagination as o, usePagination as s } from "../../components/Pagination.js";
3
- import { describeError as c, mutationSucceeded as l } from "../../lib/mutationResult.js";
4
- import { notify as u } from "../../lib/toast.js";
5
- import { useMemo as d, useState as f } from "react";
6
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
- import { Mail as g, Megaphone as _, Plus as v, Send as y, Upload as b } from "lucide-react";
9
- import { Badge as x, Button as S, GlassCard as C, GradientText as ee, IllustratedEmptyState as w, Input as T, PagePurpose as te, Textarea as ne } from "@burdenoff/fe-libs/ui";
1
+ import { useAnnouncementsQuery as e, useCommunicationCampaignsQuery as t, useEventsQuery as n, usePublishAnnouncementMutation as r, useSendCommunicationCampaignMutation as ee, useUpsertAnnouncementMutation as te, useUpsertCommunicationCampaignMutation as ne } from "../../api/eventApi.js";
2
+ import { Pagination as i, usePagination as a } from "../../components/Pagination.js";
3
+ import { describeError as o, mutationSucceeded as s } from "../../lib/mutationResult.js";
4
+ import { notify as c } from "../../lib/toast.js";
5
+ import { useMemo as l, useState as u } from "react";
6
+ import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
+ import { Mail as p, Megaphone as ie, Plus as m, Send as ae, Upload as h } from "lucide-react";
9
+ import { Badge as g, Button as _, GlassCard as v, GradientText as oe, IllustratedEmptyState as y, Input as b, PagePurpose as se, Select as ce, SelectContent as le, SelectItem as ue, SelectTrigger as de, SelectValue as fe, Textarea as pe } from "@burdenoff/fe-libs/ui";
10
10
  // src/eventfullymanaged/pages/modules/CommunicationPage.tsx
11
- function E(e) {
11
+ function me(e) {
12
12
  let t = e.metadata?.schedule;
13
13
  if (!t || typeof t != "object" || Array.isArray(t)) return null;
14
14
  let n = t.sendAt;
15
15
  return typeof n == "string" && n ? n : null;
16
16
  }
17
- function D(e) {
17
+ function x(e) {
18
18
  let t = e.toLowerCase();
19
19
  return [
20
20
  "published",
@@ -33,345 +33,406 @@ function D(e) {
33
33
  "scheduled"
34
34
  ].includes(t) ? "info" : "secondary";
35
35
  }
36
- var O = (e) => {
36
+ var S = (e) => {
37
37
  let t = (e ?? "").toLowerCase();
38
38
  return t === "" || t === "draft" || t === "created" || t === "scheduled";
39
- }, k = (e, t) => e.title ?? e.name ?? `${t} ${e.id}`;
40
- function A() {
41
- let { t: A } = p(), j = (e, t) => {
42
- let n = A(e);
39
+ }, C = (e, t) => e.title ?? e.name ?? `${t} ${e.id}`;
40
+ function w() {
41
+ let { t: w } = re(), T = (e, t) => {
42
+ let n = w(e);
43
43
  return n === e ? t : n;
44
- }, M = s({ pageSize: 8 }), N = s({ pageSize: 8 }), P = e({
45
- limit: M.limit,
46
- offset: M.offset
47
- }), F = t({
48
- limit: N.limit,
49
- offset: N.offset
50
- }), [re, { loading: ie }] = i(), [ae, { loading: oe }] = n(), [se, { loading: I }] = a(), [ce, { loading: L }] = r(), [R, z] = f("announcement"), [B, V] = f(""), [H, U] = f(""), [W, G] = f(""), [K, q] = f(""), J = d(() => P.data?.announcements.items ?? [], [P.data]), Y = P.data?.announcements.total ?? 0, X = d(() => F.data?.communicationCampaigns.items ?? [], [F.data]), Z = F.data?.communicationCampaigns.total ?? 0, Q = R === "announcement" ? ie : I, $ = () => {
51
- V(""), U(""), G(""), q("");
52
- }, le = async () => {
44
+ }, E = a({ pageSize: 8 }), D = a({ pageSize: 8 }), O = e({
45
+ limit: E.limit,
46
+ offset: E.offset
47
+ }), k = t({
48
+ limit: D.limit,
49
+ offset: D.offset
50
+ }), [he, { loading: ge }] = te(), [_e, { loading: A }] = r(), [j, { loading: M }] = ne(), [N, { loading: P }] = ee(), { data: F } = n({
51
+ limit: 100,
52
+ offset: 0
53
+ }), ve = F?.events?.items ?? [], [I, L] = u("announcement"), [R, z] = u(""), [B, V] = u(""), [H, U] = u(""), [W, G] = u(""), [K, q] = u(""), J = l(() => O.data?.announcements.items ?? [], [O.data]), Y = O.data?.announcements.total ?? 0, X = l(() => k.data?.communicationCampaigns.items ?? [], [k.data]), Z = k.data?.communicationCampaigns.total ?? 0, Q = I === "announcement" ? ge : M, $ = () => {
54
+ z(""), V(""), U(""), G(""), q("");
55
+ }, ye = async () => {
53
56
  if (!B.trim()) {
54
- u.error(j("eventfullymanaged.communication.subjectRequired", "Subject required"), "");
57
+ c.error(T("eventfullymanaged.communication.subjectRequired", "Subject required"), "");
55
58
  return;
56
59
  }
57
- if (R === "announcement") {
60
+ if (I === "announcement") {
58
61
  let e = {};
59
62
  W.trim() && (e.body = W.trim()), H.trim() && (e.audience = H.trim());
60
- let t = j("eventfullymanaged.communication.errors.create", "Could not create announcement");
63
+ let t = T("eventfullymanaged.communication.errors.create", "Could not create announcement");
61
64
  try {
62
- let n = await re({ variables: { input: {
65
+ let n = await he({ variables: { input: {
63
66
  title: B,
64
67
  name: B,
65
68
  status: "draft",
69
+ eventId: R || void 0,
66
70
  metadata: e
67
71
  } } });
68
- if (!l(n, n.data?.upsertAnnouncement?.id, t)) return;
69
- $(), u.success(j("eventfullymanaged.communication.created", "Announcement created")), await P.refetch();
72
+ if (!s(n, n.data?.upsertAnnouncement?.id, t)) return;
73
+ $(), c.success(T("eventfullymanaged.communication.created", "Announcement created")), await O.refetch();
70
74
  } catch (e) {
71
- u.error(t, c(e));
75
+ c.error(t, o(e));
72
76
  }
73
77
  return;
74
78
  }
75
79
  let e = H.split(",").map((e) => e.trim()).filter(Boolean), t = {};
76
80
  W.trim() && (t.content = { body: W.trim() }), e.length > 0 && (t.targetAudience = { segments: e }), K && (t.schedule = { sendAt: new Date(K).toISOString() });
77
- let n = j("eventfullymanaged.communication.errors.createCampaign", "Could not create campaign");
81
+ let n = T("eventfullymanaged.communication.errors.createCampaign", "Could not create campaign");
78
82
  try {
79
- let e = await se({ variables: { input: {
83
+ let e = await j({ variables: { input: {
80
84
  title: B,
81
85
  name: B,
82
86
  status: "draft",
87
+ eventId: R || void 0,
83
88
  metadata: t
84
89
  } } });
85
- if (!l(e, e.data?.upsertCommunicationCampaign?.id, n)) return;
86
- $(), u.success(j("eventfullymanaged.communication.campaignCreated", "Campaign created")), await F.refetch();
90
+ if (!s(e, e.data?.upsertCommunicationCampaign?.id, n)) return;
91
+ $(), c.success(T("eventfullymanaged.communication.campaignCreated", "Campaign created")), await k.refetch();
87
92
  } catch (e) {
88
- u.error(n, c(e));
93
+ c.error(n, o(e));
89
94
  }
90
- }, ue = async (e) => {
91
- let t = j("eventfullymanaged.communication.errors.publish", "Could not publish announcement");
95
+ }, be = async (e) => {
96
+ let t = T("eventfullymanaged.communication.errors.publish", "Could not publish announcement");
92
97
  try {
93
- let n = await ae({ variables: { id: e.id } });
94
- if (!l(n, n.data?.publishAnnouncement?.id, t)) return;
95
- u.success(j("eventfullymanaged.communication.published", "Announcement published")), await P.refetch();
98
+ let n = await _e({ variables: { id: e.id } });
99
+ if (!s(n, n.data?.publishAnnouncement?.id, t)) return;
100
+ c.success(T("eventfullymanaged.communication.published", "Announcement published")), await O.refetch();
96
101
  } catch (e) {
97
- u.error(t, c(e));
102
+ c.error(t, o(e));
98
103
  }
99
- }, de = async (e) => {
100
- let t = j("eventfullymanaged.communication.errors.send", "Could not send campaign");
104
+ }, xe = async (e) => {
105
+ let t = T("eventfullymanaged.communication.errors.send", "Could not send campaign");
101
106
  try {
102
- let n = await ce({ variables: { id: e.id } });
103
- if (!l(n, n.data?.sendCommunicationCampaign?.id, t)) return;
104
- n.data?.sendCommunicationCampaign?.status === "scheduled" ? u.success(j("eventfullymanaged.communication.scheduled", "Campaign scheduled for its send time")) : u.success(j("eventfullymanaged.communication.sent", "Campaign delivery started")), await F.refetch();
107
+ let n = await N({ variables: { id: e.id } });
108
+ if (!s(n, n.data?.sendCommunicationCampaign?.id, t)) return;
109
+ n.data?.sendCommunicationCampaign?.status === "scheduled" ? c.success(T("eventfullymanaged.communication.scheduled", "Campaign marked scheduled. There is no automatic sender yet — click Send campaign again at or after the send time to actually deliver it.")) : c.success(T("eventfullymanaged.communication.sent", "Campaign delivery started")), await k.refetch();
105
110
  } catch (e) {
106
- u.error(t, c(e));
111
+ c.error(t, o(e));
112
+ }
113
+ }, Se = async (e) => {
114
+ let t = e.metadata ?? {}, n = Object.fromEntries(Object.entries(t).filter(([e]) => e !== "schedule")), r = T("eventfullymanaged.communication.errors.cancelSchedule", "Could not cancel schedule");
115
+ try {
116
+ let t = await j({ variables: {
117
+ id: e.id,
118
+ input: {
119
+ status: "draft",
120
+ metadata: n
121
+ }
122
+ } });
123
+ if (!s(t, t.data?.upsertCommunicationCampaign?.id, r)) return;
124
+ c.success(T("eventfullymanaged.communication.scheduleCancelled", "Schedule cancelled; back to draft")), await k.refetch();
125
+ } catch (e) {
126
+ c.error(r, o(e));
107
127
  }
108
128
  };
109
- return /* @__PURE__ */ h("div", {
129
+ return /* @__PURE__ */ f("div", {
110
130
  className: "space-y-6 p-6",
111
131
  children: [
112
- /* @__PURE__ */ m(te, { children: j("eventfullymanaged.communication.purpose", "Keep attendees informed and engaged. Announcements are one-off broadcasts (a schedule change, a welcome message); campaigns are scheduled, multi-step outreach (reminder emails, follow-ups). Compose each one here, then publish an announcement or send a campaign — delivery runs server-side through the notification service.") }),
113
- /* @__PURE__ */ h("div", {
132
+ /* @__PURE__ */ d(se, { children: T("eventfullymanaged.communication.purpose", "Keep attendees informed. Announcements and campaigns are both single-message broadcasts to a resolved event or workspace audience — there is no multi-step sequence yet. Compose one here, then publish or send it: the message is handed to the platform notification worker for delivery.") }),
133
+ /* @__PURE__ */ f("div", {
114
134
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
115
- children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
135
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
116
136
  className: "text-2xl font-bold text-text-primary",
117
- children: /* @__PURE__ */ m(ee, { children: j("eventfullymanaged.communication.title", "Communications") })
118
- }), /* @__PURE__ */ m("p", {
137
+ children: /* @__PURE__ */ d(oe, { children: T("eventfullymanaged.communication.title", "Communications") })
138
+ }), /* @__PURE__ */ d("p", {
119
139
  className: "mt-1 text-sm text-text-secondary",
120
- children: j("eventfullymanaged.communication.description", "Draft, publish and send from one place.")
121
- })] }), /* @__PURE__ */ h("div", {
140
+ children: T("eventfullymanaged.communication.description", "Draft, publish and send from one place.")
141
+ })] }), /* @__PURE__ */ f("div", {
122
142
  className: "flex flex-col gap-2 sm:flex-row",
123
- children: [/* @__PURE__ */ h(S, {
143
+ children: [/* @__PURE__ */ f(_, {
124
144
  type: "button",
125
- variant: R === "announcement" ? "default" : "outline",
126
- onClick: () => z("announcement"),
127
- children: [/* @__PURE__ */ m(v, { className: "h-4 w-4" }), j("eventfullymanaged.communication.actions.newAnnouncement", "New announcement")]
128
- }), /* @__PURE__ */ h(S, {
145
+ variant: I === "announcement" ? "default" : "outline",
146
+ onClick: () => L("announcement"),
147
+ children: [/* @__PURE__ */ d(m, { className: "h-4 w-4" }), T("eventfullymanaged.communication.actions.newAnnouncement", "New announcement")]
148
+ }), /* @__PURE__ */ f(_, {
129
149
  type: "button",
130
- variant: R === "campaign" ? "default" : "outline",
131
- onClick: () => z("campaign"),
132
- children: [/* @__PURE__ */ m(v, { className: "h-4 w-4" }), j("eventfullymanaged.communication.actions.newCampaign", "New campaign")]
150
+ variant: I === "campaign" ? "default" : "outline",
151
+ onClick: () => L("campaign"),
152
+ children: [/* @__PURE__ */ d(m, { className: "h-4 w-4" }), T("eventfullymanaged.communication.actions.newCampaign", "New campaign")]
133
153
  })]
134
154
  })]
135
155
  }),
136
- /* @__PURE__ */ m(C, {
156
+ /* @__PURE__ */ d(v, {
137
157
  treatment: "glass",
138
158
  glow: !0,
139
159
  className: "p-5",
140
- children: /* @__PURE__ */ h("div", {
160
+ children: /* @__PURE__ */ f("div", {
141
161
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
142
- children: [/* @__PURE__ */ h("div", {
162
+ children: [/* @__PURE__ */ f("div", {
143
163
  className: "space-y-3",
144
164
  children: [
145
- /* @__PURE__ */ h("div", {
165
+ /* @__PURE__ */ f("div", {
146
166
  className: "flex items-center gap-2",
147
- children: [m(R === "announcement" ? _ : g, { className: "h-4 w-4 text-accent-primary" }), /* @__PURE__ */ m("h2", {
167
+ children: [d(I === "announcement" ? ie : p, { className: "h-4 w-4 text-accent-primary" }), /* @__PURE__ */ d("h2", {
148
168
  className: "text-base font-semibold text-text-primary",
149
- children: R === "announcement" ? j("eventfullymanaged.communication.compose.announcement", "Compose announcement") : j("eventfullymanaged.communication.compose.campaign", "Compose campaign")
169
+ children: I === "announcement" ? T("eventfullymanaged.communication.compose.announcement", "Compose announcement") : T("eventfullymanaged.communication.compose.campaign", "Compose campaign")
150
170
  })]
151
171
  }),
152
- /* @__PURE__ */ h("label", {
172
+ /* @__PURE__ */ f("label", {
153
173
  className: "block space-y-1 text-sm",
154
- children: [/* @__PURE__ */ m("span", {
174
+ children: [
175
+ /* @__PURE__ */ d("span", {
176
+ className: "font-medium text-text-primary",
177
+ children: T("eventfullymanaged.communication.fields.event", "Event (optional)")
178
+ }),
179
+ /* @__PURE__ */ f(ce, {
180
+ value: R,
181
+ onValueChange: z,
182
+ children: [/* @__PURE__ */ d(de, {
183
+ "aria-label": T("eventfullymanaged.communication.fields.event", "Event (optional)"),
184
+ children: /* @__PURE__ */ d(fe, { placeholder: T("eventfullymanaged.communication.fields.eventPlaceholder", "All events (workspace-wide)") })
185
+ }), /* @__PURE__ */ d(le, { children: ve.map((e) => /* @__PURE__ */ d(ue, {
186
+ value: e.id,
187
+ children: e.name
188
+ }, e.id)) })]
189
+ }),
190
+ /* @__PURE__ */ d("span", {
191
+ className: "block text-xs text-text-muted",
192
+ children: T("eventfullymanaged.communication.fields.eventHint", "Leave unset to notify every attendee across the workspace, or pick one event to notify only its attendees.")
193
+ })
194
+ ]
195
+ }),
196
+ /* @__PURE__ */ f("label", {
197
+ className: "block space-y-1 text-sm",
198
+ children: [/* @__PURE__ */ d("span", {
155
199
  className: "font-medium text-text-primary",
156
- children: j("eventfullymanaged.communication.fields.subject", "Subject")
157
- }), /* @__PURE__ */ m(T, {
200
+ children: T("eventfullymanaged.communication.fields.subject", "Subject")
201
+ }), /* @__PURE__ */ d(b, {
158
202
  value: B,
159
203
  onChange: (e) => V(e.target.value),
160
- placeholder: j("eventfullymanaged.communication.fields.subjectPlaceholder", "Q4 Product Roadmap Update"),
161
- "aria-label": j("eventfullymanaged.communication.fields.subject", "Subject")
204
+ placeholder: T("eventfullymanaged.communication.fields.subjectPlaceholder", "Q4 Product Roadmap Update"),
205
+ "aria-label": T("eventfullymanaged.communication.fields.subject", "Subject")
162
206
  })]
163
207
  }),
164
- /* @__PURE__ */ h("label", {
208
+ /* @__PURE__ */ f("label", {
165
209
  className: "block space-y-1 text-sm",
166
- children: [/* @__PURE__ */ m("span", {
167
- className: "font-medium text-text-primary",
168
- children: j("eventfullymanaged.communication.fields.audience", "Audience")
169
- }), /* @__PURE__ */ m(T, {
170
- value: H,
171
- onChange: (e) => U(e.target.value),
172
- placeholder: R === "campaign" ? j("eventfullymanaged.communication.fields.audienceSegmentsPlaceholder", "vip, early-bird, speakers (comma-separated segments)") : j("eventfullymanaged.communication.fields.audiencePlaceholder", "All attendees"),
173
- "aria-label": j("eventfullymanaged.communication.fields.audience", "Audience")
174
- })]
210
+ children: [
211
+ /* @__PURE__ */ d("span", {
212
+ className: "font-medium text-text-primary",
213
+ children: T("eventfullymanaged.communication.fields.audience", "Audience segments (optional)")
214
+ }),
215
+ /* @__PURE__ */ d(b, {
216
+ value: H,
217
+ onChange: (e) => U(e.target.value),
218
+ placeholder: T("eventfullymanaged.communication.fields.audienceSegmentsPlaceholder", "vip, early-bird, speakers (comma-separated segments)"),
219
+ "aria-label": T("eventfullymanaged.communication.fields.audience", "Audience segments (optional)")
220
+ }),
221
+ /* @__PURE__ */ d("span", {
222
+ className: "block text-xs text-text-muted",
223
+ children: T("eventfullymanaged.communication.fields.audienceHint", "Every resolved attendee is notified regardless; segments are passed along for the notification worker to filter by, if it supports them.")
224
+ })
225
+ ]
175
226
  }),
176
- /* @__PURE__ */ h("label", {
227
+ /* @__PURE__ */ f("label", {
177
228
  className: "block space-y-1 text-sm",
178
- children: [/* @__PURE__ */ m("span", {
229
+ children: [/* @__PURE__ */ d("span", {
179
230
  className: "font-medium text-text-primary",
180
- children: j("eventfullymanaged.communication.fields.body", "Message")
181
- }), /* @__PURE__ */ m(ne, {
231
+ children: T("eventfullymanaged.communication.fields.body", "Message")
232
+ }), /* @__PURE__ */ d(pe, {
182
233
  value: W,
183
234
  onChange: (e) => G(e.target.value),
184
235
  rows: 5,
185
- placeholder: j("eventfullymanaged.communication.fields.bodyPlaceholder", "Hi there, here are the latest updates…"),
186
- "aria-label": j("eventfullymanaged.communication.fields.body", "Message")
236
+ placeholder: T("eventfullymanaged.communication.fields.bodyPlaceholder", "Hi there, here are the latest updates…"),
237
+ "aria-label": T("eventfullymanaged.communication.fields.body", "Message")
187
238
  })]
188
239
  }),
189
- R === "campaign" ? /* @__PURE__ */ h("label", {
240
+ I === "campaign" ? /* @__PURE__ */ f("label", {
190
241
  className: "block space-y-1 text-sm",
191
242
  children: [
192
- /* @__PURE__ */ m("span", {
243
+ /* @__PURE__ */ d("span", {
193
244
  className: "font-medium text-text-primary",
194
- children: j("eventfullymanaged.communication.fields.scheduleAt", "Schedule send (optional)")
245
+ children: T("eventfullymanaged.communication.fields.scheduleAt", "Schedule send (optional)")
195
246
  }),
196
- /* @__PURE__ */ m(T, {
247
+ /* @__PURE__ */ d(b, {
197
248
  type: "datetime-local",
198
249
  value: K,
199
250
  onChange: (e) => q(e.target.value),
200
- "aria-label": j("eventfullymanaged.communication.fields.scheduleAt", "Schedule send (optional)")
251
+ "aria-label": T("eventfullymanaged.communication.fields.scheduleAt", "Schedule send (optional)")
201
252
  }),
202
- /* @__PURE__ */ m("span", {
253
+ /* @__PURE__ */ d("span", {
203
254
  className: "block text-xs text-text-muted",
204
- children: j("eventfullymanaged.communication.fields.scheduleHint", "Leave blank to send immediately when you click Send campaign.")
255
+ children: T("eventfullymanaged.communication.fields.scheduleHint", "Leave blank to send immediately when you click Send campaign. A future time is not sent automatically — you (or anyone with access) must click Send campaign again at or after that time. Times are in your browser’s local time zone.")
205
256
  })
206
257
  ]
207
258
  }) : null,
208
- /* @__PURE__ */ m("div", {
259
+ /* @__PURE__ */ d("div", {
209
260
  className: "flex justify-end",
210
- children: /* @__PURE__ */ m(S, {
261
+ children: /* @__PURE__ */ d(_, {
211
262
  type: "button",
212
263
  disabled: Q,
213
- onClick: le,
214
- children: Q ? j("eventfullymanaged.communication.actions.saving", "Saving…") : j(R === "announcement" ? "eventfullymanaged.communication.actions.createAnnouncement" : "eventfullymanaged.communication.actions.createCampaign", "Create draft")
264
+ onClick: ye,
265
+ children: Q ? T("eventfullymanaged.communication.actions.saving", "Saving…") : T(I === "announcement" ? "eventfullymanaged.communication.actions.createAnnouncement" : "eventfullymanaged.communication.actions.createCampaign", "Create draft")
215
266
  })
216
267
  })
217
268
  ]
218
- }), /* @__PURE__ */ h("div", {
269
+ }), /* @__PURE__ */ f("div", {
219
270
  className: "rounded-card border border-border-seam bg-bg-surface p-4",
220
- children: [/* @__PURE__ */ h("div", {
271
+ children: [/* @__PURE__ */ f("div", {
221
272
  className: "flex items-center justify-between border-b border-border-seam pb-2",
222
- children: [/* @__PURE__ */ h("span", {
273
+ children: [/* @__PURE__ */ f("span", {
223
274
  className: "flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-text-muted",
224
- children: [/* @__PURE__ */ m(g, { className: "h-3.5 w-3.5" }), j("eventfullymanaged.communication.preview.label", "Preview")]
225
- }), /* @__PURE__ */ m(x, {
275
+ children: [/* @__PURE__ */ d(p, { className: "h-3.5 w-3.5" }), T("eventfullymanaged.communication.preview.label", "Preview")]
276
+ }), /* @__PURE__ */ d(g, {
226
277
  variant: "info",
227
278
  className: "uppercase",
228
- children: j("eventfullymanaged.communication.preview.draft", "Draft")
279
+ children: T("eventfullymanaged.communication.preview.draft", "Draft")
229
280
  })]
230
- }), /* @__PURE__ */ h("div", {
281
+ }), /* @__PURE__ */ f("div", {
231
282
  className: "mt-3 space-y-2",
232
283
  children: [
233
- /* @__PURE__ */ m("p", {
284
+ /* @__PURE__ */ d("p", {
234
285
  className: "text-base font-semibold text-text-primary",
235
- children: B.trim() || j("eventfullymanaged.communication.preview.noSubject", "Your subject line")
286
+ children: B.trim() || T("eventfullymanaged.communication.preview.noSubject", "Your subject line")
236
287
  }),
237
- H.trim() ? /* @__PURE__ */ h("p", {
288
+ H.trim() ? /* @__PURE__ */ f("p", {
238
289
  className: "text-xs text-text-secondary",
239
290
  children: [
240
- j("eventfullymanaged.communication.preview.to", "To"),
291
+ T("eventfullymanaged.communication.preview.to", "To"),
241
292
  ": ",
242
293
  H.trim()
243
294
  ]
244
295
  }) : null,
245
- /* @__PURE__ */ m("p", {
296
+ /* @__PURE__ */ d("p", {
246
297
  className: "whitespace-pre-wrap text-sm text-text-secondary",
247
- children: W.trim() || j("eventfullymanaged.communication.preview.noBody", "Start typing to see your message preview here.")
298
+ children: W.trim() || T("eventfullymanaged.communication.preview.noBody", "Start typing to see your message preview here.")
248
299
  })
249
300
  ]
250
301
  })]
251
302
  })]
252
303
  })
253
304
  }),
254
- /* @__PURE__ */ h("div", {
305
+ /* @__PURE__ */ f("div", {
255
306
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
256
- children: [/* @__PURE__ */ h(C, {
307
+ children: [/* @__PURE__ */ f(v, {
257
308
  treatment: "plain",
258
309
  className: "border-border-seam p-5",
259
- children: [/* @__PURE__ */ h("div", {
310
+ children: [/* @__PURE__ */ f("div", {
260
311
  className: "flex items-center justify-between",
261
- children: [/* @__PURE__ */ m("h2", {
312
+ children: [/* @__PURE__ */ d("h2", {
262
313
  className: "text-lg font-semibold text-text-primary",
263
- children: j("eventfullymanaged.communication.announcements.heading", "Announcements")
264
- }), Y > 0 ? /* @__PURE__ */ m("span", {
314
+ children: T("eventfullymanaged.communication.announcements.heading", "Announcements")
315
+ }), Y > 0 ? /* @__PURE__ */ d("span", {
265
316
  className: "text-sm text-text-muted",
266
317
  children: Y
267
318
  }) : null]
268
- }), /* @__PURE__ */ h("div", {
319
+ }), /* @__PURE__ */ f("div", {
269
320
  className: "mt-4",
270
- children: [P.loading && J.length === 0 ? /* @__PURE__ */ m("p", {
321
+ children: [O.loading && J.length === 0 ? /* @__PURE__ */ d("p", {
271
322
  className: "py-8 text-center text-sm text-text-secondary",
272
- children: j("eventfullymanaged.communication.announcements.loading", "Loading announcements…")
273
- }) : J.length === 0 ? /* @__PURE__ */ m(w, {
323
+ children: T("eventfullymanaged.communication.announcements.loading", "Loading announcements…")
324
+ }) : J.length === 0 ? /* @__PURE__ */ d(y, {
274
325
  illustration: "empty-data",
275
- title: j("eventfullymanaged.communication.announcements.empty", "No announcements yet."),
326
+ title: T("eventfullymanaged.communication.announcements.empty", "No announcements yet."),
276
327
  className: "py-8"
277
- }) : /* @__PURE__ */ m("ul", {
328
+ }) : /* @__PURE__ */ d("ul", {
278
329
  className: "space-y-2.5",
279
- children: J.map((e) => /* @__PURE__ */ h("li", {
330
+ children: J.map((e) => /* @__PURE__ */ f("li", {
280
331
  className: "flex items-center justify-between gap-3 rounded-card border border-border-seam bg-bg-surface p-3 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1",
281
- children: [/* @__PURE__ */ m("p", {
332
+ children: [/* @__PURE__ */ d("p", {
282
333
  className: "min-w-0 truncate font-medium text-text-primary",
283
- children: k(e, j("eventfullymanaged.communication.announcements.itemPrefix", "Announcement"))
284
- }), /* @__PURE__ */ h("div", {
334
+ children: C(e, T("eventfullymanaged.communication.announcements.itemPrefix", "Announcement"))
335
+ }), /* @__PURE__ */ f("div", {
285
336
  className: "flex shrink-0 items-center gap-2",
286
- children: [e.status ? /* @__PURE__ */ m(x, {
287
- variant: D(e.status),
337
+ children: [e.status ? /* @__PURE__ */ d(g, {
338
+ variant: x(e.status),
288
339
  className: "uppercase",
289
340
  children: e.status
290
- }) : null, O(e.status) ? /* @__PURE__ */ h(S, {
341
+ }) : null, S(e.status) ? /* @__PURE__ */ f(_, {
291
342
  type: "button",
292
343
  size: "sm",
293
- disabled: oe,
294
- onClick: () => void ue(e),
295
- children: [/* @__PURE__ */ m(b, { className: "h-3.5 w-3.5" }), j("eventfullymanaged.communication.actions.publish", "Publish")]
344
+ disabled: A,
345
+ onClick: () => void be(e),
346
+ children: [/* @__PURE__ */ d(h, { className: "h-3.5 w-3.5" }), T("eventfullymanaged.communication.actions.publish", "Publish")]
296
347
  }) : null]
297
348
  })]
298
349
  }, e.id))
299
- }), /* @__PURE__ */ m(o, {
300
- offset: M.offset,
301
- limit: M.limit,
350
+ }), /* @__PURE__ */ d(i, {
351
+ offset: E.offset,
352
+ limit: E.limit,
302
353
  loadedCount: J.length,
303
354
  total: Y,
304
- onPrev: M.prevPage,
305
- onNext: M.nextPage,
306
- itemLabel: j("eventfullymanaged.communication.announcements.heading", "Announcements").toLowerCase(),
307
- loading: P.loading
355
+ onPrev: E.prevPage,
356
+ onNext: E.nextPage,
357
+ itemLabel: T("eventfullymanaged.communication.announcements.heading", "Announcements").toLowerCase(),
358
+ loading: O.loading
308
359
  })]
309
360
  })]
310
- }), /* @__PURE__ */ h(C, {
361
+ }), /* @__PURE__ */ f(v, {
311
362
  treatment: "plain",
312
363
  className: "border-border-seam p-5",
313
- children: [/* @__PURE__ */ h("div", {
364
+ children: [/* @__PURE__ */ f("div", {
314
365
  className: "flex items-center justify-between",
315
- children: [/* @__PURE__ */ m("h2", {
366
+ children: [/* @__PURE__ */ d("h2", {
316
367
  className: "text-lg font-semibold text-text-primary",
317
- children: j("eventfullymanaged.communication.campaigns.heading", "Campaigns")
318
- }), Z > 0 ? /* @__PURE__ */ m("span", {
368
+ children: T("eventfullymanaged.communication.campaigns.heading", "Campaigns")
369
+ }), Z > 0 ? /* @__PURE__ */ d("span", {
319
370
  className: "text-sm text-text-muted",
320
371
  children: Z
321
372
  }) : null]
322
- }), /* @__PURE__ */ h("div", {
373
+ }), /* @__PURE__ */ f("div", {
323
374
  className: "mt-4",
324
- children: [F.loading && X.length === 0 ? /* @__PURE__ */ m("p", {
375
+ children: [k.loading && X.length === 0 ? /* @__PURE__ */ d("p", {
325
376
  className: "py-8 text-center text-sm text-text-secondary",
326
- children: j("eventfullymanaged.communication.campaigns.loading", "Loading campaigns…")
327
- }) : X.length === 0 ? /* @__PURE__ */ m(w, {
377
+ children: T("eventfullymanaged.communication.campaigns.loading", "Loading campaigns…")
378
+ }) : X.length === 0 ? /* @__PURE__ */ d(y, {
328
379
  illustration: "empty-data",
329
- title: j("eventfullymanaged.communication.campaigns.empty", "No campaigns yet."),
380
+ title: T("eventfullymanaged.communication.campaigns.empty", "No campaigns yet."),
330
381
  className: "py-8"
331
- }) : /* @__PURE__ */ m("ul", {
382
+ }) : /* @__PURE__ */ d("ul", {
332
383
  className: "space-y-2.5",
333
384
  children: X.map((e) => {
334
- let t = E(e);
335
- return /* @__PURE__ */ h("li", {
385
+ let t = me(e);
386
+ return /* @__PURE__ */ f("li", {
336
387
  className: "flex items-center justify-between gap-3 rounded-card border border-border-seam bg-bg-surface p-3 transition-[box-shadow,border-color] duration-200 hover:border-border-strong hover:shadow-elevation-1",
337
- children: [/* @__PURE__ */ h("div", {
388
+ children: [/* @__PURE__ */ f("div", {
338
389
  className: "min-w-0",
339
- children: [/* @__PURE__ */ m("p", {
390
+ children: [/* @__PURE__ */ d("p", {
340
391
  className: "truncate font-medium text-text-primary",
341
- children: k(e, j("eventfullymanaged.communication.campaigns.itemPrefix", "Campaign"))
342
- }), t ? /* @__PURE__ */ h("p", {
392
+ children: C(e, T("eventfullymanaged.communication.campaigns.itemPrefix", "Campaign"))
393
+ }), t ? /* @__PURE__ */ f("p", {
343
394
  className: "truncate text-xs text-text-muted",
344
395
  children: [
345
- j("eventfullymanaged.communication.campaigns.scheduledFor", "Scheduled for"),
396
+ T("eventfullymanaged.communication.campaigns.scheduledFor", "Scheduled for"),
346
397
  " ",
347
398
  new Date(t).toLocaleString()
348
399
  ]
349
400
  }) : null]
350
- }), /* @__PURE__ */ h("div", {
401
+ }), /* @__PURE__ */ f("div", {
351
402
  className: "flex shrink-0 items-center gap-2",
352
- children: [e.status ? /* @__PURE__ */ m(x, {
353
- variant: D(e.status),
354
- className: "uppercase",
355
- children: e.status
356
- }) : null, O(e.status) ? /* @__PURE__ */ h(S, {
357
- type: "button",
358
- size: "sm",
359
- disabled: L,
360
- onClick: () => void de(e),
361
- children: [/* @__PURE__ */ m(y, { className: "h-3.5 w-3.5" }), j("eventfullymanaged.communication.actions.send", "Send campaign")]
362
- }) : null]
403
+ children: [
404
+ e.status ? /* @__PURE__ */ d(g, {
405
+ variant: x(e.status),
406
+ className: "uppercase",
407
+ children: e.status
408
+ }) : null,
409
+ S(e.status) ? /* @__PURE__ */ f(_, {
410
+ type: "button",
411
+ size: "sm",
412
+ disabled: P,
413
+ onClick: () => void xe(e),
414
+ children: [/* @__PURE__ */ d(ae, { className: "h-3.5 w-3.5" }), T("eventfullymanaged.communication.actions.send", "Send campaign")]
415
+ }) : null,
416
+ (e.status ?? "").toLowerCase() === "scheduled" ? /* @__PURE__ */ d(_, {
417
+ type: "button",
418
+ size: "sm",
419
+ variant: "outline",
420
+ onClick: () => void Se(e),
421
+ children: T("eventfullymanaged.communication.actions.cancelSchedule", "Cancel schedule")
422
+ }) : null
423
+ ]
363
424
  })]
364
425
  }, e.id);
365
426
  })
366
- }), /* @__PURE__ */ m(o, {
367
- offset: N.offset,
368
- limit: N.limit,
427
+ }), /* @__PURE__ */ d(i, {
428
+ offset: D.offset,
429
+ limit: D.limit,
369
430
  loadedCount: X.length,
370
431
  total: Z,
371
- onPrev: N.prevPage,
372
- onNext: N.nextPage,
373
- itemLabel: j("eventfullymanaged.communication.campaigns.heading", "Campaigns").toLowerCase(),
374
- loading: F.loading
432
+ onPrev: D.prevPage,
433
+ onNext: D.nextPage,
434
+ itemLabel: T("eventfullymanaged.communication.campaigns.heading", "Campaigns").toLowerCase(),
435
+ loading: k.loading
375
436
  })]
376
437
  })]
377
438
  })]
@@ -379,6 +440,6 @@ function A() {
379
440
  ]
380
441
  });
381
442
  }
382
- export { A as default };
443
+ export { w as default };
383
444
 
384
445
  //# sourceMappingURL=CommunicationPage.js.map