@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,593 +1,590 @@
1
1
  import { useNewsletterStore as e } from "../store/newsletterStore.js";
2
- import { useNewsletter as t, useNewsletterMutations as n, usePlatformProducts as ee } from "../hooks/useNewsletterOperations.js";
3
- import { useNewsletter as te } from "../providers/NewsletterProvider.js";
4
- import { NEWSLETTER_PERMISSIONS as r } from "../constants/permissions.js";
5
- import { useCallback as i, useState as a } from "react";
6
- import { AccessDenied as ne } from "@burdenoff/fe-libs/shared/components";
7
- import { useNavigate as re, useParams as ie } from "react-router";
8
- import { AlertCircle as ae, ArrowLeft as oe, CheckCircle as se, Clock as o, Code as ce, Eye as s, Loader2 as c, Monitor as l, Save as u, Send as d, Smartphone as le, Tablet as ue, TestTube as de } from "lucide-react";
9
- import { usePermissions as fe } from "@burdenoff/fe-libs/shared/providers/shell";
10
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
- import { AuroraBackground as pe, Button as m, CTAOverflowMenu as me, GlassCard as he, GradientText as ge, IllustratedEmptyState as _e, NextSteps as ve, OptionalFields as ye, PagePurpose as be } from "@burdenoff/fe-libs/ui";
12
- import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
2
+ import { useNewsletter as t, useNewsletterMutations as ee, usePlatformProducts as te } from "../hooks/useNewsletterOperations.js";
3
+ import { useTr as ne } from "../shared/hooks/useTr.js";
4
+ import { useNewsletter as re } from "../providers/NewsletterProvider.js";
5
+ import { NEWSLETTER_PERMISSIONS as n } from "../constants/permissions.js";
6
+ import { useCallback as ie, useState as r } from "react";
7
+ import { AccessDenied as ae } from "@burdenoff/fe-libs/shared/components";
8
+ import { useNavigate as oe, useParams as se } from "react-router";
9
+ import { AlertCircle as ce, ArrowLeft as le, CheckCircle as ue, Clock as i, Code as de, Eye as a, Loader2 as o, Monitor as s, Save as c, Send as l, Smartphone as fe, Tablet as pe, TestTube as u } from "lucide-react";
10
+ import { usePermissions as me } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
+ import { AuroraBackground as he, Button as p, CTAOverflowMenu as ge, GlassCard as _e, GradientText as ve, IllustratedEmptyState as ye, NextSteps as be, OptionalFields as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
13
13
  //#region src/newsletter/pages/CampaignEditorPage.tsx
14
- function h() {
15
- let { t: h } = xe(), g = i((e, t) => {
16
- let n = h(e);
17
- return n === e ? t : n;
18
- }, [h]), { campaignId: _ } = ie(), v = re(), { hasPermission: y, isLoading: b, permissions: x } = fe(), { productId: S } = te(), Se = (Array.isArray(x) ? x : x?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:campaigns:") || e.startsWith("tenantmodule-newsletter:newsletters:")), Ce = Se ? y(r.CAMPAIGN_CREATE) : !0, we = Se ? y(r.CAMPAIGN_UPDATE) : !0, { editorMode: C, setEditorMode: w, previewMode: T, setPreviewMode: E, emailContent: D, updateEmailContent: O, previewPanelOpen: k, togglePreviewPanel: A, resetEmailContent: Te } = e(), [j, M] = a(""), [N, P] = a(""), [F, I] = a(!1), [Ee, De] = a(null), [Oe, L] = a(!1), [R, z] = a(""), [ke, B] = a(!1), [V, Ae] = a(""), [H, je] = a(""), [U, W] = a(null), G = !_, K = _ || Ee, Me = `<!DOCTYPE html>
14
+ function m() {
15
+ let m = ne(), { campaignId: h } = se(), g = oe(), { hasPermission: Ce, isLoading: _, permissions: v } = me(), { productId: y } = re(), b = (Array.isArray(v) ? v : v?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:campaigns:") || e.startsWith("tenantmodule-newsletter:newsletters:")), we = b ? Ce(n.CAMPAIGN_CREATE) : !0, Te = b ? Ce(n.CAMPAIGN_UPDATE) : !0, { editorMode: x, setEditorMode: S, previewMode: C, setPreviewMode: w, emailContent: T, updateEmailContent: E, previewPanelOpen: D, togglePreviewPanel: O, resetEmailContent: Ee } = e(), [k, A] = r(""), [j, M] = r(""), [N, P] = r(!1), [F, I] = r(null), [De, L] = r(!1), [Oe, ke] = r(""), [Ae, R] = r(!1), [z, je] = r(""), [B, Me] = r(""), [V, H] = r(null), U = !h, W = h || F, Ne = `<!DOCTYPE html>
19
16
  <html>
20
17
  <head>
21
18
  <meta charset='utf-8'>
22
19
  </head>
23
20
  <body>
24
- <h1>${g("newsletter.codeTemplateGreeting", "Hello {{firstName}}!")}</h1>
25
- <p>${g("newsletter.codeTemplateBody", "Your email content here...")}</p>
21
+ <h1>${m("newsletter.codeTemplateGreeting", "Hello {{firstName}}!")}</h1>
22
+ <p>${m("newsletter.codeTemplateBody", "Your email content here...")}</p>
26
23
  </body>
27
- </html>`, { newsletter: q, loading: Ne, error: J } = t(_ || ""), { products: Pe } = ee(), { createNewsletter: Fe, updateNewsletter: Ie, sendNewsletter: Le, scheduleNewsletter: Re, sendTestNewsletter: ze, creating: Be, updating: Ve, sending: He, scheduling: Y, sendingTest: X } = n(), Z = Be || Ve || He || Y || X, Q = i((e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").substring(0, 100), []), [Ue, We] = a(null), [Ge, Ke] = a(null);
28
- q && _ && q.id !== Ue && (We(q.id), M(q.title || ""), P(q.slug || ""), O({
29
- subject: q.subject || "",
30
- previewText: q.previewText || "",
31
- content: q.content || ""
32
- }), I(!0), De(q.id)), G && !Ee && Ge === !1 && (Te(), M(""), P(""), I(!1)), Ge !== G && Ke(G);
24
+ </html>`, { newsletter: G, loading: Pe, error: K } = t(h || ""), { products: Fe } = te(), { createNewsletter: Ie, updateNewsletter: Le, sendNewsletter: Re, scheduleNewsletter: ze, sendTestNewsletter: Be, creating: q, updating: J, sending: Ve, scheduling: Y, sendingTest: X } = ee(), Z = q || J || Ve || Y || X, Q = ie((e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").substring(0, 100), []), [He, Ue] = r(null), [We, Ge] = r(null);
25
+ G && h && G.id !== He && (Ue(G.id), A(G.title || ""), M(G.slug || ""), E({
26
+ subject: G.subject || "",
27
+ previewText: G.previewText || "",
28
+ content: G.content || ""
29
+ }), P(!0), I(G.id)), U && !F && We === !1 && (Ee(), A(""), M(""), P(!1)), We !== U && Ge(U);
33
30
  let $ = (e, t) => {
34
- W({
31
+ H({
35
32
  type: e,
36
33
  message: t
37
- }), setTimeout(() => W(null), 5e3);
38
- }, qe = async () => {
34
+ }), setTimeout(() => H(null), 5e3);
35
+ }, Ke = async () => {
39
36
  try {
40
- let e = N || Q(j);
41
- if (!j.trim()) {
42
- $("error", g("newsletter.pleaseEnterTitle", "Please enter a title for your campaign"));
37
+ let e = j || Q(k);
38
+ if (!k.trim()) {
39
+ $("error", m("newsletter.pleaseEnterTitle", "Please enter a title for your campaign"));
43
40
  return;
44
41
  }
45
- if (K && F) await Ie(K, {
46
- title: j,
47
- subject: D.subject,
48
- previewText: D.previewText,
49
- content: D.content
50
- }), $("success", g("newsletter.campaignSavedSuccessfully", "Campaign saved successfully"));
42
+ if (W && N) await Le(W, {
43
+ title: k,
44
+ subject: T.subject,
45
+ previewText: T.previewText,
46
+ content: T.content
47
+ }), $("success", m("newsletter.campaignSavedSuccessfully", "Campaign saved successfully"));
51
48
  else {
52
- let t = await Fe({
53
- platformProductId: S,
54
- title: j,
49
+ let t = await Ie({
50
+ platformProductId: y,
51
+ title: k,
55
52
  slug: e,
56
- subject: D.subject || j,
57
- previewText: D.previewText,
58
- content: D.content || "<p>Your email content here</p>"
53
+ subject: T.subject || k,
54
+ previewText: T.previewText,
55
+ content: T.content || "<p>Your email content here</p>"
59
56
  });
60
- t && (De(t.id), I(!0), P(t.slug), $("success", g("newsletter.campaignCreatedSuccessfully", "Campaign created successfully")));
57
+ t && (I(t.id), P(!0), M(t.slug), $("success", m("newsletter.campaignCreatedSuccessfully", "Campaign created successfully")));
61
58
  }
62
59
  } catch (e) {
63
- $("error", `${g("newsletter.failedToSave", "Failed to save")}: ${e instanceof Error ? e.message : g("newsletter.unknownError", "Unknown error")}`);
60
+ $("error", `${m("newsletter.failedToSave", "Failed to save")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
64
61
  }
65
- }, Je = async () => {
66
- if (!K) {
67
- $("error", g("newsletter.pleaseSaveFirst", "Please save the campaign first"));
62
+ }, qe = async () => {
63
+ if (!W) {
64
+ $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
68
65
  return;
69
66
  }
70
- let e = R.split(",").flatMap((e) => {
67
+ let e = Oe.split(",").flatMap((e) => {
71
68
  let t = e.trim();
72
69
  return t ? [t] : [];
73
70
  });
74
71
  if (e.length === 0) {
75
- $("error", g("newsletter.pleaseEnterAtLeastOneEmail", "Please enter at least one email address"));
72
+ $("error", m("newsletter.pleaseEnterAtLeastOneEmail", "Please enter at least one email address"));
76
73
  return;
77
74
  }
78
75
  try {
79
- let t = await ze(K, e);
80
- t?.success && ($("success", `${g("newsletter.testEmailSentTo", "Test email sent to")} ${t.sentCount} ${g("newsletter.recipientsCount", "recipient(s)")}`), L(!1), z(""));
76
+ let t = await Be(W, e);
77
+ t?.success && ($("success", `${m("newsletter.testEmailSentTo", "Test email sent to")} ${t.sentCount} ${m("newsletter.recipientsCount", "recipient(s)")}`), L(!1), ke(""));
81
78
  } catch (e) {
82
- $("error", `${g("newsletter.failedToSendTest", "Failed to send test")}: ${e instanceof Error ? e.message : g("newsletter.unknownError", "Unknown error")}`);
79
+ $("error", `${m("newsletter.failedToSendTest", "Failed to send test")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
83
80
  }
84
- }, Ye = async () => {
85
- if (!K) {
86
- $("error", g("newsletter.pleaseSaveFirst", "Please save the campaign first"));
81
+ }, Je = async () => {
82
+ if (!W) {
83
+ $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
87
84
  return;
88
85
  }
89
- if (!V || !H) {
90
- $("error", g("newsletter.pleaseSelectDateTime", "Please select a date and time"));
86
+ if (!z || !B) {
87
+ $("error", m("newsletter.pleaseSelectDateTime", "Please select a date and time"));
91
88
  return;
92
89
  }
93
90
  try {
94
- await Re(K, (/* @__PURE__ */ new Date(`${V}T${H}`)).toISOString()), $("success", g("newsletter.campaignScheduledSuccessfully", "Campaign scheduled successfully")), B(!1), v("../campaigns");
91
+ await ze(W, (/* @__PURE__ */ new Date(`${z}T${B}`)).toISOString()), $("success", m("newsletter.campaignScheduledSuccessfully", "Campaign scheduled successfully")), R(!1), g("../campaigns");
95
92
  } catch (e) {
96
- $("error", `${g("scheduler.failedToReschedule", "Failed to schedule")}: ${e instanceof Error ? e.message : g("newsletter.unknownError", "Unknown error")}`);
93
+ $("error", `${m("scheduler.failedToReschedule", "Failed to schedule")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
97
94
  }
98
- }, Xe = async () => {
99
- if (!K) {
100
- $("error", g("newsletter.pleaseSaveFirst", "Please save the campaign first"));
95
+ }, Ye = async () => {
96
+ if (!W) {
97
+ $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
101
98
  return;
102
99
  }
103
- if (confirm(g("newsletter.confirmSendCampaignIrreversible", "Are you sure you want to send this campaign now? This action cannot be undone."))) try {
104
- await Le(K), $("success", g("newsletter.campaignSentSuccessfully", "Campaign sent successfully!")), setTimeout(() => v("../campaigns"), 1500);
100
+ if (confirm(m("newsletter.confirmSendCampaignIrreversible", "Are you sure you want to send this campaign now? This action cannot be undone."))) try {
101
+ await Re(W), $("success", m("newsletter.campaignSentSuccessfully", "Campaign sent successfully!")), setTimeout(() => g("../campaigns"), 1500);
105
102
  } catch (e) {
106
- $("error", `${g("newsletter.failedToSend", "Failed to send")}: ${e instanceof Error ? e.message : g("newsletter.unknownError", "Unknown error")}`);
103
+ $("error", `${m("newsletter.failedToSend", "Failed to send")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
107
104
  }
108
- }, Ze = () => {
109
- v("../campaigns");
105
+ }, Xe = () => {
106
+ g("../campaigns");
110
107
  };
111
- if (b) return /* @__PURE__ */ f("div", {
108
+ if (_) return /* @__PURE__ */ d("div", {
112
109
  className: "flex items-center justify-center h-full",
113
- children: /* @__PURE__ */ p("div", {
110
+ children: /* @__PURE__ */ f("div", {
114
111
  className: "flex items-center gap-2 text-text-secondary",
115
- children: [/* @__PURE__ */ f(c, {
112
+ children: [/* @__PURE__ */ d(o, {
116
113
  className: "animate-spin",
117
114
  size: 24
118
- }), /* @__PURE__ */ f("span", { children: g("newsletterCommon.loading", "Loading...") })]
115
+ }), /* @__PURE__ */ d("span", { children: m("newsletterCommon.loading", "Loading...") })]
119
116
  })
120
117
  });
121
- let Qe = G ? Ce : we;
122
- return !b && x && x.permissionStrings?.length > 0 && !Qe ? /* @__PURE__ */ f(ne, {}) : _ && Ne ? /* @__PURE__ */ f("div", {
118
+ let Ze = U ? we : Te;
119
+ return !_ && v && v.permissionStrings?.length > 0 && !Ze ? /* @__PURE__ */ d(ae, {}) : h && Pe ? /* @__PURE__ */ d("div", {
123
120
  className: "flex items-center justify-center h-full",
124
- children: /* @__PURE__ */ p("div", {
121
+ children: /* @__PURE__ */ f("div", {
125
122
  className: "flex items-center gap-2 text-text-secondary",
126
- children: [/* @__PURE__ */ f(c, {
123
+ children: [/* @__PURE__ */ d(o, {
127
124
  className: "animate-spin",
128
125
  size: 24
129
- }), /* @__PURE__ */ f("span", { children: g("newsletter.loadingCampaign", "Loading campaign...") })]
126
+ }), /* @__PURE__ */ d("span", { children: m("newsletter.loadingCampaign", "Loading campaign...") })]
130
127
  })
131
- }) : J ? /* @__PURE__ */ f("div", {
128
+ }) : K ? /* @__PURE__ */ d("div", {
132
129
  className: "flex items-center justify-center h-full p-6",
133
- children: /* @__PURE__ */ f(_e, {
130
+ children: /* @__PURE__ */ d(ye, {
134
131
  illustration: "empty-generic",
135
- title: g("newsletter.failedLoadCampaign", "Failed to load campaign"),
136
- description: J.message,
137
- action: /* @__PURE__ */ f(m, {
132
+ title: m("newsletter.failedLoadCampaign", "Failed to load campaign"),
133
+ description: K.message,
134
+ action: /* @__PURE__ */ d(p, {
138
135
  type: "button",
139
- onClick: Ze,
140
- children: g("newsletter.backToCampaigns", "Back to Campaigns")
136
+ onClick: Xe,
137
+ children: m("newsletter.backToCampaigns", "Back to Campaigns")
141
138
  })
142
139
  })
143
- }) : /* @__PURE__ */ p("div", {
140
+ }) : /* @__PURE__ */ f("div", {
144
141
  className: "flex flex-col h-full",
145
142
  children: [
146
- U && /* @__PURE__ */ p("div", {
147
- className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-pop ${U.type === "success" ? "bg-status-success-bg/10 text-status-success-text border border-status-success-border/20" : "bg-status-error-bg/10 text-status-error-text border border-status-error-border/20"}`,
148
- children: [U.type === "success" ? /* @__PURE__ */ f(se, { size: 20 }) : /* @__PURE__ */ f(ae, { size: 20 }), /* @__PURE__ */ f("span", { children: U.message })]
143
+ V && /* @__PURE__ */ f("div", {
144
+ className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-pop ${V.type === "success" ? "bg-status-success-bg/10 text-status-success-text border border-status-success-border/20" : "bg-status-error-bg/10 text-status-error-text border border-status-error-border/20"}`,
145
+ children: [V.type === "success" ? /* @__PURE__ */ d(ue, { size: 20 }) : /* @__PURE__ */ d(ce, { size: 20 }), /* @__PURE__ */ d("span", { children: V.message })]
149
146
  }),
150
- /* @__PURE__ */ p("div", {
147
+ /* @__PURE__ */ f("div", {
151
148
  className: "relative overflow-hidden flex items-center justify-between gap-4 p-4 border-b border-border-seam",
152
149
  children: [
153
- /* @__PURE__ */ f(pe, { intensity: "subtle" }),
154
- /* @__PURE__ */ p("div", {
150
+ /* @__PURE__ */ d(he, { intensity: "subtle" }),
151
+ /* @__PURE__ */ f("div", {
155
152
  className: "flex items-center gap-4 min-w-0",
156
153
  children: [
157
- /* @__PURE__ */ f(m, {
154
+ /* @__PURE__ */ d(p, {
158
155
  type: "button",
159
156
  variant: "ghost",
160
157
  size: "icon",
161
- onClick: Ze,
162
- "aria-label": g("newsletter.backToCampaigns", "Back to Campaigns"),
163
- children: /* @__PURE__ */ f(oe, { size: 20 })
158
+ onClick: Xe,
159
+ "aria-label": m("newsletter.backToCampaigns", "Back to Campaigns"),
160
+ children: /* @__PURE__ */ d(le, { size: 20 })
164
161
  }),
165
- /* @__PURE__ */ p("div", {
162
+ /* @__PURE__ */ f("div", {
166
163
  className: "min-w-0",
167
- children: [/* @__PURE__ */ f("h1", {
164
+ children: [/* @__PURE__ */ d("h1", {
168
165
  className: "text-xl font-semibold text-text-primary",
169
- children: /* @__PURE__ */ f(ge, { children: G && !F ? g("newsletter.createCampaign", "Create Campaign") : g("newsletter.editCampaign", "Edit Campaign") })
170
- }), F && /* @__PURE__ */ p("p", {
166
+ children: /* @__PURE__ */ d(ve, { children: U && !N ? m("newsletter.createCampaign", "Create Campaign") : m("newsletter.editCampaign", "Edit Campaign") })
167
+ }), N && /* @__PURE__ */ f("p", {
171
168
  className: "text-sm text-text-secondary truncate",
172
169
  children: [
173
- g("newsletter.editingPrefix", "Editing"),
170
+ m("newsletter.editingPrefix", "Editing"),
174
171
  ":",
175
172
  " ",
176
- j || g("newsletter.untitled", "Untitled")
173
+ k || m("newsletter.untitled", "Untitled")
177
174
  ]
178
175
  })]
179
176
  }),
180
- /* @__PURE__ */ p("div", {
177
+ /* @__PURE__ */ f("div", {
181
178
  className: "flex items-center gap-2 border border-border-seam rounded-lg ml-4 overflow-hidden",
182
- children: [/* @__PURE__ */ p("button", {
179
+ children: [/* @__PURE__ */ f("button", {
183
180
  type: "button",
184
- onClick: () => w("VISUAL"),
185
- className: `px-3 py-1.5 text-sm font-medium transition-colors ${C === "VISUAL" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"}`,
186
- children: [/* @__PURE__ */ f(l, {
181
+ onClick: () => S("VISUAL"),
182
+ className: `px-3 py-1.5 text-sm font-medium transition-colors ${x === "VISUAL" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"}`,
183
+ children: [/* @__PURE__ */ d(s, {
187
184
  size: 16,
188
185
  className: "inline mr-1"
189
- }), g("newsletter.visual", "Visual")]
190
- }), /* @__PURE__ */ p("button", {
186
+ }), m("newsletter.visual", "Visual")]
187
+ }), /* @__PURE__ */ f("button", {
191
188
  type: "button",
192
- onClick: () => w("CODE"),
193
- className: `px-3 py-1.5 text-sm font-medium transition-colors ${C === "CODE" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"}`,
194
- children: [/* @__PURE__ */ f(ce, {
189
+ onClick: () => S("CODE"),
190
+ className: `px-3 py-1.5 text-sm font-medium transition-colors ${x === "CODE" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"}`,
191
+ children: [/* @__PURE__ */ d(de, {
195
192
  size: 16,
196
193
  className: "inline mr-1"
197
- }), g("newsletter.code", "Code")]
194
+ }), m("newsletter.code", "Code")]
198
195
  })]
199
196
  })
200
197
  ]
201
198
  }),
202
- /* @__PURE__ */ p("div", {
199
+ /* @__PURE__ */ f("div", {
203
200
  className: "flex items-center gap-2",
204
201
  children: [
205
- /* @__PURE__ */ f(m, {
202
+ /* @__PURE__ */ d(p, {
206
203
  type: "button",
207
- variant: k ? "secondary" : "outline",
204
+ variant: D ? "secondary" : "outline",
208
205
  size: "icon",
209
- onClick: A,
210
- title: g("newsletter.togglePreview", "Toggle Preview"),
211
- "aria-label": g("newsletter.togglePreview", "Toggle Preview"),
212
- children: /* @__PURE__ */ f(s, { size: 20 })
206
+ onClick: O,
207
+ title: m("newsletter.togglePreview", "Toggle Preview"),
208
+ "aria-label": m("newsletter.togglePreview", "Toggle Preview"),
209
+ children: /* @__PURE__ */ d(a, { size: 20 })
213
210
  }),
214
- /* @__PURE__ */ p(m, {
211
+ /* @__PURE__ */ f(p, {
215
212
  type: "button",
216
- onClick: qe,
213
+ onClick: Ke,
217
214
  disabled: Z,
218
215
  className: "gap-2",
219
- children: [Be || Ve ? /* @__PURE__ */ f(c, {
216
+ children: [q || J ? /* @__PURE__ */ d(o, {
220
217
  size: 20,
221
218
  className: "animate-spin"
222
- }) : /* @__PURE__ */ f(u, { size: 20 }), F ? g("newsletterCommon.save", "Save") : g("newsletter.saveDraft", "Save Draft")]
219
+ }) : /* @__PURE__ */ d(c, { size: 20 }), N ? m("newsletterCommon.save", "Save") : m("newsletter.saveDraft", "Save Draft")]
223
220
  }),
224
- /* @__PURE__ */ f(me, { actions: [
221
+ /* @__PURE__ */ d(ge, { actions: [
225
222
  {
226
- label: g("newsletter.test", "Test"),
223
+ label: m("newsletter.test", "Test"),
227
224
  onSelect: () => L(!0),
228
- disabled: Z || !K && !F,
229
- icon: /* @__PURE__ */ f(de, { size: 16 })
225
+ disabled: Z || !W && !N,
226
+ icon: /* @__PURE__ */ d(u, { size: 16 })
230
227
  },
231
228
  {
232
- label: g("newsletter.schedule", "Schedule"),
233
- onSelect: () => B(!0),
234
- disabled: Z || !K,
235
- icon: /* @__PURE__ */ f(o, { size: 16 })
229
+ label: m("newsletter.schedule", "Schedule"),
230
+ onSelect: () => R(!0),
231
+ disabled: Z || !W,
232
+ icon: /* @__PURE__ */ d(i, { size: 16 })
236
233
  },
237
234
  {
238
- label: g("newsletter.sendNow", "Send Now"),
235
+ label: m("newsletter.sendNow", "Send Now"),
239
236
  onSelect: () => {
240
- Xe();
237
+ Ye();
241
238
  },
242
- disabled: Z || !K,
239
+ disabled: Z || !W,
243
240
  intent: "destructive",
244
- icon: /* @__PURE__ */ f(d, { size: 16 })
241
+ icon: /* @__PURE__ */ d(l, { size: 16 })
245
242
  }
246
243
  ] })
247
244
  ]
248
245
  })
249
246
  ]
250
247
  }),
251
- /* @__PURE__ */ p("div", {
248
+ /* @__PURE__ */ f("div", {
252
249
  className: "flex-1 flex overflow-hidden",
253
- children: [/* @__PURE__ */ p("div", {
254
- className: `${k ? "w-1/2" : "w-full"} flex flex-col border-r border-border-seam`,
255
- children: [/* @__PURE__ */ p("div", {
250
+ children: [/* @__PURE__ */ f("div", {
251
+ className: `${D ? "w-1/2" : "w-full"} flex flex-col border-r border-border-seam`,
252
+ children: [/* @__PURE__ */ f("div", {
256
253
  className: "p-4 space-y-4 border-b border-border-seam",
257
254
  children: [
258
- /* @__PURE__ */ f(be, { children: g("newsletter.editorPurpose", "Where you build the actual email your subscribers receive. Write the subject line that earns the open, compose the body (visually or in raw HTML), and check the live preview on desktop and mobile. Always send yourself a test before you schedule or hit send — once it goes out, it cannot be unsent.") }),
259
- /* @__PURE__ */ f(ve, {
255
+ /* @__PURE__ */ d(Se, { children: m("newsletter.editorPurpose", "Where you build the actual email your subscribers receive. Write the subject line that earns the open, compose the body (visually or in raw HTML), and check the live preview on desktop and mobile. Always send yourself a test before you schedule or hit send — once it goes out, it cannot be unsent.") }),
256
+ /* @__PURE__ */ d(be, {
260
257
  storageKey: "newsletter-campaign-editor",
261
258
  steps: [
262
259
  {
263
260
  id: "save-draft",
264
- label: g("newsletter.nextStepSaveDraft", "Save your draft"),
265
- description: g("newsletter.nextStepSaveDraftDesc", "Give the campaign a title and save before anything else."),
266
- icon: /* @__PURE__ */ f(u, { size: 16 }),
267
- onClick: () => void qe(),
268
- done: F
261
+ label: m("newsletter.nextStepSaveDraft", "Save your draft"),
262
+ description: m("newsletter.nextStepSaveDraftDesc", "Give the campaign a title and save before anything else."),
263
+ icon: /* @__PURE__ */ d(c, { size: 16 }),
264
+ onClick: () => void Ke(),
265
+ done: N
269
266
  },
270
267
  {
271
268
  id: "preview",
272
- label: g("newsletter.nextStepPreview", "Preview on every device"),
273
- description: g("newsletter.nextStepPreviewDesc", "Open the preview panel to check desktop, tablet, and mobile."),
274
- icon: /* @__PURE__ */ f(s, { size: 16 }),
269
+ label: m("newsletter.nextStepPreview", "Preview on every device"),
270
+ description: m("newsletter.nextStepPreviewDesc", "Open the preview panel to check desktop, tablet, and mobile."),
271
+ icon: /* @__PURE__ */ d(a, { size: 16 }),
275
272
  onClick: () => {
276
- k || A();
273
+ D || O();
277
274
  },
278
- done: k
275
+ done: D
279
276
  },
280
277
  {
281
278
  id: "send-test",
282
- label: g("newsletter.nextStepSendTest", "Send yourself a test"),
283
- description: g("newsletter.nextStepSendTestDesc", "Confirm it looks right in a real inbox before sending for real."),
284
- icon: /* @__PURE__ */ f(de, { size: 16 }),
279
+ label: m("newsletter.nextStepSendTest", "Send yourself a test"),
280
+ description: m("newsletter.nextStepSendTestDesc", "Confirm it looks right in a real inbox before sending for real."),
281
+ icon: /* @__PURE__ */ d(u, { size: 16 }),
285
282
  onClick: () => {
286
- K ? L(!0) : $("error", g("newsletter.pleaseSaveFirst", "Please save the campaign first"));
283
+ W ? L(!0) : $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
287
284
  }
288
285
  },
289
286
  {
290
287
  id: "schedule",
291
- label: g("newsletter.nextStepSchedule", "Schedule or send"),
292
- description: g("newsletter.nextStepScheduleDesc", "Pick the perfect time to reach your audience."),
293
- icon: /* @__PURE__ */ f(o, { size: 16 }),
288
+ label: m("newsletter.nextStepSchedule", "Schedule or send"),
289
+ description: m("newsletter.nextStepScheduleDesc", "Pick the perfect time to reach your audience."),
290
+ icon: /* @__PURE__ */ d(i, { size: 16 }),
294
291
  onClick: () => {
295
- K ? B(!0) : $("error", g("newsletter.pleaseSaveFirst", "Please save the campaign first"));
292
+ W ? R(!0) : $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
296
293
  }
297
294
  }
298
295
  ]
299
296
  }),
300
- /* @__PURE__ */ p("div", {
297
+ /* @__PURE__ */ f("div", {
301
298
  className: "grid grid-cols-3 gap-4",
302
299
  children: [
303
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
300
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
304
301
  className: "block text-sm font-medium text-text-primary mb-1",
305
- children: [g("newsletter.campaignTitle", "Campaign Title"), " *"]
306
- }), /* @__PURE__ */ f("input", {
302
+ children: [m("newsletter.campaignTitle", "Campaign Title"), " *"]
303
+ }), /* @__PURE__ */ d("input", {
307
304
  type: "text",
308
- "aria-label": g("newsletter.campaignTitle", "Campaign Title"),
309
- value: j,
305
+ "aria-label": m("newsletter.campaignTitle", "Campaign Title"),
306
+ value: k,
310
307
  onChange: (e) => {
311
- M(e.target.value), (!N || N === Q(j)) && P(Q(e.target.value));
308
+ A(e.target.value), (!j || j === Q(k)) && M(Q(e.target.value));
312
309
  },
313
- placeholder: g("newsletter.enterCampaignTitle", "Enter campaign title..."),
310
+ placeholder: m("newsletter.enterCampaignTitle", "Enter campaign title..."),
314
311
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
315
312
  })] }),
316
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
313
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
317
314
  className: "block text-sm font-medium text-text-primary mb-1",
318
- children: g("newsletter.urlSlug", "URL Slug")
319
- }), /* @__PURE__ */ f("input", {
315
+ children: m("newsletter.urlSlug", "URL Slug")
316
+ }), /* @__PURE__ */ d("input", {
320
317
  type: "text",
321
- "aria-label": g("newsletter.urlSlug", "URL Slug"),
322
- value: N,
323
- onChange: (e) => P(e.target.value),
324
- placeholder: g("newsletter.slugPlaceholder", "campaign-slug"),
325
- disabled: F,
318
+ "aria-label": m("newsletter.urlSlug", "URL Slug"),
319
+ value: j,
320
+ onChange: (e) => M(e.target.value),
321
+ placeholder: m("newsletter.slugPlaceholder", "campaign-slug"),
322
+ disabled: N,
326
323
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent disabled:bg-bg-sunken disabled:cursor-not-allowed"
327
324
  })] }),
328
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
325
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
329
326
  className: "block text-sm font-medium text-text-primary mb-1",
330
- children: [g("newsletter.targetProduct", "Target Product"), " *"]
331
- }), /* @__PURE__ */ f("input", {
327
+ children: [m("newsletter.targetProduct", "Target Product"), " *"]
328
+ }), /* @__PURE__ */ d("input", {
332
329
  type: "text",
333
- "aria-label": g("newsletter.targetProduct", "Target Product"),
334
- value: Pe.find((e) => e.id === (q?.platformProductId || S))?.name || q?.platformProductId || S,
330
+ "aria-label": m("newsletter.targetProduct", "Target Product"),
331
+ value: Fe.find((e) => e.id === (G?.platformProductId || y))?.name || G?.platformProductId || y,
335
332
  readOnly: !0,
336
333
  disabled: !0,
337
334
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-sunken text-text-secondary disabled:cursor-not-allowed"
338
335
  })] })
339
336
  ]
340
337
  }),
341
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
338
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
342
339
  className: "block text-sm font-medium text-text-primary mb-1",
343
- children: [g("newsletter.emailSubjectLine", "Email Subject Line"), " *"]
344
- }), /* @__PURE__ */ f("input", {
340
+ children: [m("newsletter.emailSubjectLine", "Email Subject Line"), " *"]
341
+ }), /* @__PURE__ */ d("input", {
345
342
  type: "text",
346
- "aria-label": g("newsletter.emailSubjectLine", "Email Subject Line"),
347
- value: D.subject,
348
- onChange: (e) => O({ subject: e.target.value }),
349
- placeholder: g("newsletter.enterSubjectLine", "Enter subject line..."),
343
+ "aria-label": m("newsletter.emailSubjectLine", "Email Subject Line"),
344
+ value: T.subject,
345
+ onChange: (e) => E({ subject: e.target.value }),
346
+ placeholder: m("newsletter.enterSubjectLine", "Enter subject line..."),
350
347
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
351
348
  })] }),
352
- /* @__PURE__ */ f(ye, {
353
- title: g("newsletter.advancedDelivery", "Advanced settings"),
354
- description: g("newsletter.advancedDeliveryDescription", "Deliverability tuning, SPF/DKIM, and custom headers."),
355
- children: /* @__PURE__ */ p("div", { children: [
356
- /* @__PURE__ */ f("label", {
349
+ /* @__PURE__ */ d(xe, {
350
+ title: m("newsletter.advancedDelivery", "Advanced settings"),
351
+ description: m("newsletter.advancedDeliveryDescription", "Deliverability tuning, SPF/DKIM, and custom headers."),
352
+ children: /* @__PURE__ */ f("div", { children: [
353
+ /* @__PURE__ */ d("label", {
357
354
  className: "block text-sm font-medium text-text-primary mb-1",
358
- children: g("newsletter.previewText", "Preview Text")
355
+ children: m("newsletter.previewText", "Preview Text")
359
356
  }),
360
- /* @__PURE__ */ f("input", {
357
+ /* @__PURE__ */ d("input", {
361
358
  type: "text",
362
- "aria-label": g("newsletter.previewText", "Preview Text"),
363
- value: D.previewText,
364
- onChange: (e) => O({ previewText: e.target.value }),
365
- placeholder: g("newsletter.previewTextPlaceholder", "This appears in the inbox preview..."),
359
+ "aria-label": m("newsletter.previewText", "Preview Text"),
360
+ value: T.previewText,
361
+ onChange: (e) => E({ previewText: e.target.value }),
362
+ placeholder: m("newsletter.previewTextPlaceholder", "This appears in the inbox preview..."),
366
363
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
367
364
  }),
368
- /* @__PURE__ */ f("p", {
365
+ /* @__PURE__ */ d("p", {
369
366
  className: "mt-1 text-xs text-text-secondary",
370
- children: g("newsletter.previewTextDescription", "This text appears after the subject line in email clients")
367
+ children: m("newsletter.previewTextDescription", "This text appears after the subject line in email clients")
371
368
  })
372
369
  ] })
373
370
  })
374
371
  ]
375
- }), /* @__PURE__ */ f("div", {
372
+ }), /* @__PURE__ */ d("div", {
376
373
  className: "flex-1 overflow-auto p-4",
377
- children: C === "VISUAL" ? /* @__PURE__ */ p(he, {
374
+ children: x === "VISUAL" ? /* @__PURE__ */ f(_e, {
378
375
  treatment: "glass",
379
376
  glow: !0,
380
377
  className: "border-border-seam p-4 min-h-full",
381
- children: [/* @__PURE__ */ p("div", {
378
+ children: [/* @__PURE__ */ f("div", {
382
379
  className: "mb-4 pb-4 border-b border-border-seam",
383
- children: [/* @__PURE__ */ p("p", {
380
+ children: [/* @__PURE__ */ f("p", {
384
381
  className: "text-sm text-text-secondary mb-2",
385
- children: [g("newsletter.personalizationTags", "Personalization Tags"), ":"]
386
- }), /* @__PURE__ */ f("div", {
382
+ children: [m("newsletter.personalizationTags", "Personalization Tags"), ":"]
383
+ }), /* @__PURE__ */ d("div", {
387
384
  className: "flex flex-wrap gap-2",
388
385
  children: [
389
386
  "{{firstName}}",
390
387
  "{{lastName}}",
391
388
  "{{email}}",
392
389
  "{{unsubscribeLink}}"
393
- ].map((e) => /* @__PURE__ */ f("button", {
390
+ ].map((e) => /* @__PURE__ */ d("button", {
394
391
  type: "button",
395
- onClick: () => O({ content: D.content + e }),
392
+ onClick: () => E({ content: T.content + e }),
396
393
  className: "px-2 py-1 text-xs bg-bg-sunken rounded hover:bg-accent",
397
394
  children: e
398
395
  }, e))
399
396
  })]
400
- }), /* @__PURE__ */ f("textarea", {
401
- "aria-label": g("newsletter.emailContent", "Email content"),
402
- value: D.content,
403
- onChange: (e) => O({ content: e.target.value }),
404
- placeholder: g("newsletter.emailContentPlaceholder", "Write your email content here... You can use HTML tags for formatting."),
397
+ }), /* @__PURE__ */ d("textarea", {
398
+ "aria-label": m("newsletter.emailContent", "Email content"),
399
+ value: T.content,
400
+ onChange: (e) => E({ content: e.target.value }),
401
+ placeholder: m("newsletter.emailContentPlaceholder", "Write your email content here... You can use HTML tags for formatting."),
405
402
  className: "w-full h-64 p-4 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent resize-none"
406
403
  })]
407
- }) : /* @__PURE__ */ f("textarea", {
408
- "aria-label": g("newsletter.emailContent", "Email content"),
409
- value: D.content,
410
- onChange: (e) => O({ content: e.target.value }),
411
- placeholder: Me,
404
+ }) : /* @__PURE__ */ d("textarea", {
405
+ "aria-label": m("newsletter.emailContent", "Email content"),
406
+ value: T.content,
407
+ onChange: (e) => E({ content: e.target.value }),
408
+ placeholder: Ne,
412
409
  className: "w-full h-full p-4 font-mono text-sm border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
413
410
  })
414
411
  })]
415
- }), k && /* @__PURE__ */ p("div", {
412
+ }), D && /* @__PURE__ */ f("div", {
416
413
  className: "w-1/2 flex flex-col",
417
- children: [/* @__PURE__ */ p("div", {
414
+ children: [/* @__PURE__ */ f("div", {
418
415
  className: "flex items-center justify-between p-4 border-b border-border-seam",
419
- children: [/* @__PURE__ */ f("h3", {
416
+ children: [/* @__PURE__ */ d("h3", {
420
417
  className: "font-medium text-text-primary",
421
- children: g("newsletter.preview", "Preview")
422
- }), /* @__PURE__ */ p("div", {
418
+ children: m("newsletter.preview", "Preview")
419
+ }), /* @__PURE__ */ f("div", {
423
420
  className: "flex items-center gap-2",
424
421
  children: [
425
- /* @__PURE__ */ f("button", {
422
+ /* @__PURE__ */ d("button", {
426
423
  type: "button",
427
- onClick: () => E("DESKTOP"),
428
- className: `p-2 rounded ${T === "DESKTOP" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
429
- title: g("newsletter.desktop", "Desktop"),
430
- children: /* @__PURE__ */ f(l, { size: 20 })
424
+ onClick: () => w("DESKTOP"),
425
+ className: `p-2 rounded ${C === "DESKTOP" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
426
+ title: m("newsletter.desktop", "Desktop"),
427
+ children: /* @__PURE__ */ d(s, { size: 20 })
431
428
  }),
432
- /* @__PURE__ */ f("button", {
429
+ /* @__PURE__ */ d("button", {
433
430
  type: "button",
434
- onClick: () => E("TABLET"),
435
- className: `p-2 rounded ${T === "TABLET" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
436
- title: g("newsletter.tablet", "Tablet"),
437
- children: /* @__PURE__ */ f(ue, { size: 20 })
431
+ onClick: () => w("TABLET"),
432
+ className: `p-2 rounded ${C === "TABLET" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
433
+ title: m("newsletter.tablet", "Tablet"),
434
+ children: /* @__PURE__ */ d(pe, { size: 20 })
438
435
  }),
439
- /* @__PURE__ */ f("button", {
436
+ /* @__PURE__ */ d("button", {
440
437
  type: "button",
441
- onClick: () => E("MOBILE"),
442
- className: `p-2 rounded ${T === "MOBILE" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
443
- title: g("newsletter.mobile", "Mobile"),
444
- children: /* @__PURE__ */ f(le, { size: 20 })
438
+ onClick: () => w("MOBILE"),
439
+ className: `p-2 rounded ${C === "MOBILE" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
440
+ title: m("newsletter.mobile", "Mobile"),
441
+ children: /* @__PURE__ */ d(fe, { size: 20 })
445
442
  })
446
443
  ]
447
444
  })]
448
- }), /* @__PURE__ */ f("div", {
445
+ }), /* @__PURE__ */ d("div", {
449
446
  className: "flex-1 overflow-auto p-4 bg-bg-sunken",
450
- children: /* @__PURE__ */ p("div", {
451
- className: `mx-auto bg-bg-surface shadow-lg rounded-lg overflow-hidden ${T === "DESKTOP" ? "w-full max-w-2xl" : T === "TABLET" ? "w-[768px] max-w-full" : "w-[375px]"}`,
452
- children: [/* @__PURE__ */ p("div", {
447
+ children: /* @__PURE__ */ f("div", {
448
+ className: `mx-auto bg-bg-surface shadow-lg rounded-lg overflow-hidden ${C === "DESKTOP" ? "w-full max-w-2xl" : C === "TABLET" ? "w-[768px] max-w-full" : "w-[375px]"}`,
449
+ children: [/* @__PURE__ */ f("div", {
453
450
  className: "p-4 border-b border-border-seam bg-bg-sunken",
454
451
  children: [
455
- /* @__PURE__ */ p("div", {
452
+ /* @__PURE__ */ f("div", {
456
453
  className: "text-sm text-text-secondary",
457
454
  children: [
458
- g("newsletter.fromLabel", "From"),
455
+ m("newsletter.fromLabel", "From"),
459
456
  ":",
460
457
  " ",
461
- /* @__PURE__ */ f("span", {
458
+ /* @__PURE__ */ d("span", {
462
459
  className: "text-text-primary",
463
- children: g("newsletter.newsletter", "Newsletter")
460
+ children: m("newsletter.newsletter", "Newsletter")
464
461
  })
465
462
  ]
466
463
  }),
467
- /* @__PURE__ */ p("div", {
464
+ /* @__PURE__ */ f("div", {
468
465
  className: "text-sm text-text-secondary",
469
466
  children: [
470
- g("newsletter.subjectLabel", "Subject"),
467
+ m("newsletter.subjectLabel", "Subject"),
471
468
  ":",
472
469
  " ",
473
- /* @__PURE__ */ f("span", {
470
+ /* @__PURE__ */ d("span", {
474
471
  className: "text-text-primary font-medium",
475
- children: D.subject || g("newsletter.subjectLinePlaceholder", "Subject Line")
472
+ children: T.subject || m("newsletter.subjectLinePlaceholder", "Subject Line")
476
473
  })
477
474
  ]
478
475
  }),
479
- D.previewText && /* @__PURE__ */ f("div", {
476
+ T.previewText && /* @__PURE__ */ d("div", {
480
477
  className: "text-sm text-text-secondary/70 mt-1 truncate",
481
- children: D.previewText
478
+ children: T.previewText
482
479
  })
483
480
  ]
484
- }), /* @__PURE__ */ f("div", {
481
+ }), /* @__PURE__ */ d("div", {
485
482
  className: "p-4",
486
- children: /* @__PURE__ */ f("div", { dangerouslySetInnerHTML: { __html: D.content || `<p style="color: #999;">${g("newsletter.emailContentWillAppear", "Email content will appear here")}</p>` } })
483
+ children: /* @__PURE__ */ d("div", { dangerouslySetInnerHTML: { __html: T.content || `<p style="color: #999;">${m("newsletter.emailContentWillAppear", "Email content will appear here")}</p>` } })
487
484
  })]
488
485
  })
489
486
  })]
490
487
  })]
491
488
  }),
492
- Oe && /* @__PURE__ */ f("div", {
489
+ De && /* @__PURE__ */ d("div", {
493
490
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
494
- children: /* @__PURE__ */ p("div", {
491
+ children: /* @__PURE__ */ f("div", {
495
492
  className: "bg-bg-surface rounded-card shadow-pop border border-border-seam w-full max-w-md p-6",
496
493
  children: [
497
- /* @__PURE__ */ f("h2", {
494
+ /* @__PURE__ */ d("h2", {
498
495
  className: "text-lg font-semibold text-text-primary mb-4",
499
- children: g("newsletter.sendTestEmail", "Send Test Email")
496
+ children: m("newsletter.sendTestEmail", "Send Test Email")
500
497
  }),
501
- /* @__PURE__ */ p("div", {
498
+ /* @__PURE__ */ f("div", {
502
499
  className: "mb-4",
503
500
  children: [
504
- /* @__PURE__ */ f("label", {
501
+ /* @__PURE__ */ d("label", {
505
502
  className: "block text-sm font-medium text-text-primary mb-1",
506
- children: g("newsletter.testEmailAddresses", "Test Email Addresses")
503
+ children: m("newsletter.testEmailAddresses", "Test Email Addresses")
507
504
  }),
508
- /* @__PURE__ */ f("textarea", {
509
- "aria-label": g("newsletter.testEmailAddresses", "Test Email Addresses"),
510
- value: R,
511
- onChange: (e) => z(e.target.value),
512
- placeholder: g("newsletter.testEmailsPlaceholder", "email1@example.com, email2@example.com"),
505
+ /* @__PURE__ */ d("textarea", {
506
+ "aria-label": m("newsletter.testEmailAddresses", "Test Email Addresses"),
507
+ value: Oe,
508
+ onChange: (e) => ke(e.target.value),
509
+ placeholder: m("newsletter.testEmailsPlaceholder", "email1@example.com, email2@example.com"),
513
510
  rows: 3,
514
511
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
515
512
  }),
516
- /* @__PURE__ */ f("p", {
513
+ /* @__PURE__ */ d("p", {
517
514
  className: "mt-1 text-xs text-text-secondary",
518
- children: g("newsletter.separateEmailsWithCommas", "Separate multiple emails with commas")
515
+ children: m("newsletter.separateEmailsWithCommas", "Separate multiple emails with commas")
519
516
  })
520
517
  ]
521
518
  }),
522
- /* @__PURE__ */ p("div", {
519
+ /* @__PURE__ */ f("div", {
523
520
  className: "flex justify-end gap-2",
524
- children: [/* @__PURE__ */ f(m, {
521
+ children: [/* @__PURE__ */ d(p, {
525
522
  type: "button",
526
523
  variant: "outline",
527
524
  onClick: () => L(!1),
528
- children: g("newsletterCommon.cancel", "Cancel")
529
- }), /* @__PURE__ */ p(m, {
525
+ children: m("newsletterCommon.cancel", "Cancel")
526
+ }), /* @__PURE__ */ f(p, {
530
527
  type: "button",
531
- onClick: Je,
528
+ onClick: qe,
532
529
  disabled: X,
533
530
  className: "gap-2",
534
- children: [X ? /* @__PURE__ */ f(c, {
531
+ children: [X ? /* @__PURE__ */ d(o, {
535
532
  size: 16,
536
533
  className: "animate-spin"
537
- }) : /* @__PURE__ */ f(d, { size: 16 }), g("newsletter.sendTest", "Send Test")]
534
+ }) : /* @__PURE__ */ d(l, { size: 16 }), m("newsletter.sendTest", "Send Test")]
538
535
  })]
539
536
  })
540
537
  ]
541
538
  })
542
539
  }),
543
- ke && /* @__PURE__ */ f("div", {
540
+ Ae && /* @__PURE__ */ d("div", {
544
541
  className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
545
- children: /* @__PURE__ */ p("div", {
542
+ children: /* @__PURE__ */ f("div", {
546
543
  className: "bg-bg-surface rounded-card shadow-pop border border-border-seam w-full max-w-md p-6",
547
544
  children: [
548
- /* @__PURE__ */ f("h2", {
545
+ /* @__PURE__ */ d("h2", {
549
546
  className: "text-lg font-semibold text-text-primary mb-4",
550
- children: g("newsletter.scheduleCampaign", "Schedule Campaign")
547
+ children: m("newsletter.scheduleCampaign", "Schedule Campaign")
551
548
  }),
552
- /* @__PURE__ */ p("div", {
549
+ /* @__PURE__ */ f("div", {
553
550
  className: "space-y-4 mb-4",
554
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
551
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
555
552
  className: "block text-sm font-medium text-text-primary mb-1",
556
- children: g("newsletterCommon.date", "Date")
557
- }), /* @__PURE__ */ f("input", {
553
+ children: m("newsletterCommon.date", "Date")
554
+ }), /* @__PURE__ */ d("input", {
558
555
  type: "date",
559
- "aria-label": g("newsletterCommon.date", "Date"),
560
- value: V,
561
- onChange: (e) => Ae(e.target.value),
556
+ "aria-label": m("newsletterCommon.date", "Date"),
557
+ value: z,
558
+ onChange: (e) => je(e.target.value),
562
559
  min: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
563
560
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
564
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
561
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
565
562
  className: "block text-sm font-medium text-text-primary mb-1",
566
- children: g("newsletterCommon.time", "Time")
567
- }), /* @__PURE__ */ f("input", {
563
+ children: m("newsletterCommon.time", "Time")
564
+ }), /* @__PURE__ */ d("input", {
568
565
  type: "time",
569
- "aria-label": g("newsletterCommon.time", "Time"),
570
- value: H,
571
- onChange: (e) => je(e.target.value),
566
+ "aria-label": m("newsletterCommon.time", "Time"),
567
+ value: B,
568
+ onChange: (e) => Me(e.target.value),
572
569
  className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
573
570
  })] })]
574
571
  }),
575
- /* @__PURE__ */ p("div", {
572
+ /* @__PURE__ */ f("div", {
576
573
  className: "flex justify-end gap-2",
577
- children: [/* @__PURE__ */ f(m, {
574
+ children: [/* @__PURE__ */ d(p, {
578
575
  type: "button",
579
576
  variant: "outline",
580
- onClick: () => B(!1),
581
- children: g("newsletterCommon.cancel", "Cancel")
582
- }), /* @__PURE__ */ p(m, {
577
+ onClick: () => R(!1),
578
+ children: m("newsletterCommon.cancel", "Cancel")
579
+ }), /* @__PURE__ */ f(p, {
583
580
  type: "button",
584
- onClick: Ye,
581
+ onClick: Je,
585
582
  disabled: Y,
586
583
  className: "gap-2",
587
- children: [Y ? /* @__PURE__ */ f(c, {
584
+ children: [Y ? /* @__PURE__ */ d(o, {
588
585
  size: 16,
589
586
  className: "animate-spin"
590
- }) : /* @__PURE__ */ f(o, { size: 16 }), g("newsletter.schedule", "Schedule")]
587
+ }) : /* @__PURE__ */ d(i, { size: 16 }), m("newsletter.schedule", "Schedule")]
591
588
  })]
592
589
  })
593
590
  ]
@@ -597,6 +594,6 @@ function h() {
597
594
  });
598
595
  }
599
596
  //#endregion
600
- export { h as CampaignEditorPage };
597
+ export { m as CampaignEditorPage };
601
598
 
602
599
  //# sourceMappingURL=CampaignEditorPage.js.map