@burdenoff/microfe-newsletter 2026.830.1 → 2026.830.2

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.
Files changed (28) hide show
  1. package/dist/newsletter/AdminNewsletterRoot.js +4 -4
  2. package/dist/newsletter/UserNewsletterRoot.js +4 -4
  3. package/dist/newsletter/pages/ABTestingPage.js +23 -23
  4. package/dist/newsletter/pages/ABTestingPage.js.map +1 -1
  5. package/dist/newsletter/pages/AnalyticsDashboardPage.js +95 -97
  6. package/dist/newsletter/pages/AnalyticsDashboardPage.js.map +1 -1
  7. package/dist/newsletter/pages/CampaignAnalyticsPage.js +3 -3
  8. package/dist/newsletter/pages/CampaignEditorPage.js +297 -300
  9. package/dist/newsletter/pages/CampaignEditorPage.js.map +1 -1
  10. package/dist/newsletter/pages/CampaignsListPage.js +14 -14
  11. package/dist/newsletter/pages/CompliancePage.js +175 -184
  12. package/dist/newsletter/pages/CompliancePage.js.map +1 -1
  13. package/dist/newsletter/pages/SchedulerPage.js +3 -3
  14. package/dist/newsletter/pages/SubscriberDetailPage.js +222 -222
  15. package/dist/newsletter/pages/SubscriberDetailPage.js.map +1 -1
  16. package/dist/newsletter/pages/SubscribersListPage.js +279 -282
  17. package/dist/newsletter/pages/SubscribersListPage.js.map +1 -1
  18. package/dist/newsletter/pages/TemplateEditorPage.js +3 -3
  19. package/dist/newsletter/pages/TemplateLibraryPage.js +109 -112
  20. package/dist/newsletter/pages/TemplateLibraryPage.js.map +1 -1
  21. package/dist/newsletter/pages/WaitlistDetailPage.js +3 -3
  22. package/dist/newsletter/pages/WaitlistListPage.js +139 -139
  23. package/dist/newsletter/pages/WaitlistListPage.js.map +1 -1
  24. package/dist/newsletter/providers/NewsletterProvider.js +47 -46
  25. package/dist/newsletter/providers/NewsletterProvider.js.map +1 -1
  26. package/dist/newsletter/shared/hooks/useTr.js +3 -3
  27. package/dist/newsletter/shared/hooks/useTr.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,534 +1,531 @@
1
1
  import { useNewsletterStore as e } from "../store/newsletterStore.js";
2
2
  import { useExportSubscribers as t, usePlatformProducts as n, useSubscriberMutations as r, useSubscribers as i } from "../hooks/useNewsletterOperations.js";
3
- import { useNewsletter as a } from "../providers/NewsletterProvider.js";
4
- import { NEWSLETTER_PERMISSIONS as o } from "../constants/permissions.js";
5
- import { useTr as s } from "../shared/hooks/useTr.js";
3
+ import { useTr as a } from "../shared/hooks/useTr.js";
4
+ import { useNewsletter as o } from "../providers/NewsletterProvider.js";
5
+ import { NEWSLETTER_PERMISSIONS as s } from "../constants/permissions.js";
6
6
  import { nativeConfirm as c, nativeNotify as l } from "../../utils/nativeBridge.js";
7
- import { useCallback as u, useRef as d, useState as f } from "react";
7
+ import { useRef as u, useState as d } from "react";
8
8
  import { AccessDenied as ee } from "@burdenoff/fe-libs/shared/components";
9
9
  import { useNavigate as te } from "react-router";
10
- import { AlertCircle as ne, CheckCircle as re, Download as ie, Filter as ae, Loader2 as p, Mail as m, MailX as h, Plus as g, RefreshCw as oe, Search as se, Trash2 as _, Upload as v, Users as ce, X as y } from "lucide-react";
10
+ import { AlertCircle as ne, CheckCircle as re, Download as ie, Filter as ae, Loader2 as f, Mail as p, MailX as m, Plus as h, RefreshCw as oe, Search as se, Trash2 as g, Upload as _, Users as ce, X as v } from "lucide-react";
11
11
  import { usePermissions as le } from "@burdenoff/fe-libs/shared/providers/shell";
12
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
13
- import { AuroraBackground as ue, Button as S, CTAOverflowMenu as de, EmphasisPanel as fe, GradientText as pe, IllustratedEmptyState as C, PagePurpose as me } from "@burdenoff/fe-libs/ui";
14
- import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
14
+ import { AuroraBackground as de, Button as x, CTAOverflowMenu as fe, EmphasisPanel as pe, GradientText as me, IllustratedEmptyState as S, PagePurpose as he } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/newsletter/pages/SubscribersListPage.tsx
16
- function w(e, t, n) {
16
+ function C(e, t, n) {
17
17
  return e ? n.find((t) => t.id === e)?.name ?? e.slice(0, 8) : t;
18
18
  }
19
- function T() {
20
- let { t: s, locale: _ } = he(), T = u((e, t) => {
21
- let n = s(e);
22
- return n === e ? t : n;
23
- }, [s]), _e = te(), { productId: E } = a(), { hasPermission: D, isLoading: O, permissions: k } = le(), { subscriberFilter: A, updateSubscriberFilter: j } = e(), M = (Array.isArray(k) ? k : k?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:subscribers:")), ve = M ? D(o.SUBSCRIBER_LIST) : !0, ye = M ? D(o.SUBSCRIBER_CREATE) : !0, be = M ? D(o.SUBSCRIBER_DELETE) : !0, xe = M ? D(o.SUBSCRIBER_IMPORT) : !0, Se = M ? D(o.SUBSCRIBER_EXPORT) : !0, [Ce, N] = f(!1), [we, P] = f(!1), [F, I] = f(""), [L, R] = f(""), [z, B] = f(/* @__PURE__ */ new Set()), [V, H] = f(null), Te = d(null), { subscribers: U, totalCount: W, loading: G, error: K, refetch: q } = i({
19
+ function w() {
20
+ let { locale: g } = ue(), w = a(), _e = te(), { productId: T } = o(), { hasPermission: E, isLoading: D, permissions: O } = le(), { subscriberFilter: k, updateSubscriberFilter: A } = e(), j = (Array.isArray(O) ? O : O?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:subscribers:")), ve = j ? E(s.SUBSCRIBER_LIST) : !0, ye = j ? E(s.SUBSCRIBER_CREATE) : !0, be = j ? E(s.SUBSCRIBER_DELETE) : !0, xe = j ? E(s.SUBSCRIBER_IMPORT) : !0, Se = j ? E(s.SUBSCRIBER_EXPORT) : !0, [Ce, M] = d(!1), [we, N] = d(!1), [P, F] = d(""), [I, L] = d(""), [R, z] = d(/* @__PURE__ */ new Set()), [B, V] = d(null), H = u(null), { subscribers: U, totalCount: W, loading: G, error: K, refetch: q } = i({
24
21
  subscribed: (() => {
25
- if (A.status === "ACTIVE") return !0;
26
- if (A.status === "UNSUBSCRIBED") return !1;
22
+ if (k.status === "ACTIVE") return !0;
23
+ if (k.status === "UNSUBSCRIBED") return !1;
27
24
  })(),
28
- platformProductId: E
29
- }), { subscribe: Ee, unsubscribeFromProduct: De, resubscribeToProduct: Oe, deleteSubscriber: ke, importSubscribers: Ae, subscribing: J, unsubscribing: je, deletingSubscriber: Me, importing: Y } = r(), { exportSubscribers: Ne } = t(void 0, E), { products: X } = n(), Z = U.filter((e) => {
30
- if (!A.search) return !0;
31
- let t = A.search.toLowerCase();
25
+ platformProductId: T
26
+ }), { subscribe: Te, unsubscribeFromProduct: Ee, resubscribeToProduct: De, deleteSubscriber: Oe, importSubscribers: ke, subscribing: J, unsubscribing: Ae, deletingSubscriber: je, importing: Y } = r(), { exportSubscribers: Me } = t(void 0, T), { products: X } = n(), Z = U.filter((e) => {
27
+ if (!k.search) return !0;
28
+ let t = k.search.toLowerCase();
32
29
  return e.email.toLowerCase().includes(t);
33
- }), Pe = U.filter((e) => e.subscribed && e.status !== "UNSUBSCRIBED").length, Fe = U.filter((e) => !e.subscribed || e.status === "UNSUBSCRIBED").length, Q = (e, t) => {
34
- H({
30
+ }), Ne = U.filter((e) => e.subscribed && e.status !== "UNSUBSCRIBED").length, Pe = U.filter((e) => !e.subscribed || e.status === "UNSUBSCRIBED").length, Q = (e, t) => {
31
+ V({
35
32
  type: e,
36
33
  message: t
37
- }), setTimeout(() => H(null), 5e3);
34
+ }), setTimeout(() => V(null), 5e3);
35
+ }, Fe = (e) => {
36
+ A({ search: e });
38
37
  }, Ie = (e) => {
39
- j({ search: e });
40
- }, Le = (e) => {
41
- j({ status: e });
42
- }, Re = async () => {
38
+ A({ status: e });
39
+ }, Le = async () => {
43
40
  try {
44
- let e = await Ne();
41
+ let e = await Me();
45
42
  if (e.data?.exportSubscribers) {
46
43
  let t = [[
47
- T("newsletter.email", "Email"),
48
- T("newsletterCommon.status", "Status"),
49
- T("subscribers.subscribedAt", "Subscribed At"),
50
- T("subscribers.unsubscribedAt", "Unsubscribed At")
44
+ w("newsletter.email", "Email"),
45
+ w("newsletterCommon.status", "Status"),
46
+ w("subscribers.subscribedAt", "Subscribed At"),
47
+ w("subscribers.unsubscribedAt", "Unsubscribed At")
51
48
  ].join(","), ...e.data.exportSubscribers.map((e) => `${e.email},${e.status},${e.subscribedAt},${e.unsubscribedAt || ""}`)].join("\n"), n = new Blob([t], { type: "text/csv" }), r = window.URL.createObjectURL(n), i = document.createElement("a");
52
- i.href = r, i.download = `${T("subscribers.exportFilenamePrefix", "subscribers")}-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.csv`, i.click(), window.URL.revokeObjectURL(r), Q("success", T("subscribers.exportedSuccessfully", "Subscribers exported successfully"));
49
+ i.href = r, i.download = `${w("subscribers.exportFilenamePrefix", "subscribers")}-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.csv`, i.click(), window.URL.revokeObjectURL(r), Q("success", w("subscribers.exportedSuccessfully", "Subscribers exported successfully"));
53
50
  }
54
51
  } catch (e) {
55
- Q("error", `${T("subscribers.failedToExport", "Failed to export")}: ${e instanceof Error ? e.message : T("newsletter.unknownError", "Unknown error")}`);
52
+ Q("error", `${w("subscribers.failedToExport", "Failed to export")}: ${e instanceof Error ? e.message : w("newsletter.unknownError", "Unknown error")}`);
56
53
  }
57
54
  }, $ = async () => {
58
- if (!F.trim()) {
59
- Q("error", T("subscribers.pleaseEnterEmail", "Please enter an email address"));
55
+ if (!P.trim()) {
56
+ Q("error", w("subscribers.pleaseEnterEmail", "Please enter an email address"));
60
57
  return;
61
58
  }
62
59
  try {
63
- Q("success", (await Ee({
64
- email: F.trim(),
65
- platformProductId: E
66
- }))?.alreadySubscribed ? `${F} ${T("subscribers.alreadySubscribedSuffix", "is already part of this newsletter")}` : `${F} ${T("subscribers.addedSuccessfully", "added successfully")}`), I(""), N(!1);
60
+ Q("success", (await Te({
61
+ email: P.trim(),
62
+ platformProductId: T
63
+ }))?.alreadySubscribed ? `${P} ${w("subscribers.alreadySubscribedSuffix", "is already part of this newsletter")}` : `${P} ${w("subscribers.addedSuccessfully", "added successfully")}`), F(""), M(!1);
67
64
  } catch (e) {
68
- Q("error", `${T("subscribers.failedToAddSubscriber", "Failed to add subscriber")}: ${e instanceof Error ? e.message : T("newsletter.unknownError", "Unknown error")}`);
65
+ Q("error", `${w("subscribers.failedToAddSubscriber", "Failed to add subscriber")}: ${e instanceof Error ? e.message : w("newsletter.unknownError", "Unknown error")}`);
69
66
  }
70
- }, ze = async () => {
71
- if (!L.trim()) {
72
- Q("error", T("subscribers.pleaseEnterEmails", "Please enter email addresses"));
67
+ }, Re = async () => {
68
+ if (!I.trim()) {
69
+ Q("error", w("subscribers.pleaseEnterEmails", "Please enter email addresses"));
73
70
  return;
74
71
  }
75
72
  try {
76
- let e = L.split(/[\n,]/).map((e) => e.trim()).filter((e) => e && e.includes("@"));
73
+ let e = I.split(/[\n,]/).map((e) => e.trim()).filter((e) => e && e.includes("@"));
77
74
  if (e.length === 0) {
78
- Q("error", T("subscribers.noValidEmails", "No valid email addresses found"));
75
+ Q("error", w("subscribers.noValidEmails", "No valid email addresses found"));
79
76
  return;
80
77
  }
81
- let t = await Ae(e.map((e) => ({
78
+ let t = await ke(e.map((e) => ({
82
79
  email: e,
83
- platformProductId: E
80
+ platformProductId: T
84
81
  })));
85
- t && (Q("success", `${T("subscribers.importedPrefix", "Imported")} ${t.imported} ${T("subscribers.subscribersLower", "subscribers")}. ${T("subscribers.skipped", "Skipped")}: ${t.skipped}, ${T("subscribers.failed", "Failed")}: ${t.failed}`), R(""), P(!1));
82
+ t && (Q("success", `${w("subscribers.importedPrefix", "Imported")} ${t.imported} ${w("subscribers.subscribersLower", "subscribers")}. ${w("subscribers.skipped", "Skipped")}: ${t.skipped}, ${w("subscribers.failed", "Failed")}: ${t.failed}`), L(""), N(!1));
86
83
  } catch (e) {
87
- Q("error", `${T("subscribers.failedToImport", "Failed to import")}: ${e instanceof Error ? e.message : T("newsletter.unknownError", "Unknown error")}`);
84
+ Q("error", `${w("subscribers.failedToImport", "Failed to import")}: ${e instanceof Error ? e.message : w("newsletter.unknownError", "Unknown error")}`);
88
85
  }
89
- }, Be = (e) => {
86
+ }, ze = (e) => {
90
87
  let t = e.target.files?.[0];
91
88
  if (!t) return;
92
89
  let n = new FileReader();
93
90
  n.onload = (e) => {
94
- R(e.target?.result);
91
+ L(e.target?.result);
95
92
  }, n.readAsText(t);
96
- }, Ve = async (e) => {
97
- if (confirm(`${T("subscribers.confirmUnsubscribePrefix", "Are you sure you want to unsubscribe")} ${e}?`)) try {
98
- await De(e, E), Q("success", `${e} ${T("subscribers.unsubscribedSuffix", "unsubscribed")}`);
93
+ }, Be = async (e) => {
94
+ if (confirm(`${w("subscribers.confirmUnsubscribePrefix", "Are you sure you want to unsubscribe")} ${e}?`)) try {
95
+ await Ee(e, T), Q("success", `${e} ${w("subscribers.unsubscribedSuffix", "unsubscribed")}`);
99
96
  } catch (e) {
100
- Q("error", `${T("subscribers.failedToUnsubscribe", "Failed to unsubscribe")}: ${e instanceof Error ? e.message : T("newsletter.unknownError", "Unknown error")}`);
97
+ Q("error", `${w("subscribers.failedToUnsubscribe", "Failed to unsubscribe")}: ${e instanceof Error ? e.message : w("newsletter.unknownError", "Unknown error")}`);
101
98
  }
102
- }, He = async (e) => {
99
+ }, Ve = async (e) => {
103
100
  try {
104
- await Oe(e, E), Q("success", `${e} ${T("subscribers.resubscribedSuffix", "resubscribed")}`);
101
+ await De(e, T), Q("success", `${e} ${w("subscribers.resubscribedSuffix", "resubscribed")}`);
105
102
  } catch (e) {
106
- Q("error", `${T("subscribers.failedToResubscribe", "Failed to resubscribe")}: ${e instanceof Error ? e.message : T("newsletter.unknownError", "Unknown error")}`);
103
+ Q("error", `${w("subscribers.failedToResubscribe", "Failed to resubscribe")}: ${e instanceof Error ? e.message : w("newsletter.unknownError", "Unknown error")}`);
107
104
  }
108
- }, Ue = async (e, t) => {
105
+ }, He = async (e, t) => {
109
106
  if (await c({
110
- title: T("subscribers.deleteSubscriber", "Delete Subscriber"),
111
- message: `${T("subscribers.confirmDeletePrefix", "Are you sure you want to delete")} ${t}? ${T("newsletter.actionCannotBeUndone", "This action cannot be undone.")}`
107
+ title: w("subscribers.deleteSubscriber", "Delete Subscriber"),
108
+ message: `${w("subscribers.confirmDeletePrefix", "Are you sure you want to delete")} ${t}? ${w("newsletter.actionCannotBeUndone", "This action cannot be undone.")}`
112
109
  }) !== !1) try {
113
- await ke(e), l("success"), Q("success", `${t} ${T("newsletter.deletedSuffix", "deleted")}`);
110
+ await Oe(e), l("success"), Q("success", `${t} ${w("newsletter.deletedSuffix", "deleted")}`);
114
111
  } catch (e) {
115
- l("error"), Q("error", `${T("templates.failedToDelete", "Failed to delete")}: ${e instanceof Error ? e.message : T("newsletter.unknownError", "Unknown error")}`);
112
+ l("error"), Q("error", `${w("templates.failedToDelete", "Failed to delete")}: ${e instanceof Error ? e.message : w("newsletter.unknownError", "Unknown error")}`);
116
113
  }
117
- }, We = () => {
118
- z.size === Z.length ? B(/* @__PURE__ */ new Set()) : B(new Set(Z.map((e) => e.id)));
114
+ }, Ue = () => {
115
+ R.size === Z.length ? z(/* @__PURE__ */ new Set()) : z(new Set(Z.map((e) => e.id)));
116
+ }, We = (e) => {
117
+ let t = new Set(R);
118
+ t.has(e) ? t.delete(e) : t.add(e), z(t);
119
119
  }, Ge = (e) => {
120
- let t = new Set(z);
121
- t.has(e) ? t.delete(e) : t.add(e), B(t);
122
- }, Ke = (e) => {
123
120
  _e(e);
124
- }, qe = (e) => new Date(e).toLocaleDateString(_ || "en-US", {
121
+ }, Ke = (e) => new Date(e).toLocaleDateString(g || "en-US", {
125
122
  month: "short",
126
123
  day: "numeric",
127
124
  year: "numeric"
128
125
  });
129
- return O ? /* @__PURE__ */ b("div", {
126
+ return D ? /* @__PURE__ */ y("div", {
130
127
  className: "flex items-center justify-center h-full",
131
- children: /* @__PURE__ */ x("div", {
128
+ children: /* @__PURE__ */ b("div", {
132
129
  className: "flex items-center gap-2 text-text-secondary",
133
- children: [/* @__PURE__ */ b(p, {
130
+ children: [/* @__PURE__ */ y(f, {
134
131
  className: "animate-spin",
135
132
  size: 24
136
- }), /* @__PURE__ */ b("span", { children: T("newsletterCommon.loading", "Loading...") })]
133
+ }), /* @__PURE__ */ y("span", { children: w("newsletterCommon.loading", "Loading...") })]
137
134
  })
138
- }) : !O && k && k.permissionStrings?.length > 0 && !ve ? /* @__PURE__ */ b(ee, {}) : /* @__PURE__ */ x("div", {
135
+ }) : !D && O && O.permissionStrings?.length > 0 && !ve ? /* @__PURE__ */ y(ee, {}) : /* @__PURE__ */ b("div", {
139
136
  className: "flex flex-col h-full",
140
137
  children: [
141
- V && /* @__PURE__ */ x("div", {
142
- className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-[var(--shadow-pop)] ${V.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border border-status-success-border/20" : "bg-status-error-bg-subtle text-status-error-text border border-status-error-border/20"}`,
143
- children: [V.type === "success" ? /* @__PURE__ */ b(re, { size: 20 }) : /* @__PURE__ */ b(ne, { size: 20 }), /* @__PURE__ */ b("span", { children: V.message })]
138
+ B && /* @__PURE__ */ b("div", {
139
+ className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-[var(--shadow-pop)] ${B.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border border-status-success-border/20" : "bg-status-error-bg-subtle text-status-error-text border border-status-error-border/20"}`,
140
+ children: [B.type === "success" ? /* @__PURE__ */ y(re, { size: 20 }) : /* @__PURE__ */ y(ne, { size: 20 }), /* @__PURE__ */ y("span", { children: B.message })]
144
141
  }),
145
- /* @__PURE__ */ x("div", {
142
+ /* @__PURE__ */ b("div", {
146
143
  className: "relative overflow-hidden flex items-center justify-between p-6 border-b border-border-seam",
147
144
  children: [
148
- /* @__PURE__ */ b(ue, { intensity: "subtle" }),
149
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
145
+ /* @__PURE__ */ y(de, { intensity: "subtle" }),
146
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
150
147
  className: "text-2xl font-semibold text-text-primary",
151
- children: /* @__PURE__ */ b(pe, { children: T("subscribers.subscribers", "Subscribers") })
152
- }), /* @__PURE__ */ x("p", {
148
+ children: /* @__PURE__ */ y(me, { children: w("subscribers.subscribers", "Subscribers") })
149
+ }), /* @__PURE__ */ b("p", {
153
150
  className: "mt-1 text-sm text-text-secondary tabular-nums",
154
151
  children: [
155
152
  W,
156
153
  " ",
157
- T("subscribers.totalSubscribers", "total subscribers")
154
+ w("subscribers.totalSubscribers", "total subscribers")
158
155
  ]
159
156
  })] }),
160
- /* @__PURE__ */ x("div", {
157
+ /* @__PURE__ */ b("div", {
161
158
  className: "flex items-center gap-2",
162
- children: [/* @__PURE__ */ b(S, {
159
+ children: [/* @__PURE__ */ y(x, {
163
160
  type: "button",
164
161
  variant: "outline",
165
162
  size: "icon",
166
163
  onClick: () => q(),
167
- title: T("newsletter.refresh", "Refresh"),
168
- "aria-label": T("newsletter.refresh", "Refresh"),
169
- children: /* @__PURE__ */ b(oe, {
164
+ title: w("newsletter.refresh", "Refresh"),
165
+ "aria-label": w("newsletter.refresh", "Refresh"),
166
+ children: /* @__PURE__ */ y(oe, {
170
167
  size: 18,
171
168
  className: G ? "animate-spin" : ""
172
169
  })
173
- }), /* @__PURE__ */ b(de, {
170
+ }), /* @__PURE__ */ y(fe, {
174
171
  primary: ye ? {
175
- label: T("subscribers.addSubscriber", "Add Subscriber"),
176
- icon: /* @__PURE__ */ b(g, { size: 18 }),
177
- onSelect: () => N(!0)
172
+ label: w("subscribers.addSubscriber", "Add Subscriber"),
173
+ icon: /* @__PURE__ */ y(h, { size: 18 }),
174
+ onSelect: () => M(!0)
178
175
  } : void 0,
179
176
  actions: [...xe ? [{
180
- label: T("subscribers.import", "Import"),
181
- icon: /* @__PURE__ */ b(v, { size: 16 }),
182
- onSelect: () => P(!0)
177
+ label: w("subscribers.import", "Import"),
178
+ icon: /* @__PURE__ */ y(_, { size: 16 }),
179
+ onSelect: () => N(!0)
183
180
  }] : [], ...Se ? [{
184
- label: T("subscribers.export", "Export"),
185
- icon: /* @__PURE__ */ b(ie, { size: 16 }),
186
- onSelect: () => Re()
181
+ label: w("subscribers.export", "Export"),
182
+ icon: /* @__PURE__ */ y(ie, { size: 16 }),
183
+ onSelect: () => Le()
187
184
  }] : []]
188
185
  })]
189
186
  })
190
187
  ]
191
188
  }),
192
- /* @__PURE__ */ b("div", {
189
+ /* @__PURE__ */ y("div", {
193
190
  className: "px-6 pt-6",
194
- children: /* @__PURE__ */ b(me, { children: T("subscribers.pagePurpose", "Your audience lives here — every person who can receive a newsletter for this product. Add people one at a time, bulk-import a CSV, or export the list, and keep it healthy by tracking who is active, paused, or has unsubscribed. A clean, consented list is what keeps your emails landing in inboxes.") })
191
+ children: /* @__PURE__ */ y(he, { children: w("subscribers.pagePurpose", "Your audience lives here — every person who can receive a newsletter for this product. Add people one at a time, bulk-import a CSV, or export the list, and keep it healthy by tracking who is active, paused, or has unsubscribed. A clean, consented list is what keeps your emails landing in inboxes.") })
195
192
  }),
196
- /* @__PURE__ */ b("div", {
193
+ /* @__PURE__ */ y("div", {
197
194
  className: "px-6 pt-6",
198
- children: /* @__PURE__ */ x(fe, {
195
+ children: /* @__PURE__ */ b(pe, {
199
196
  className: "flex flex-wrap items-center gap-8 p-4",
200
197
  children: [
201
- /* @__PURE__ */ x("div", {
198
+ /* @__PURE__ */ b("div", {
202
199
  className: "flex items-center gap-3",
203
- children: [/* @__PURE__ */ b("div", {
200
+ children: [/* @__PURE__ */ y("div", {
204
201
  className: "p-2 bg-action-primary-bg/10 rounded-lg",
205
- children: /* @__PURE__ */ b(ce, {
202
+ children: /* @__PURE__ */ y(ce, {
206
203
  size: 20,
207
204
  className: "text-primary"
208
205
  })
209
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
206
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
210
207
  className: "text-2xl font-bold text-text-primary tabular-nums",
211
208
  children: W
212
- }), /* @__PURE__ */ b("p", {
209
+ }), /* @__PURE__ */ y("p", {
213
210
  className: "text-sm text-text-secondary",
214
- children: T("subscribers.totalSubscribers", "total subscribers")
211
+ children: w("subscribers.totalSubscribers", "total subscribers")
215
212
  })] })]
216
213
  }),
217
- /* @__PURE__ */ x("div", {
214
+ /* @__PURE__ */ b("div", {
218
215
  className: "flex items-center gap-3",
219
- children: [/* @__PURE__ */ b("div", {
216
+ children: [/* @__PURE__ */ y("div", {
220
217
  className: "p-2 bg-status-success-bg-subtle rounded-lg",
221
- children: /* @__PURE__ */ b(m, {
218
+ children: /* @__PURE__ */ y(p, {
222
219
  size: 20,
223
220
  className: "text-status-success-text"
224
221
  })
225
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
222
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
226
223
  className: "text-2xl font-bold text-text-primary tabular-nums",
227
- children: Pe
228
- }), /* @__PURE__ */ b("p", {
224
+ children: Ne
225
+ }), /* @__PURE__ */ y("p", {
229
226
  className: "text-sm text-text-secondary",
230
- children: T("subscribers.active", "Active")
227
+ children: w("subscribers.active", "Active")
231
228
  })] })]
232
229
  }),
233
- /* @__PURE__ */ x("div", {
230
+ /* @__PURE__ */ b("div", {
234
231
  className: "flex items-center gap-3",
235
- children: [/* @__PURE__ */ b("div", {
232
+ children: [/* @__PURE__ */ y("div", {
236
233
  className: "p-2 bg-bg-sunken rounded-lg",
237
- children: /* @__PURE__ */ b(h, {
234
+ children: /* @__PURE__ */ y(m, {
238
235
  size: 20,
239
236
  className: "text-text-secondary"
240
237
  })
241
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
238
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
242
239
  className: "text-2xl font-bold text-text-primary tabular-nums",
243
- children: Fe
244
- }), /* @__PURE__ */ b("p", {
240
+ children: Pe
241
+ }), /* @__PURE__ */ y("p", {
245
242
  className: "text-sm text-text-secondary",
246
- children: T("subscribers.unsubscribed", "Unsubscribed")
243
+ children: w("subscribers.unsubscribed", "Unsubscribed")
247
244
  })] })]
248
245
  })
249
246
  ]
250
247
  })
251
248
  }),
252
- /* @__PURE__ */ x("div", {
249
+ /* @__PURE__ */ b("div", {
253
250
  className: "flex items-center gap-4 p-6 border-b border-border-seam",
254
251
  children: [
255
- /* @__PURE__ */ x("div", {
252
+ /* @__PURE__ */ b("div", {
256
253
  className: "flex-1 relative",
257
- children: [/* @__PURE__ */ b(se, {
254
+ children: [/* @__PURE__ */ y(se, {
258
255
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
259
256
  size: 20
260
- }), /* @__PURE__ */ b("input", {
257
+ }), /* @__PURE__ */ y("input", {
261
258
  type: "text",
262
- "aria-label": T("subscribers.searchByEmail", "Search by email..."),
263
- placeholder: T("subscribers.searchByEmail", "Search by email..."),
264
- value: A.search,
265
- onChange: (e) => Ie(e.target.value),
259
+ "aria-label": w("subscribers.searchByEmail", "Search by email..."),
260
+ placeholder: w("subscribers.searchByEmail", "Search by email..."),
261
+ value: k.search,
262
+ onChange: (e) => Fe(e.target.value),
266
263
  className: "w-full pl-10 pr-4 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent"
267
264
  })]
268
265
  }),
269
- /* @__PURE__ */ x("select", {
270
- value: A.status,
271
- onChange: (e) => Le(e.target.value),
266
+ /* @__PURE__ */ b("select", {
267
+ value: k.status,
268
+ onChange: (e) => Ie(e.target.value),
272
269
  className: "px-4 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent",
273
270
  children: [
274
- /* @__PURE__ */ b("option", {
271
+ /* @__PURE__ */ y("option", {
275
272
  value: "ALL",
276
- children: T("newsletterCommon.allStatuses", "All Statuses")
273
+ children: w("newsletterCommon.allStatuses", "All Statuses")
277
274
  }),
278
- /* @__PURE__ */ b("option", {
275
+ /* @__PURE__ */ y("option", {
279
276
  value: "ACTIVE",
280
- children: T("subscribers.active", "Active")
277
+ children: w("subscribers.active", "Active")
281
278
  }),
282
- /* @__PURE__ */ b("option", {
279
+ /* @__PURE__ */ y("option", {
283
280
  value: "PAUSED",
284
- children: T("subscribers.paused", "Paused")
281
+ children: w("subscribers.paused", "Paused")
285
282
  }),
286
- /* @__PURE__ */ b("option", {
283
+ /* @__PURE__ */ y("option", {
287
284
  value: "UNSUBSCRIBED",
288
- children: T("subscribers.unsubscribedStatus", "Unsubscribed")
285
+ children: w("subscribers.unsubscribedStatus", "Unsubscribed")
289
286
  })
290
287
  ]
291
288
  }),
292
- /* @__PURE__ */ x("div", {
289
+ /* @__PURE__ */ b("div", {
293
290
  className: "rounded-lg border border-border-subtle bg-bg-sunken px-4 py-2 text-sm text-text-secondary",
294
291
  children: [
295
- T("newsletter.product", "Product"),
292
+ w("newsletter.product", "Product"),
296
293
  ":",
297
294
  " ",
298
- w(E, T("newsletter.notAvailable", "N/A"), X)
295
+ C(T, w("newsletter.notAvailable", "N/A"), X)
299
296
  ]
300
297
  }),
301
- /* @__PURE__ */ x("button", {
298
+ /* @__PURE__ */ b("button", {
302
299
  type: "button",
303
300
  className: "flex items-center gap-2 px-4 py-2 border border-border-subtle rounded-lg hover:bg-accent transition-colors",
304
- children: [/* @__PURE__ */ b(ae, { size: 20 }), T("newsletter.moreFilters", "More Filters")]
301
+ children: [/* @__PURE__ */ y(ae, { size: 20 }), w("newsletter.moreFilters", "More Filters")]
305
302
  })
306
303
  ]
307
304
  }),
308
- /* @__PURE__ */ b("div", {
305
+ /* @__PURE__ */ y("div", {
309
306
  className: "flex-1 overflow-auto",
310
- children: K ? /* @__PURE__ */ b("div", {
307
+ children: K ? /* @__PURE__ */ y("div", {
311
308
  className: "flex items-center justify-center h-full p-6",
312
- children: /* @__PURE__ */ b(C, {
309
+ children: /* @__PURE__ */ y(S, {
313
310
  illustration: "empty-generic",
314
- title: T("subscribers.failedLoadSubscribers", "Failed to load subscribers"),
311
+ title: w("subscribers.failedLoadSubscribers", "Failed to load subscribers"),
315
312
  description: K.message,
316
- action: /* @__PURE__ */ b(S, {
313
+ action: /* @__PURE__ */ y(x, {
317
314
  type: "button",
318
315
  onClick: () => q(),
319
- children: T("newsletterCommon.tryAgain", "Try Again")
316
+ children: w("newsletterCommon.tryAgain", "Try Again")
320
317
  })
321
318
  })
322
- }) : G && U.length === 0 ? /* @__PURE__ */ b("div", {
319
+ }) : G && U.length === 0 ? /* @__PURE__ */ y("div", {
323
320
  className: "flex items-center justify-center h-full",
324
- children: /* @__PURE__ */ x("div", {
321
+ children: /* @__PURE__ */ b("div", {
325
322
  className: "flex items-center gap-2 text-text-secondary",
326
- children: [/* @__PURE__ */ b(p, {
323
+ children: [/* @__PURE__ */ y(f, {
327
324
  className: "animate-spin",
328
325
  size: 24
329
- }), /* @__PURE__ */ b("span", { children: T("subscribers.loadingSubscribers", "Loading subscribers...") })]
326
+ }), /* @__PURE__ */ y("span", { children: w("subscribers.loadingSubscribers", "Loading subscribers...") })]
330
327
  })
331
- }) : Z.length === 0 ? /* @__PURE__ */ b("div", {
328
+ }) : Z.length === 0 ? /* @__PURE__ */ y("div", {
332
329
  className: "flex items-center justify-center h-full p-6",
333
- children: /* @__PURE__ */ b(C, {
334
- illustration: A.search ? "empty-search" : "empty-people",
335
- title: A.search ? T("subscribers.noSubscribersFound", "No subscribers found") : T("subscribers.noSubscribersYet", "No subscribers yet"),
336
- description: A.search ? T("newsletterCommon.tryDifferentSearch", "Try a different search term") : T("subscribers.noSubscribersDescription", "Start building your subscriber list by adding subscribers manually or importing them from a CSV file."),
337
- action: A.search ? void 0 : /* @__PURE__ */ x("div", {
330
+ children: /* @__PURE__ */ y(S, {
331
+ illustration: k.search ? "empty-search" : "empty-people",
332
+ title: k.search ? w("subscribers.noSubscribersFound", "No subscribers found") : w("subscribers.noSubscribersYet", "No subscribers yet"),
333
+ description: k.search ? w("newsletterCommon.tryDifferentSearch", "Try a different search term") : w("subscribers.noSubscribersDescription", "Start building your subscriber list by adding subscribers manually or importing them from a CSV file."),
334
+ action: k.search ? void 0 : /* @__PURE__ */ b("div", {
338
335
  className: "flex items-center gap-2",
339
- children: [/* @__PURE__ */ b(S, {
336
+ children: [/* @__PURE__ */ y(x, {
340
337
  type: "button",
341
338
  variant: "outline",
342
- onClick: () => P(!0),
343
- children: T("subscribers.importFromCsv", "Import from CSV")
344
- }), /* @__PURE__ */ b(S, {
345
- type: "button",
346
339
  onClick: () => N(!0),
347
- children: T("subscribers.addManually", "Add Manually")
340
+ children: w("subscribers.importFromCsv", "Import from CSV")
341
+ }), /* @__PURE__ */ y(x, {
342
+ type: "button",
343
+ onClick: () => M(!0),
344
+ children: w("subscribers.addManually", "Add Manually")
348
345
  })]
349
346
  })
350
347
  })
351
- }) : /* @__PURE__ */ x("table", {
348
+ }) : /* @__PURE__ */ b("table", {
352
349
  className: "w-full",
353
- children: [/* @__PURE__ */ b("thead", {
350
+ children: [/* @__PURE__ */ y("thead", {
354
351
  className: "bg-bg-sunken border-b border-border-seam sticky top-0",
355
- children: /* @__PURE__ */ x("tr", { children: [
356
- /* @__PURE__ */ b("th", {
352
+ children: /* @__PURE__ */ b("tr", { children: [
353
+ /* @__PURE__ */ y("th", {
357
354
  className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
358
- children: /* @__PURE__ */ b("input", {
355
+ children: /* @__PURE__ */ y("input", {
359
356
  type: "checkbox",
360
- "aria-label": T("subscribers.selectAll", "Select all subscribers"),
361
- checked: z.size === Z.length,
362
- onChange: We,
357
+ "aria-label": w("subscribers.selectAll", "Select all subscribers"),
358
+ checked: R.size === Z.length,
359
+ onChange: Ue,
363
360
  className: "rounded"
364
361
  })
365
362
  }),
366
- /* @__PURE__ */ b("th", {
363
+ /* @__PURE__ */ y("th", {
367
364
  className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
368
- children: T("newsletter.email", "Email")
365
+ children: w("newsletter.email", "Email")
369
366
  }),
370
- /* @__PURE__ */ b("th", {
367
+ /* @__PURE__ */ y("th", {
371
368
  className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
372
- children: T("subscribers.product", "Product")
369
+ children: w("subscribers.product", "Product")
373
370
  }),
374
- /* @__PURE__ */ b("th", {
371
+ /* @__PURE__ */ y("th", {
375
372
  className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
376
- children: T("newsletterCommon.status", "Status")
373
+ children: w("newsletterCommon.status", "Status")
377
374
  }),
378
- /* @__PURE__ */ b("th", {
375
+ /* @__PURE__ */ y("th", {
379
376
  className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
380
- children: T("subscribers.subscribed", "Subscribed")
377
+ children: w("subscribers.subscribed", "Subscribed")
381
378
  }),
382
- /* @__PURE__ */ b("th", {
379
+ /* @__PURE__ */ y("th", {
383
380
  className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
384
- children: T("newsletter.actions", "Actions")
381
+ children: w("newsletter.actions", "Actions")
385
382
  })
386
383
  ] })
387
- }), /* @__PURE__ */ b("tbody", {
384
+ }), /* @__PURE__ */ y("tbody", {
388
385
  className: "bg-bg-surface divide-y divide-border",
389
- children: Z.map((e) => /* @__PURE__ */ b(ge, {
386
+ children: Z.map((e) => /* @__PURE__ */ y(ge, {
390
387
  subscriber: e,
391
- selected: z.has(e.id),
392
- onSelect: () => Ge(e.id),
393
- onView: () => Ke(e.id),
394
- onUnsubscribe: () => Ve(e.email),
395
- onResubscribe: () => He(e.email),
396
- onDelete: be ? () => Ue(e.id, e.email) : void 0,
397
- formatDate: qe,
398
- emptyProductLabel: T("newsletterCommon.notAvailable", "N/A"),
388
+ selected: R.has(e.id),
389
+ onSelect: () => We(e.id),
390
+ onView: () => Ge(e.id),
391
+ onUnsubscribe: () => Be(e.email),
392
+ onResubscribe: () => Ve(e.email),
393
+ onDelete: be ? () => He(e.id, e.email) : void 0,
394
+ formatDate: Ke,
395
+ emptyProductLabel: w("newsletterCommon.notAvailable", "N/A"),
399
396
  products: X,
400
- isDeleting: Me,
401
- isUnsubscribing: je
397
+ isDeleting: je,
398
+ isUnsubscribing: Ae
402
399
  }, e.id))
403
400
  })]
404
401
  })
405
402
  }),
406
- Ce && /* @__PURE__ */ b("div", {
403
+ Ce && /* @__PURE__ */ y("div", {
407
404
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
408
- children: /* @__PURE__ */ x("div", {
405
+ children: /* @__PURE__ */ b("div", {
409
406
  className: "bg-bg-surface rounded-lg shadow-xl w-full max-w-md p-6",
410
407
  children: [
411
- /* @__PURE__ */ x("div", {
408
+ /* @__PURE__ */ b("div", {
412
409
  className: "flex items-center justify-between mb-4",
413
- children: [/* @__PURE__ */ b("h2", {
410
+ children: [/* @__PURE__ */ y("h2", {
414
411
  className: "text-lg font-semibold text-text-primary",
415
- children: T("subscribers.addSubscriber", "Add Subscriber")
416
- }), /* @__PURE__ */ b("button", {
412
+ children: w("subscribers.addSubscriber", "Add Subscriber")
413
+ }), /* @__PURE__ */ y("button", {
417
414
  type: "button",
418
- onClick: () => N(!1),
415
+ onClick: () => M(!1),
419
416
  className: "p-1 hover:bg-accent rounded",
420
- children: /* @__PURE__ */ b(y, { size: 20 })
417
+ children: /* @__PURE__ */ y(v, { size: 20 })
421
418
  })]
422
419
  }),
423
- /* @__PURE__ */ x("div", {
420
+ /* @__PURE__ */ b("div", {
424
421
  className: "mb-4",
425
- children: [/* @__PURE__ */ b("label", {
422
+ children: [/* @__PURE__ */ y("label", {
426
423
  className: "block text-sm font-medium text-text-primary mb-1",
427
- children: T("subscribers.emailAddress", "Email Address")
428
- }), /* @__PURE__ */ b("input", {
424
+ children: w("subscribers.emailAddress", "Email Address")
425
+ }), /* @__PURE__ */ y("input", {
429
426
  type: "email",
430
- "aria-label": T("subscribers.emailAddress", "Email address"),
431
- value: F,
432
- onChange: (e) => I(e.target.value),
433
- placeholder: T("subscribers.emailPlaceholder", "subscriber@example.com"),
427
+ "aria-label": w("subscribers.emailAddress", "Email address"),
428
+ value: P,
429
+ onChange: (e) => F(e.target.value),
430
+ placeholder: w("subscribers.emailPlaceholder", "subscriber@example.com"),
434
431
  className: "w-full px-3 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent",
435
432
  onKeyDown: (e) => e.key === "Enter" && $()
436
433
  })]
437
434
  }),
438
- /* @__PURE__ */ x("div", {
435
+ /* @__PURE__ */ b("div", {
439
436
  className: "flex justify-end gap-2",
440
- children: [/* @__PURE__ */ b("button", {
437
+ children: [/* @__PURE__ */ y("button", {
441
438
  type: "button",
442
- onClick: () => N(!1),
439
+ onClick: () => M(!1),
443
440
  className: "px-4 py-2 border border-border-subtle rounded-lg hover:bg-accent transition-colors",
444
- children: T("newsletterCommon.cancel", "Cancel")
445
- }), /* @__PURE__ */ x("button", {
441
+ children: w("newsletterCommon.cancel", "Cancel")
442
+ }), /* @__PURE__ */ b("button", {
446
443
  type: "button",
447
444
  onClick: $,
448
445
  disabled: J,
449
446
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
450
- children: [J ? /* @__PURE__ */ b(p, {
447
+ children: [J ? /* @__PURE__ */ y(f, {
451
448
  size: 16,
452
449
  className: "animate-spin"
453
- }) : /* @__PURE__ */ b(g, { size: 16 }), T("subscribers.addSubscriber", "Add Subscriber")]
450
+ }) : /* @__PURE__ */ y(h, { size: 16 }), w("subscribers.addSubscriber", "Add Subscriber")]
454
451
  })]
455
452
  })
456
453
  ]
457
454
  })
458
455
  }),
459
- we && /* @__PURE__ */ b("div", {
456
+ we && /* @__PURE__ */ y("div", {
460
457
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
461
- children: /* @__PURE__ */ x("div", {
458
+ children: /* @__PURE__ */ b("div", {
462
459
  className: "bg-bg-surface rounded-lg shadow-xl w-full max-w-lg p-6",
463
460
  children: [
464
- /* @__PURE__ */ x("div", {
461
+ /* @__PURE__ */ b("div", {
465
462
  className: "flex items-center justify-between mb-4",
466
- children: [/* @__PURE__ */ b("h2", {
463
+ children: [/* @__PURE__ */ y("h2", {
467
464
  className: "text-lg font-semibold text-text-primary",
468
- children: T("subscribers.importSubscribers", "Import Subscribers")
469
- }), /* @__PURE__ */ b("button", {
465
+ children: w("subscribers.importSubscribers", "Import Subscribers")
466
+ }), /* @__PURE__ */ y("button", {
470
467
  type: "button",
471
- onClick: () => P(!1),
468
+ onClick: () => N(!1),
472
469
  className: "p-1 hover:bg-accent rounded",
473
- children: /* @__PURE__ */ b(y, { size: 20 })
470
+ children: /* @__PURE__ */ y(v, { size: 20 })
474
471
  })]
475
472
  }),
476
- /* @__PURE__ */ x("div", {
473
+ /* @__PURE__ */ b("div", {
477
474
  className: "mb-4",
478
475
  children: [
479
- /* @__PURE__ */ x("div", {
476
+ /* @__PURE__ */ b("div", {
480
477
  className: "flex items-center justify-between mb-2",
481
478
  children: [
482
- /* @__PURE__ */ b("label", {
479
+ /* @__PURE__ */ y("label", {
483
480
  className: "block text-sm font-medium text-text-primary",
484
- children: T("subscribers.emailAddresses", "Email Addresses")
481
+ children: w("subscribers.emailAddresses", "Email Addresses")
485
482
  }),
486
- /* @__PURE__ */ b("button", {
483
+ /* @__PURE__ */ y("button", {
487
484
  type: "button",
488
- onClick: () => Te.current?.click(),
485
+ onClick: () => H.current?.click(),
489
486
  className: "text-sm text-primary hover:text-primary/80",
490
- children: T("subscribers.uploadCsv", "Upload CSV")
487
+ children: w("subscribers.uploadCsv", "Upload CSV")
491
488
  }),
492
- /* @__PURE__ */ b("input", {
493
- ref: Te,
489
+ /* @__PURE__ */ y("input", {
490
+ ref: H,
494
491
  type: "file",
495
- "aria-label": T("subscribers.uploadCsvFile", "Upload CSV file"),
492
+ "aria-label": w("subscribers.uploadCsvFile", "Upload CSV file"),
496
493
  accept: ".csv,.txt",
497
- onChange: Be,
494
+ onChange: ze,
498
495
  className: "hidden"
499
496
  })
500
497
  ]
501
498
  }),
502
- /* @__PURE__ */ b("textarea", {
503
- "aria-label": T("subscribers.csvData", "CSV data"),
504
- value: L,
505
- onChange: (e) => R(e.target.value),
506
- placeholder: T("subscribers.csvPlaceholder", "Enter email addresses (one per line or comma-separated)\n\nemail1@example.com\nemail2@example.com\nemail3@example.com"),
499
+ /* @__PURE__ */ y("textarea", {
500
+ "aria-label": w("subscribers.csvData", "CSV data"),
501
+ value: I,
502
+ onChange: (e) => L(e.target.value),
503
+ placeholder: w("subscribers.csvPlaceholder", "Enter email addresses (one per line or comma-separated)\n\nemail1@example.com\nemail2@example.com\nemail3@example.com"),
507
504
  rows: 8,
508
505
  className: "w-full px-3 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent font-mono text-sm"
509
506
  }),
510
- /* @__PURE__ */ b("p", {
507
+ /* @__PURE__ */ y("p", {
511
508
  className: "mt-1 text-xs text-text-secondary",
512
- children: T("subscribers.supportedFormats", "Supported formats: one email per line, comma-separated, or CSV file")
509
+ children: w("subscribers.supportedFormats", "Supported formats: one email per line, comma-separated, or CSV file")
513
510
  })
514
511
  ]
515
512
  }),
516
- /* @__PURE__ */ x("div", {
513
+ /* @__PURE__ */ b("div", {
517
514
  className: "flex justify-end gap-2",
518
- children: [/* @__PURE__ */ b("button", {
515
+ children: [/* @__PURE__ */ y("button", {
519
516
  type: "button",
520
- onClick: () => P(!1),
517
+ onClick: () => N(!1),
521
518
  className: "px-4 py-2 border border-border-subtle rounded-lg hover:bg-accent transition-colors",
522
- children: T("newsletterCommon.cancel", "Cancel")
523
- }), /* @__PURE__ */ x("button", {
519
+ children: w("newsletterCommon.cancel", "Cancel")
520
+ }), /* @__PURE__ */ b("button", {
524
521
  type: "button",
525
- onClick: ze,
522
+ onClick: Re,
526
523
  disabled: Y,
527
524
  className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
528
- children: [Y ? /* @__PURE__ */ b(p, {
525
+ children: [Y ? /* @__PURE__ */ y(f, {
529
526
  size: 16,
530
527
  className: "animate-spin"
531
- }) : /* @__PURE__ */ b(v, { size: 16 }), T("subscribers.import", "Import")]
528
+ }) : /* @__PURE__ */ y(_, { size: 16 }), w("subscribers.import", "Import")]
532
529
  })]
533
530
  })
534
531
  ]
@@ -537,14 +534,14 @@ function T() {
537
534
  ]
538
535
  });
539
536
  }
540
- function ge({ subscriber: e, selected: t, onSelect: n, onView: r, onUnsubscribe: i, onResubscribe: a, onDelete: o, formatDate: c, emptyProductLabel: l, products: u }) {
541
- let d = s();
542
- return /* @__PURE__ */ x("tr", {
537
+ function ge({ subscriber: e, selected: t, onSelect: n, onView: r, onUnsubscribe: i, onResubscribe: o, onDelete: s, formatDate: c, emptyProductLabel: l, products: u }) {
538
+ let d = a();
539
+ return /* @__PURE__ */ b("tr", {
543
540
  className: "hover:bg-accent",
544
541
  children: [
545
- /* @__PURE__ */ b("td", {
542
+ /* @__PURE__ */ y("td", {
546
543
  className: "px-6 py-4",
547
- children: /* @__PURE__ */ b("input", {
544
+ children: /* @__PURE__ */ y("input", {
548
545
  type: "checkbox",
549
546
  "aria-label": `Select ${e.email}`,
550
547
  checked: t,
@@ -552,62 +549,62 @@ function ge({ subscriber: e, selected: t, onSelect: n, onView: r, onUnsubscribe:
552
549
  className: "rounded"
553
550
  })
554
551
  }),
555
- /* @__PURE__ */ b("td", {
552
+ /* @__PURE__ */ y("td", {
556
553
  className: "px-6 py-4",
557
- children: /* @__PURE__ */ b("button", {
554
+ children: /* @__PURE__ */ y("button", {
558
555
  type: "button",
559
556
  onClick: r,
560
557
  className: "text-text-primary hover:text-primary font-medium",
561
558
  children: e.email
562
559
  })
563
560
  }),
564
- /* @__PURE__ */ b("td", {
561
+ /* @__PURE__ */ y("td", {
565
562
  className: "px-6 py-4 text-sm text-text-secondary",
566
- children: w(e.platformProductId, l, u)
563
+ children: C(e.platformProductId, l, u)
567
564
  }),
568
- /* @__PURE__ */ b("td", {
565
+ /* @__PURE__ */ y("td", {
569
566
  className: "px-6 py-4",
570
- children: ((e, t) => !t || e === "UNSUBSCRIBED" ? /* @__PURE__ */ x("span", {
567
+ children: ((e, t) => !t || e === "UNSUBSCRIBED" ? /* @__PURE__ */ b("span", {
571
568
  className: "inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary",
572
- children: [/* @__PURE__ */ b(h, { size: 12 }), d("subscribers.unsubscribed", "Unsubscribed")]
573
- }) : e === "PAUSED" ? /* @__PURE__ */ b("span", {
569
+ children: [/* @__PURE__ */ y(m, { size: 12 }), d("subscribers.unsubscribed", "Unsubscribed")]
570
+ }) : e === "PAUSED" ? /* @__PURE__ */ y("span", {
574
571
  className: "inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
575
572
  children: d("subscribers.paused", "Paused")
576
- }) : /* @__PURE__ */ x("span", {
573
+ }) : /* @__PURE__ */ b("span", {
577
574
  className: "inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
578
575
  children: [
579
- /* @__PURE__ */ b("span", { className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse" }),
580
- /* @__PURE__ */ b(m, { size: 12 }),
576
+ /* @__PURE__ */ y("span", { className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse" }),
577
+ /* @__PURE__ */ y(p, { size: 12 }),
581
578
  d("subscribers.active", "Active")
582
579
  ]
583
580
  }))(e.status, e.subscribed)
584
581
  }),
585
- /* @__PURE__ */ b("td", {
582
+ /* @__PURE__ */ y("td", {
586
583
  className: "px-6 py-4 text-sm text-text-secondary",
587
584
  children: c(e.subscribedAt)
588
585
  }),
589
- /* @__PURE__ */ b("td", {
586
+ /* @__PURE__ */ y("td", {
590
587
  className: "px-6 py-4",
591
- children: /* @__PURE__ */ x("div", {
588
+ children: /* @__PURE__ */ b("div", {
592
589
  className: "flex items-center gap-2",
593
- children: [e.subscribed ? /* @__PURE__ */ b("button", {
590
+ children: [e.subscribed ? /* @__PURE__ */ y("button", {
594
591
  type: "button",
595
592
  onClick: i,
596
593
  className: "text-xs text-status-warning-text hover:opacity-80",
597
594
  title: d("subscribers.unsubscribe", "Unsubscribe"),
598
595
  children: d("subscribers.unsubscribe", "Unsubscribe")
599
- }) : /* @__PURE__ */ b("button", {
596
+ }) : /* @__PURE__ */ y("button", {
600
597
  type: "button",
601
- onClick: a,
598
+ onClick: o,
602
599
  className: "text-xs text-status-success-text hover:opacity-80",
603
600
  title: d("subscribers.resubscribe", "Resubscribe"),
604
601
  children: d("subscribers.resubscribe", "Resubscribe")
605
- }), o && /* @__PURE__ */ b("button", {
602
+ }), s && /* @__PURE__ */ y("button", {
606
603
  type: "button",
607
- onClick: o,
604
+ onClick: s,
608
605
  className: "p-1 text-status-error-text hover:text-status-error-text/80 hover:bg-status-error-bg/10 rounded",
609
606
  title: d("newsletter.delete", "Delete"),
610
- children: /* @__PURE__ */ b(_, { size: 14 })
607
+ children: /* @__PURE__ */ y(g, { size: 14 })
611
608
  })]
612
609
  })
613
610
  })
@@ -615,6 +612,6 @@ function ge({ subscriber: e, selected: t, onSelect: n, onView: r, onUnsubscribe:
615
612
  });
616
613
  }
617
614
  //#endregion
618
- export { T as SubscribersListPage };
615
+ export { w as SubscribersListPage };
619
616
 
620
617
  //# sourceMappingURL=SubscribersListPage.js.map