@burdenoff/microfe-headshotmarketing 2026.1030.2 → 2026.1030.3

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