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