@burdenoff/microfe-headshotmarketing 2026.704.5 → 2026.704.6

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 (24) hide show
  1. package/dist/generated/wspace-operations.js +197 -100
  2. package/dist/generated/wspace-operations.js.map +1 -1
  3. package/dist/generated/wspace-types.js.map +1 -1
  4. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js +147 -0
  5. package/dist/headshotmarketing/pages/ads/AdReachEstimatePanel.js.map +1 -0
  6. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +246 -235
  7. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  8. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +123 -233
  9. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  10. package/dist/headshotmarketing/pages/campaigns/TemplateCard.js +81 -0
  11. package/dist/headshotmarketing/pages/campaigns/TemplateCard.js.map +1 -0
  12. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js +107 -0
  13. package/dist/headshotmarketing/pages/crm/ConvertLeadButton.js.map +1 -0
  14. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +232 -0
  15. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -0
  16. package/dist/headshotmarketing/pages/crm/LeadsPage.js +267 -233
  17. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  18. package/dist/headshotmarketing/utils/adsMapper.js +2 -2
  19. package/dist/headshotmarketing/utils/adsMapper.js.map +1 -1
  20. package/dist/headshotmarketing/utils/campaignMapper.js +1 -22
  21. package/dist/headshotmarketing/utils/campaignMapper.js.map +1 -1
  22. package/dist/headshotmarketing/utils/crmMapper.js +2 -2
  23. package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
  24. package/package.json +1 -1
@@ -4,14 +4,15 @@ import { cn as i, formatCurrency as a, formatNumber as o } from "../../utils/hel
4
4
  import { HeadshotmarketingAdCampaignStatus as s } from "../../../generated/wspace-types.js";
5
5
  import { PageLayout as ee } from "../../components/PageLayout.js";
6
6
  import "../../components/index.js";
7
- import { AdPlatformChips as c, mapPlatformValueToEnum as te, platformLabel as l, renderPlatformIcon as ne } from "./AdPlatformChips.js";
7
+ import { AdPlatformChips as te, mapPlatformValueToEnum as ne, platformLabel as c, renderPlatformIcon as re } from "./AdPlatformChips.js";
8
+ import { AdReachEstimatePanel as l } from "./AdReachEstimatePanel.js";
8
9
  import { useState as u } from "react";
9
- import { ArrowLeft as d, ArrowRight as re, CalendarDays as ie, Check as f, Rocket as ae, Save as oe, Sparkles as se, Target as ce, Users as p, Wallet as le } from "lucide-react";
10
- import { useSearchParams as ue } from "react-router-dom";
11
- import { Fragment as de, jsx as m, jsxs as h } from "react/jsx-runtime";
12
- import { EmphasisPanel as g, GlassCard as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
10
+ import { ArrowLeft as d, ArrowRight as ie, CalendarDays as ae, Check as oe, Rocket as se, Save as ce, Sparkles as le, Target as ue, Users as f, Wallet as de } from "lucide-react";
11
+ import { useSearchParams as fe } from "react-router-dom";
12
+ import { Fragment as pe, jsx as p, jsxs as m } from "react/jsx-runtime";
13
+ import { EmphasisPanel as h, GlassCard as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
13
14
  //#region src/headshotmarketing/pages/ads/CreateAdCampaignPage.tsx
14
- var _ = [
15
+ var g = [
15
16
  {
16
17
  key: "info",
17
18
  label: "Campaign Info",
@@ -32,25 +33,25 @@ var _ = [
32
33
  label: "Review",
33
34
  step: 4
34
35
  }
35
- ], v = [
36
+ ], ge = [
36
37
  "Brand Awareness",
37
38
  "Traffic",
38
39
  "Engagement",
39
40
  "Lead Generation",
40
41
  "Conversions",
41
42
  "App Installs"
42
- ], me = [
43
+ ], _e = [
43
44
  "18-24",
44
45
  "25-34",
45
46
  "35-44",
46
47
  "45-54",
47
48
  "55-64",
48
49
  "65+"
49
- ], he = [
50
+ ], ve = [
50
51
  "All",
51
52
  "Male",
52
53
  "Female"
53
- ], ge = [
54
+ ], ye = [
54
55
  "Photography",
55
56
  "Business",
56
57
  "Personal Branding",
@@ -59,475 +60,485 @@ var _ = [
59
60
  "Technology",
60
61
  "Marketing",
61
62
  "Entrepreneurship"
62
- ], y = () => {
63
- let { navigate: y, basePath: S } = r(), [C] = ue(), _e = C.get("audienceId"), w = C.get("audienceName"), [ve, { loading: T, error: ye }] = t(), [be, E] = u(null), [D, O] = u("info"), [k, A] = u(null), { data: xe, loading: j } = n({
63
+ ], _ = () => {
64
+ let { navigate: _, basePath: b } = r(), [x] = fe(), be = x.get("audienceId"), S = x.get("audienceName"), [xe, { loading: C, error: Se }] = t(), [Ce, w] = u(null), [T, E] = u("info"), [D, O] = u(null), { data: we, loading: k } = n({
64
65
  variables: {
65
66
  limit: 200,
66
67
  offset: 0,
67
68
  search: null
68
69
  },
69
70
  errorPolicy: "all"
70
- }), M = xe?.headshotmarketingAudiences.items ?? [], [N, Se] = u(""), [P, Ce] = u("google_ads"), [F, we] = u(""), [I, Te] = u(""), [L, Ee] = u(_e ?? ""), [R, De] = u(new Set(["25-34", "35-44"])), [z, Oe] = u("All"), [B, ke] = u("United States"), [V, Ae] = u(new Set(["Photography", "Business"])), [H, U] = u("total"), [W, je] = u("5000"), [G, Me] = u(""), [K, Ne] = u(""), [q, Pe] = u("Maximize Conversions"), J = M.find((e) => e.id === L) ?? (L && w ? {
71
- id: L,
72
- name: w,
71
+ }), A = we?.headshotmarketingAudiences.items ?? [], [j, Te] = u(""), [M, Ee] = u("google_ads"), [N, De] = u(""), [P, F] = u(""), [I, Oe] = u(be ?? ""), [L, ke] = u(new Set(["25-34", "35-44"])), [R, Ae] = u("All"), [z, je] = u("United States"), [B, Me] = u(new Set(["Photography", "Business"])), [V, H] = u("total"), [U, Ne] = u("5000"), [W, Pe] = u(""), [G, Fe] = u(""), [K, Ie] = u("Maximize Conversions"), q = A.find((e) => e.id === I) ?? (I && S ? {
72
+ id: I,
73
+ name: S,
73
74
  estimatedSize: null
74
- } : null), Fe = (e) => {
75
- De((t) => {
75
+ } : null), Le = (e) => {
76
+ ke((t) => {
76
77
  let n = new Set(t);
77
78
  return n.has(e) ? n.delete(e) : n.add(e), n;
78
79
  });
79
- }, Ie = (e) => {
80
- Ae((t) => {
80
+ }, Re = (e) => {
81
+ Me((t) => {
81
82
  let n = new Set(t);
82
83
  return n.has(e) ? n.delete(e) : n.add(e), n;
83
84
  });
84
- }, Y = _.findIndex((e) => e.key === D), Le = () => {
85
- let e = Y + 1;
86
- e < _.length && O(_[e].key);
87
- }, Re = () => {
88
- let e = Y - 1;
89
- e >= 0 && O(_[e].key);
90
- }, X = Number(W), Z = G && K ? Math.max(1, Math.round((new Date(K).getTime() - new Date(G).getTime()) / 864e5) + 1) : null, Q = async (t) => {
91
- if (!N.trim()) {
92
- E("Campaign name is required.");
85
+ }, J = g.findIndex((e) => e.key === T), ze = () => {
86
+ let e = J + 1;
87
+ e < g.length && E(g[e].key);
88
+ }, Be = () => {
89
+ let e = J - 1;
90
+ e >= 0 && E(g[e].key);
91
+ }, Y = Number(U), X = W && G ? Math.max(1, Math.round((new Date(G).getTime() - new Date(W).getTime()) / 864e5) + 1) : null, Z = V === "daily" ? Y : Y / (X ?? 30), Q = async (t) => {
92
+ if (!j.trim()) {
93
+ w("Campaign name is required.");
93
94
  return;
94
95
  }
95
- let n = Number(W);
96
+ let n = Number(U);
96
97
  if (!Number.isFinite(n) || n <= 0) {
97
- E("Budget must be a valid number greater than zero.");
98
+ w("Budget must be a valid number greater than zero.");
98
99
  return;
99
100
  }
100
- if (!G || !K) {
101
- E("Start and end dates are required.");
101
+ if (!W || !G) {
102
+ w("Start and end dates are required.");
102
103
  return;
103
104
  }
104
- let r = new Date(G).getTime(), i = new Date(K).getTime();
105
+ let r = new Date(W).getTime(), i = new Date(G).getTime();
105
106
  if (Number.isFinite(r) && Number.isFinite(i) && i < r) {
106
- E("End date must be after start date.");
107
+ w("End date must be after start date.");
107
108
  return;
108
109
  }
109
- E(null), A(t);
110
+ w(null), O(t);
110
111
  let a = t === "launch" ? s.PendingReview : s.Draft, o = {
111
- name: N,
112
- description: I || null,
113
- platform: te(P),
112
+ name: j,
113
+ description: P || null,
114
+ platform: ne(M),
114
115
  status: a,
115
- audienceId: L || null,
116
- bidStrategy: q,
117
- startDate: new Date(G).toISOString(),
118
- endDate: new Date(K).toISOString(),
119
- dailyBudget: H === "daily" ? n : null,
120
- totalBudget: H === "total" ? n : null,
116
+ audienceId: I || null,
117
+ bidStrategy: K,
118
+ startDate: new Date(W).toISOString(),
119
+ endDate: new Date(G).toISOString(),
120
+ dailyBudget: V === "daily" ? n : null,
121
+ totalBudget: V === "total" ? n : null,
121
122
  metadata: {
122
- objective: F,
123
+ objective: N,
123
124
  targeting: {
124
- ages: Array.from(R),
125
- gender: z,
126
- locations: B.split(",").map((e) => e.trim()).filter(Boolean),
127
- interests: Array.from(V)
125
+ ages: Array.from(L),
126
+ gender: R,
127
+ locations: z.split(",").map((e) => e.trim()).filter(Boolean),
128
+ interests: Array.from(B)
128
129
  }
129
130
  }
130
131
  };
131
132
  try {
132
- await ve({
133
+ await xe({
133
134
  variables: { input: o },
134
135
  refetchQueries: [{
135
136
  query: e,
136
137
  variables: { limit: 200 }
137
138
  }],
138
139
  awaitRefetchQueries: !0
139
- }), y(S + "/ads/campaigns");
140
+ }), _(b + "/ads/campaigns");
140
141
  } catch (e) {
141
- E(e instanceof Error ? e.message : "Failed to create ad campaign.");
142
+ w(e instanceof Error ? e.message : "Failed to create ad campaign.");
142
143
  } finally {
143
- A(null);
144
+ O(null);
144
145
  }
145
- }, $ = be ?? ye?.message ?? null;
146
- return /* @__PURE__ */ h(ee, {
146
+ }, $ = Ce ?? Se?.message ?? null;
147
+ return /* @__PURE__ */ m(ee, {
147
148
  title: "Create Ad Campaign",
148
149
  description: "Set up a new advertising campaign",
149
- actions: /* @__PURE__ */ h("button", {
150
- onClick: () => y(S + "/ads/campaigns"),
150
+ actions: /* @__PURE__ */ m("button", {
151
+ onClick: () => _(b + "/ads/campaigns"),
151
152
  className: "inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
152
- children: [/* @__PURE__ */ m(d, { className: "h-4 w-4" }), "Back"]
153
+ children: [/* @__PURE__ */ p(d, { className: "h-4 w-4" }), "Back"]
153
154
  }),
154
155
  children: [
155
- /* @__PURE__ */ m(pe, { children: "Launch a paid campaign in four guided steps — name it and pick a platform and objective, choose who to target, set your budget and schedule, then review everything before it goes live." }),
156
- J && /* @__PURE__ */ h("div", {
156
+ /* @__PURE__ */ p(he, { children: "Launch a paid campaign in four guided steps — name it and pick a platform and objective, choose who to target, set your budget and schedule, then review everything before it goes live." }),
157
+ q && /* @__PURE__ */ m("div", {
157
158
  className: "flex items-center gap-2 rounded-lg border border-status-info-border/30 bg-status-info-bg/20 px-4 py-3 text-sm text-status-info-text",
158
- children: [/* @__PURE__ */ m(p, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ h("span", { children: [
159
+ children: [/* @__PURE__ */ p(f, { className: "h-4 w-4 shrink-0" }), /* @__PURE__ */ m("span", { children: [
159
160
  "This campaign will target the",
160
161
  " ",
161
- /* @__PURE__ */ m("span", {
162
+ /* @__PURE__ */ p("span", {
162
163
  className: "font-semibold",
163
- children: J.name
164
+ children: q.name
164
165
  }),
165
166
  " ",
166
167
  "audience."
167
168
  ] })]
168
169
  }),
169
- /* @__PURE__ */ m("div", {
170
+ /* @__PURE__ */ p("div", {
170
171
  className: "flex items-center gap-1 overflow-x-auto pb-1",
171
- children: _.map((e, t) => /* @__PURE__ */ h("div", {
172
+ children: g.map((e, t) => /* @__PURE__ */ m("div", {
172
173
  className: "flex shrink-0 items-center",
173
- children: [/* @__PURE__ */ h("button", {
174
- onClick: () => O(e.key),
175
- className: i("flex min-h-9 items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-colors", D === e.key ? "bg-foreground text-background" : t < Y ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-surface"),
176
- children: [t < Y ? /* @__PURE__ */ m(f, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ m("span", {
177
- className: i("flex h-5 w-5 items-center justify-center rounded-full text-xs", D === e.key ? "bg-background/20" : "bg-bg-surface"),
174
+ children: [/* @__PURE__ */ m("button", {
175
+ onClick: () => E(e.key),
176
+ className: i("flex min-h-9 items-center gap-2 rounded-full px-4 py-2 text-sm font-medium transition-colors", T === e.key ? "bg-foreground text-background" : t < J ? "bg-status-success-bg text-status-success-text" : "bg-bg-sunken text-text-secondary hover:bg-bg-surface"),
177
+ children: [t < J ? /* @__PURE__ */ p(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ p("span", {
178
+ className: i("flex h-5 w-5 items-center justify-center rounded-full text-xs", T === e.key ? "bg-background/20" : "bg-bg-surface"),
178
179
  children: e.step
179
- }), /* @__PURE__ */ m("span", {
180
+ }), /* @__PURE__ */ p("span", {
180
181
  className: "hidden sm:inline",
181
182
  children: e.label
182
183
  })]
183
- }), t < _.length - 1 && /* @__PURE__ */ m("div", { className: i("mx-1.5 h-0.5 w-6 rounded-full sm:w-10", t < Y ? "bg-action-primary-bg" : "bg-border") })]
184
+ }), t < g.length - 1 && /* @__PURE__ */ p("div", { className: i("mx-1.5 h-0.5 w-6 rounded-full sm:w-10", t < J ? "bg-action-primary-bg" : "bg-border") })]
184
185
  }, e.key))
185
186
  }),
186
- /* @__PURE__ */ h("div", {
187
+ /* @__PURE__ */ m("div", {
187
188
  className: "grid gap-6 lg:grid-cols-[minmax(0,1fr)_320px]",
188
- children: [/* @__PURE__ */ h("div", {
189
+ children: [/* @__PURE__ */ m("div", {
189
190
  className: "min-w-0 space-y-6",
190
191
  children: [
191
- D === "info" && /* @__PURE__ */ h(g, {
192
+ T === "info" && /* @__PURE__ */ m(h, {
192
193
  className: "space-y-5 p-6",
193
194
  children: [
194
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
195
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
195
196
  className: "mb-1.5 block text-sm font-medium text-text-primary",
196
197
  children: "Campaign Name"
197
- }), /* @__PURE__ */ m("input", {
198
+ }), /* @__PURE__ */ p("input", {
198
199
  type: "text",
199
- value: N,
200
- onChange: (e) => Se(e.target.value),
200
+ value: j,
201
+ onChange: (e) => Te(e.target.value),
201
202
  placeholder: "e.g., Spring Headshot Promo",
202
203
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
203
204
  })] }),
204
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
205
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
205
206
  className: "mb-1.5 block text-sm font-medium text-text-primary",
206
207
  children: "Platform"
207
- }), /* @__PURE__ */ m(c, {
208
- value: P,
209
- onChange: Ce
208
+ }), /* @__PURE__ */ p(te, {
209
+ value: M,
210
+ onChange: Ee
210
211
  })] }),
211
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
212
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
212
213
  className: "mb-1.5 block text-sm font-medium text-text-primary",
213
214
  children: "Objective"
214
- }), /* @__PURE__ */ m("div", {
215
+ }), /* @__PURE__ */ p("div", {
215
216
  className: "grid grid-cols-2 gap-2 sm:grid-cols-3",
216
- children: v.map((e) => /* @__PURE__ */ m("button", {
217
- onClick: () => we(e),
218
- className: i("min-h-11 rounded-md border px-3 py-2 text-sm transition-colors", F === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
217
+ children: ge.map((e) => /* @__PURE__ */ p("button", {
218
+ onClick: () => De(e),
219
+ className: i("min-h-11 rounded-md border px-3 py-2 text-sm transition-colors", N === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
219
220
  children: e
220
221
  }, e))
221
222
  })] }),
222
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
223
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
223
224
  className: "mb-1.5 block text-sm font-medium text-text-primary",
224
225
  children: "Description"
225
- }), /* @__PURE__ */ m("textarea", {
226
- value: I,
227
- onChange: (e) => Te(e.target.value),
226
+ }), /* @__PURE__ */ p("textarea", {
227
+ value: P,
228
+ onChange: (e) => F(e.target.value),
228
229
  rows: 3,
229
230
  placeholder: "Describe your campaign goals...",
230
231
  className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
231
232
  })] })
232
233
  ]
233
234
  }),
234
- D === "targeting" && /* @__PURE__ */ h(g, {
235
+ T === "targeting" && /* @__PURE__ */ m(h, {
235
236
  className: "space-y-5 p-6",
236
237
  children: [
237
- /* @__PURE__ */ h("div", { children: [
238
- /* @__PURE__ */ h("label", {
238
+ /* @__PURE__ */ m("div", { children: [
239
+ /* @__PURE__ */ m("label", {
239
240
  className: "mb-1.5 block text-sm font-medium text-text-primary",
240
241
  children: [
241
242
  "Saved audience",
242
243
  " ",
243
- /* @__PURE__ */ m("span", {
244
+ /* @__PURE__ */ p("span", {
244
245
  className: "font-normal text-text-secondary",
245
246
  children: "(optional)"
246
247
  })
247
248
  ]
248
249
  }),
249
- /* @__PURE__ */ h("select", {
250
- value: L,
251
- onChange: (e) => Ee(e.target.value),
252
- disabled: j,
250
+ /* @__PURE__ */ m("select", {
251
+ value: I,
252
+ onChange: (e) => Oe(e.target.value),
253
+ disabled: k,
253
254
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:opacity-60",
254
- children: [/* @__PURE__ */ m("option", {
255
+ children: [/* @__PURE__ */ p("option", {
255
256
  value: "",
256
- children: j ? "Loading audiences…" : "No saved audience — target manually below"
257
- }), M.map((e) => /* @__PURE__ */ h("option", {
257
+ children: k ? "Loading audiences…" : "No saved audience — target manually below"
258
+ }), A.map((e) => /* @__PURE__ */ m("option", {
258
259
  value: e.id,
259
260
  children: [e.name, e.estimatedSize == null ? "" : ` — ${o(e.estimatedSize)} people`]
260
261
  }, e.id))]
261
262
  }),
262
- /* @__PURE__ */ m("p", {
263
+ /* @__PURE__ */ p("p", {
263
264
  className: "mt-1.5 text-xs text-text-secondary",
264
265
  children: "Attach an audience you saved earlier, or set demographics manually below."
265
266
  })
266
267
  ] }),
267
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
268
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
268
269
  className: "mb-1.5 block text-sm font-medium text-text-primary",
269
270
  children: "Age Range"
270
- }), /* @__PURE__ */ m("div", {
271
+ }), /* @__PURE__ */ p("div", {
271
272
  className: "flex flex-wrap gap-2",
272
- children: me.map((e) => /* @__PURE__ */ m("button", {
273
- onClick: () => Fe(e),
274
- className: i("min-h-9 rounded-full border px-3 py-1.5 text-sm transition-colors", R.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
273
+ children: _e.map((e) => /* @__PURE__ */ p("button", {
274
+ onClick: () => Le(e),
275
+ className: i("min-h-9 rounded-full border px-3 py-1.5 text-sm transition-colors", L.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
275
276
  children: e
276
277
  }, e))
277
278
  })] }),
278
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
279
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
279
280
  className: "mb-1.5 block text-sm font-medium text-text-primary",
280
281
  children: "Gender"
281
- }), /* @__PURE__ */ m("div", {
282
+ }), /* @__PURE__ */ p("div", {
282
283
  className: "flex gap-2",
283
- children: he.map((e) => /* @__PURE__ */ m("button", {
284
- onClick: () => Oe(e),
285
- className: i("min-h-9 rounded-full border px-4 py-1.5 text-sm transition-colors", z === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
284
+ children: ve.map((e) => /* @__PURE__ */ p("button", {
285
+ onClick: () => Ae(e),
286
+ className: i("min-h-9 rounded-full border px-4 py-1.5 text-sm transition-colors", R === e ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
286
287
  children: e
287
288
  }, e))
288
289
  })] }),
289
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
290
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
290
291
  className: "mb-1.5 block text-sm font-medium text-text-primary",
291
292
  children: "Locations"
292
- }), /* @__PURE__ */ m("input", {
293
+ }), /* @__PURE__ */ p("input", {
293
294
  type: "text",
294
- value: B,
295
- onChange: (e) => ke(e.target.value),
295
+ value: z,
296
+ onChange: (e) => je(e.target.value),
296
297
  placeholder: "Enter locations (comma-separated)",
297
298
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
298
299
  })] }),
299
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
300
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
300
301
  className: "mb-1.5 block text-sm font-medium text-text-primary",
301
302
  children: "Interests"
302
- }), /* @__PURE__ */ m("div", {
303
+ }), /* @__PURE__ */ p("div", {
303
304
  className: "flex flex-wrap gap-2",
304
- children: ge.map((e) => /* @__PURE__ */ m("button", {
305
- onClick: () => Ie(e),
306
- className: i("min-h-9 rounded-full border px-3 py-1.5 text-sm transition-colors", V.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
305
+ children: ye.map((e) => /* @__PURE__ */ p("button", {
306
+ onClick: () => Re(e),
307
+ className: i("min-h-9 rounded-full border px-3 py-1.5 text-sm transition-colors", B.has(e) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
307
308
  children: e
308
309
  }, e))
309
310
  })] })
310
311
  ]
311
312
  }),
312
- D === "budget" && /* @__PURE__ */ h(g, {
313
+ T === "budget" && /* @__PURE__ */ m(h, {
313
314
  className: "space-y-5 p-6",
314
315
  children: [
315
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
316
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
316
317
  className: "mb-1.5 block text-sm font-medium text-text-primary",
317
318
  children: "Budget Type"
318
- }), /* @__PURE__ */ h("div", {
319
+ }), /* @__PURE__ */ m("div", {
319
320
  className: "flex gap-2",
320
- children: [/* @__PURE__ */ m("button", {
321
- onClick: () => U("daily"),
322
- className: i("min-h-11 rounded-md border px-4 py-2 text-sm", H === "daily" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
321
+ children: [/* @__PURE__ */ p("button", {
322
+ onClick: () => H("daily"),
323
+ className: i("min-h-11 rounded-md border px-4 py-2 text-sm", V === "daily" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
323
324
  children: "Daily Budget"
324
- }), /* @__PURE__ */ m("button", {
325
- onClick: () => U("total"),
326
- className: i("min-h-11 rounded-md border px-4 py-2 text-sm", H === "total" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
325
+ }), /* @__PURE__ */ p("button", {
326
+ onClick: () => H("total"),
327
+ className: i("min-h-11 rounded-md border px-4 py-2 text-sm", V === "total" ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
327
328
  children: "Total Budget"
328
329
  })]
329
330
  })] }),
330
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
331
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
331
332
  className: "mb-1.5 block text-sm font-medium text-text-primary",
332
- children: [H === "daily" ? "Daily" : "Total", " Budget (USD)"]
333
- }), /* @__PURE__ */ m("input", {
333
+ children: [V === "daily" ? "Daily" : "Total", " Budget (USD)"]
334
+ }), /* @__PURE__ */ p("input", {
334
335
  type: "number",
335
- value: W,
336
- onChange: (e) => je(e.target.value),
336
+ value: U,
337
+ onChange: (e) => Ne(e.target.value),
337
338
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
338
339
  })] }),
339
- /* @__PURE__ */ h("div", {
340
+ /* @__PURE__ */ m("div", {
340
341
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
341
- children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
342
+ children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
342
343
  className: "mb-1.5 block text-sm font-medium text-text-primary",
343
344
  children: "Start Date"
344
- }), /* @__PURE__ */ m("input", {
345
+ }), /* @__PURE__ */ p("input", {
345
346
  type: "date",
346
- value: G,
347
- onChange: (e) => Me(e.target.value),
347
+ value: W,
348
+ onChange: (e) => Pe(e.target.value),
348
349
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
349
- })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
350
+ })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
350
351
  className: "mb-1.5 block text-sm font-medium text-text-primary",
351
352
  children: "End Date"
352
- }), /* @__PURE__ */ m("input", {
353
+ }), /* @__PURE__ */ p("input", {
353
354
  type: "date",
354
- value: K,
355
- onChange: (e) => Ne(e.target.value),
355
+ value: G,
356
+ onChange: (e) => Fe(e.target.value),
356
357
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
357
358
  })] })]
358
359
  }),
359
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
360
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
360
361
  className: "mb-1.5 block text-sm font-medium text-text-primary",
361
362
  children: "Bid Strategy"
362
- }), /* @__PURE__ */ h("select", {
363
- value: q,
364
- onChange: (e) => Pe(e.target.value),
363
+ }), /* @__PURE__ */ m("select", {
364
+ value: K,
365
+ onChange: (e) => Ie(e.target.value),
365
366
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
366
367
  children: [
367
- /* @__PURE__ */ m("option", { children: "Maximize Conversions" }),
368
- /* @__PURE__ */ m("option", { children: "Target CPA" }),
369
- /* @__PURE__ */ m("option", { children: "Target ROAS" }),
370
- /* @__PURE__ */ m("option", { children: "Lowest Cost" }),
371
- /* @__PURE__ */ m("option", { children: "Manual CPC" })
368
+ /* @__PURE__ */ p("option", { children: "Maximize Conversions" }),
369
+ /* @__PURE__ */ p("option", { children: "Target CPA" }),
370
+ /* @__PURE__ */ p("option", { children: "Target ROAS" }),
371
+ /* @__PURE__ */ p("option", { children: "Lowest Cost" }),
372
+ /* @__PURE__ */ p("option", { children: "Manual CPC" })
372
373
  ]
373
374
  })] })
374
375
  ]
375
376
  }),
376
- D === "review" && /* @__PURE__ */ h(g, {
377
+ T === "budget" && /* @__PURE__ */ p(l, {
378
+ audienceId: I || null,
379
+ dailyBudget: Z,
380
+ platform: M
381
+ }),
382
+ T === "review" && /* @__PURE__ */ m(h, {
377
383
  className: "space-y-5 p-6",
378
- children: [/* @__PURE__ */ m("h3", {
384
+ children: [/* @__PURE__ */ p("h3", {
379
385
  className: "text-sm font-semibold text-text-primary",
380
386
  children: "Campaign Summary"
381
- }), /* @__PURE__ */ h("div", {
387
+ }), /* @__PURE__ */ m("div", {
382
388
  className: "space-y-3",
383
389
  children: [
384
- /* @__PURE__ */ m(b, {
390
+ /* @__PURE__ */ p(v, {
385
391
  label: "Name",
386
- value: N || "(Not set)"
392
+ value: j || "(Not set)"
387
393
  }),
388
- /* @__PURE__ */ m(b, {
394
+ /* @__PURE__ */ p(v, {
389
395
  label: "Platform",
390
- value: l(P)
396
+ value: c(M)
391
397
  }),
392
- /* @__PURE__ */ m(b, {
398
+ /* @__PURE__ */ p(v, {
393
399
  label: "Objective",
394
- value: F || "(Not set)"
400
+ value: N || "(Not set)"
395
401
  }),
396
- /* @__PURE__ */ m(b, {
402
+ /* @__PURE__ */ p(v, {
397
403
  label: "Audience",
398
- value: J?.name ?? "Manual targeting"
404
+ value: q?.name ?? "Manual targeting"
399
405
  }),
400
- /* @__PURE__ */ m(b, {
406
+ /* @__PURE__ */ p(v, {
401
407
  label: "Target Ages",
402
- value: Array.from(R).join(", ") || "(Not set)"
408
+ value: Array.from(L).join(", ") || "(Not set)"
403
409
  }),
404
- /* @__PURE__ */ m(b, {
410
+ /* @__PURE__ */ p(v, {
405
411
  label: "Gender",
406
- value: z
412
+ value: R
407
413
  }),
408
- /* @__PURE__ */ m(b, {
414
+ /* @__PURE__ */ p(v, {
409
415
  label: "Locations",
410
- value: B || "(Not set)"
416
+ value: z || "(Not set)"
411
417
  }),
412
- /* @__PURE__ */ m(b, {
418
+ /* @__PURE__ */ p(v, {
413
419
  label: "Interests",
414
- value: Array.from(V).join(", ") || "(Not set)"
420
+ value: Array.from(B).join(", ") || "(Not set)"
415
421
  }),
416
- /* @__PURE__ */ m(b, {
422
+ /* @__PURE__ */ p(v, {
417
423
  label: "Budget",
418
- value: `$${W} (${H})`
424
+ value: `$${U} (${V})`
419
425
  }),
420
- /* @__PURE__ */ m(b, {
426
+ /* @__PURE__ */ p(v, {
421
427
  label: "Schedule",
422
- value: G && K ? `${G} to ${K}` : "(Not set)"
428
+ value: W && G ? `${W} to ${G}` : "(Not set)"
423
429
  }),
424
- /* @__PURE__ */ m(b, {
430
+ /* @__PURE__ */ p(v, {
425
431
  label: "Bid Strategy",
426
- value: q,
432
+ value: K,
427
433
  last: !0
428
434
  })
429
435
  ]
430
436
  })]
431
437
  }),
432
- $ && /* @__PURE__ */ m("div", {
438
+ T === "review" && /* @__PURE__ */ p(l, {
439
+ audienceId: I || null,
440
+ dailyBudget: Z,
441
+ platform: M
442
+ }),
443
+ $ && /* @__PURE__ */ p("div", {
433
444
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
434
445
  children: $
435
446
  }),
436
- /* @__PURE__ */ h("div", {
447
+ /* @__PURE__ */ m("div", {
437
448
  className: "flex items-center justify-between gap-3",
438
- children: [/* @__PURE__ */ h("button", {
439
- onClick: Re,
440
- disabled: Y === 0,
441
- className: i("inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium", Y === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
442
- children: [/* @__PURE__ */ m(d, { className: "h-4 w-4" }), "Previous"]
443
- }), Y < _.length - 1 ? /* @__PURE__ */ h("button", {
444
- onClick: Le,
449
+ children: [/* @__PURE__ */ m("button", {
450
+ onClick: Be,
451
+ disabled: J === 0,
452
+ className: i("inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium", J === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
453
+ children: [/* @__PURE__ */ p(d, { className: "h-4 w-4" }), "Previous"]
454
+ }), J < g.length - 1 ? /* @__PURE__ */ m("button", {
455
+ onClick: ze,
445
456
  className: "inline-flex min-h-11 items-center gap-2 rounded-md bg-foreground px-5 py-2 text-sm font-medium text-background hover:bg-foreground/90",
446
- children: ["Next", /* @__PURE__ */ m(re, { className: "h-4 w-4" })]
447
- }) : /* @__PURE__ */ h("div", {
457
+ children: ["Next", /* @__PURE__ */ p(ie, { className: "h-4 w-4" })]
458
+ }) : /* @__PURE__ */ m("div", {
448
459
  className: "flex items-center gap-2",
449
- children: [/* @__PURE__ */ h("button", {
460
+ children: [/* @__PURE__ */ m("button", {
450
461
  onClick: () => Q("draft"),
451
- disabled: T,
462
+ disabled: C,
452
463
  className: "inline-flex min-h-11 items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
453
- children: [/* @__PURE__ */ m(oe, { className: "h-4 w-4" }), k === "draft" ? "Saving…" : "Save Draft"]
454
- }), /* @__PURE__ */ h("button", {
464
+ children: [/* @__PURE__ */ p(ce, { className: "h-4 w-4" }), D === "draft" ? "Saving…" : "Save Draft"]
465
+ }), /* @__PURE__ */ m("button", {
455
466
  onClick: () => Q("launch"),
456
- disabled: T,
467
+ disabled: C,
457
468
  className: "inline-flex min-h-11 items-center gap-2 rounded-md bg-action-primary-bg px-5 py-2 text-sm font-semibold text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
458
- children: [/* @__PURE__ */ m(ae, { className: "h-4 w-4" }), k === "launch" ? "Launching…" : "Launch Campaign"]
469
+ children: [/* @__PURE__ */ p(se, { className: "h-4 w-4" }), D === "launch" ? "Launching…" : "Launch Campaign"]
459
470
  })]
460
471
  })]
461
472
  })
462
473
  ]
463
- }), /* @__PURE__ */ m("aside", {
474
+ }), /* @__PURE__ */ p("aside", {
464
475
  className: "h-fit lg:sticky lg:top-6",
465
- children: /* @__PURE__ */ h(fe, {
476
+ children: /* @__PURE__ */ m(me, {
466
477
  treatment: "insight",
467
478
  className: "space-y-4 p-5",
468
479
  children: [
469
- /* @__PURE__ */ h("div", {
480
+ /* @__PURE__ */ m("div", {
470
481
  className: "flex items-center gap-2",
471
- children: [/* @__PURE__ */ m(se, { className: "h-4 w-4 text-action-primary-bg" }), /* @__PURE__ */ m("h3", {
482
+ children: [/* @__PURE__ */ p(le, { className: "h-4 w-4 text-action-primary-bg" }), /* @__PURE__ */ p("h3", {
472
483
  className: "text-sm font-semibold text-text-primary",
473
484
  children: "Campaign summary"
474
485
  })]
475
486
  }),
476
- /* @__PURE__ */ h("div", {
487
+ /* @__PURE__ */ m("div", {
477
488
  className: "rounded-lg border border-border-seam bg-accent-wash p-4",
478
- children: [/* @__PURE__ */ m("p", {
489
+ children: [/* @__PURE__ */ p("p", {
479
490
  className: "text-xs text-text-secondary",
480
491
  children: "Estimated audience size"
481
- }), J && J.estimatedSize != null ? /* @__PURE__ */ h(de, { children: [/* @__PURE__ */ h("div", {
492
+ }), q && q.estimatedSize != null ? /* @__PURE__ */ m(pe, { children: [/* @__PURE__ */ m("div", {
482
493
  className: "mt-1 flex items-baseline gap-2",
483
494
  children: [
484
- /* @__PURE__ */ m(p, { className: "h-5 w-5 shrink-0 text-action-primary-bg" }),
485
- /* @__PURE__ */ m("span", {
495
+ /* @__PURE__ */ p(f, { className: "h-5 w-5 shrink-0 text-action-primary-bg" }),
496
+ /* @__PURE__ */ p("span", {
486
497
  className: "text-2xl font-bold text-text-primary",
487
- children: o(J.estimatedSize)
498
+ children: o(q.estimatedSize)
488
499
  }),
489
- /* @__PURE__ */ m("span", {
500
+ /* @__PURE__ */ p("span", {
490
501
  className: "text-xs text-text-secondary",
491
502
  children: "people"
492
503
  })
493
504
  ]
494
- }), /* @__PURE__ */ h("p", {
505
+ }), /* @__PURE__ */ m("p", {
495
506
  className: "mt-1 text-xs text-text-secondary",
496
507
  children: [
497
508
  "from “",
498
- J.name,
509
+ q.name,
499
510
  "”"
500
511
  ]
501
- })] }) : /* @__PURE__ */ m("p", {
512
+ })] }) : /* @__PURE__ */ p("p", {
502
513
  className: "mt-1 text-sm text-text-secondary",
503
514
  children: "Attach a saved audience in the Targeting step to see its estimated size."
504
515
  })]
505
516
  }),
506
- /* @__PURE__ */ h("dl", {
517
+ /* @__PURE__ */ m("dl", {
507
518
  className: "space-y-3 text-sm",
508
519
  children: [
509
- /* @__PURE__ */ m(x, {
510
- icon: ne(P, "h-4 w-4 shrink-0"),
520
+ /* @__PURE__ */ p(y, {
521
+ icon: re(M, "h-4 w-4 shrink-0"),
511
522
  label: "Platform",
512
- value: l(P)
523
+ value: c(M)
513
524
  }),
514
- /* @__PURE__ */ m(x, {
515
- icon: /* @__PURE__ */ m(ce, { className: "h-4 w-4 shrink-0" }),
525
+ /* @__PURE__ */ p(y, {
526
+ icon: /* @__PURE__ */ p(ue, { className: "h-4 w-4 shrink-0" }),
516
527
  label: "Objective",
517
- value: F || "Not set",
518
- muted: !F
528
+ value: N || "Not set",
529
+ muted: !N
519
530
  }),
520
- /* @__PURE__ */ m(x, {
521
- icon: /* @__PURE__ */ m(le, { className: "h-4 w-4 shrink-0" }),
531
+ /* @__PURE__ */ p(y, {
532
+ icon: /* @__PURE__ */ p(de, { className: "h-4 w-4 shrink-0" }),
522
533
  label: "Budget",
523
- value: Number.isFinite(X) && X > 0 ? `${a(X)} ${H === "daily" ? "/ day" : "total"}` : "Not set",
524
- muted: !(Number.isFinite(X) && X > 0)
534
+ value: Number.isFinite(Y) && Y > 0 ? `${a(Y)} ${V === "daily" ? "/ day" : "total"}` : "Not set",
535
+ muted: !(Number.isFinite(Y) && Y > 0)
525
536
  }),
526
- /* @__PURE__ */ m(x, {
527
- icon: /* @__PURE__ */ m(ie, { className: "h-4 w-4 shrink-0" }),
537
+ /* @__PURE__ */ p(y, {
538
+ icon: /* @__PURE__ */ p(ae, { className: "h-4 w-4 shrink-0" }),
528
539
  label: "Schedule",
529
- value: Z ? `${Z} day${Z === 1 ? "" : "s"}` : "Not set",
530
- muted: !Z
540
+ value: X ? `${X} day${X === 1 ? "" : "s"}` : "Not set",
541
+ muted: !X
531
542
  })
532
543
  ]
533
544
  })
@@ -537,26 +548,26 @@ var _ = [
537
548
  })
538
549
  ]
539
550
  });
540
- }, b = ({ label: e, value: t, last: n }) => /* @__PURE__ */ h("div", {
551
+ }, v = ({ label: e, value: t, last: n }) => /* @__PURE__ */ m("div", {
541
552
  className: i("flex justify-between gap-4", !n && "border-b border-border-subtle pb-2"),
542
- children: [/* @__PURE__ */ m("span", {
553
+ children: [/* @__PURE__ */ p("span", {
543
554
  className: "text-sm text-text-secondary",
544
555
  children: e
545
- }), /* @__PURE__ */ m("span", {
556
+ }), /* @__PURE__ */ p("span", {
546
557
  className: "text-right text-sm font-medium text-text-primary",
547
558
  children: t
548
559
  })]
549
- }), x = ({ icon: e, label: t, value: n, muted: r }) => /* @__PURE__ */ h("div", {
560
+ }), y = ({ icon: e, label: t, value: n, muted: r }) => /* @__PURE__ */ m("div", {
550
561
  className: "flex items-center justify-between gap-3",
551
- children: [/* @__PURE__ */ h("dt", {
562
+ children: [/* @__PURE__ */ m("dt", {
552
563
  className: "flex items-center gap-2 text-text-secondary",
553
- children: [e, /* @__PURE__ */ m("span", { children: t })]
554
- }), /* @__PURE__ */ m("dd", {
564
+ children: [e, /* @__PURE__ */ p("span", { children: t })]
565
+ }), /* @__PURE__ */ p("dd", {
555
566
  className: i("truncate text-right font-medium", r ? "text-text-secondary" : "text-text-primary"),
556
567
  children: n
557
568
  })]
558
569
  });
559
570
  //#endregion
560
- export { y as CreateAdCampaignPage };
571
+ export { _ as CreateAdCampaignPage };
561
572
 
562
573
  //# sourceMappingURL=CreateAdCampaignPage.js.map