@burdenoff/microfe-headshotmarketing 2026.1202.1 → 2026.1203.1

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 (68) hide show
  1. package/dist/generated/wspace-operations.d.ts +346 -0
  2. package/dist/generated/wspace-operations.js +565 -443
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +114 -2
  5. package/dist/generated/wspace-types.js.map +1 -1
  6. package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
  7. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
  8. package/dist/headshotmarketing/components/CrmRecordSelection.js +51 -43
  9. package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -1
  10. package/dist/headshotmarketing/components/EntityTagPicker.d.ts +9 -0
  11. package/dist/headshotmarketing/components/EntityTagPicker.js +261 -0
  12. package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -0
  13. package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
  14. package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
  15. package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
  16. package/dist/headshotmarketing/components/index.d.ts +1 -0
  17. package/dist/headshotmarketing/components/index.js +2 -1
  18. package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
  19. package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
  20. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  21. package/dist/headshotmarketing/hooks/useEntityTags.d.ts +31 -0
  22. package/dist/headshotmarketing/hooks/useEntityTags.js +34 -0
  23. package/dist/headshotmarketing/hooks/useEntityTags.js.map +1 -0
  24. package/dist/headshotmarketing/pages/HomePage.js +33 -26
  25. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +182 -174
  27. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  28. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +309 -294
  29. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  30. package/dist/headshotmarketing/pages/ads/AdsPage.js +0 -8
  31. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  32. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +173 -164
  33. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  34. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +0 -4
  35. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  36. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +0 -4
  37. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  38. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +0 -4
  39. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
  40. package/dist/headshotmarketing/pages/automation/AutomationPage.js +28 -25
  41. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +163 -155
  43. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  44. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +2 -0
  45. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +268 -256
  47. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  48. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +1 -1
  49. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  50. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +136 -128
  51. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  52. package/dist/headshotmarketing/pages/content/ContentPage.js +1 -0
  53. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  54. package/dist/headshotmarketing/pages/crm/ContactsPage.js +1 -0
  55. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  56. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +190 -182
  57. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  58. package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
  59. package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
  60. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +0 -3
  61. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  62. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
  63. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  64. package/dist/headshotmarketing/pages/social-media/PostsPage.js +3 -6
  65. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  66. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +0 -8
  67. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  68. package/package.json +5 -3
@@ -1,179 +1,187 @@
1
1
  import { useDeleteHeadshotmarketingAdCampaignMutation as e, useUpdateHeadshotmarketingAdCampaignMutation as t } from "../../../generated/wspace-operations.js";
2
2
  import { HeadshotmarketingAdCampaignStatus as n } from "../../../generated/wspace-types.js";
3
- import { cn as r, formatCurrency as i, formatDate as a, formatNumber as o, formatPercentage as s } from "../../utils/helpers.js";
4
- import { toAdCampaignModel as c, toAdCampaignStatusEnum as ee, toAdCreativeModel as l, toAudienceModel as u } from "../../utils/adsMapper.js";
3
+ import { cn as ee, formatCurrency as r, formatDate as i, formatNumber as a, formatPercentage as o } from "../../utils/helpers.js";
4
+ import { toAdCampaignModel as te, toAdCampaignStatusEnum as s, toAdCreativeModel as c, toAudienceModel as l } from "../../utils/adsMapper.js";
5
5
  import "../../components/index.js";
6
- import { PageLayout as d } from "../../components/PageLayout.js";
7
- import { StatCard as f } from "../../components/StatCard.js";
8
- import { EmptyState as te } from "../../components/EmptyState.js";
9
- import { StatusBadge as ne } from "../../components/StatusBadge.js";
10
- import { Modal as p } from "../../components/Modal.js";
11
- import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
12
- import { TrackedLinksPanel as m } from "../../components/TrackedLinksPanel.js";
6
+ import { PageLayout as u } from "../../components/PageLayout.js";
7
+ import { StatCard as d } from "../../components/StatCard.js";
8
+ import { EmptyState as ne } from "../../components/EmptyState.js";
9
+ import { StatusBadge as re } from "../../components/StatusBadge.js";
10
+ import { Modal as f } from "../../components/Modal.js";
11
+ import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
12
+ import { TrackedLinksPanel as p } from "../../components/TrackedLinksPanel.js";
13
+ import { EntityTagPicker as m } from "../../components/EntityTagPicker.js";
13
14
  import { useHeadshotMarketing as h } from "../../context/HeadshotMarketingContext.js";
14
- import { useHeadshotmarketingBootstrap as g } from "../../hooks/useHeadshotmarketingBootstrap.js";
15
- import { AdPlatformSyncPanel as _ } from "./AdPlatformSyncPanel.js";
16
- import { AdBudgetAiPanel as v } from "./AdBudgetAiPanel.js";
17
- import { useMemo as y, useState as b } from "react";
18
- import { ArrowLeft as x, Calendar as ie, DollarSign as S, Eye as ae, Link2 as oe, MousePointerClick as se, Pause as ce, Pencil as le, Play as ue, Target as de, Trash2 as fe, TrendingUp as pe } from "lucide-react";
19
- import { useParams as me } from "react-router";
15
+ import { useHeadshotmarketingBootstrap as ae } from "../../hooks/useHeadshotmarketingBootstrap.js";
16
+ import { AdPlatformSyncPanel as oe } from "./AdPlatformSyncPanel.js";
17
+ import { AdBudgetAiPanel as se } from "./AdBudgetAiPanel.js";
18
+ import { useMemo as g, useState as _ } from "react";
19
+ import { ArrowLeft as v, Calendar as ce, DollarSign as y, Eye as le, Link2 as b, MousePointerClick as x, Pause as S, Pencil as ue, Play as de, Target as fe, Trash2 as pe, TrendingUp as me } from "lucide-react";
20
+ import { useParams as he } from "react-router";
20
21
  import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
21
- import { EmphasisPanel as he, PagePurpose as ge, ThemedSelect as E } from "@burdenoff/fe-libs/ui";
22
+ import { EmphasisPanel as ge, PagePurpose as E, ThemedSelect as D } from "@burdenoff/fe-libs/ui";
22
23
  // src/headshotmarketing/pages/ads/AdCampaignDetailsPage.tsx
23
- var D = {
24
+ var O = {
24
25
  google_ads: "Google Ads",
25
26
  facebook: "Facebook",
26
27
  instagram: "Instagram",
27
28
  linkedin: "LinkedIn",
28
29
  twitter: "Twitter"
29
30
  };
30
- function O(e) {
31
+ function k(e) {
31
32
  if (!e) return "";
32
33
  let t = new Date(e);
33
34
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
34
35
  }
35
- var k = () => {
36
- let { navigate: k, basePath: A } = h(), { adCampaignId: j } = me(), { data: M, loading: N, error: P, refetch: F } = g(), [I, L] = b(null), [_e, R] = b(!1), [z, B] = b(null), [V, H] = b(null), [U, { loading: W }] = t(), [ve, { loading: G }] = e(), K = y(() => (M?.headshotmarketingAdCampaigns.items ?? []).find((e) => e.id === j) ?? null, [M?.headshotmarketingAdCampaigns.items, j]), q = K ? c(K) : null, J = y(() => j ? (M?.headshotmarketingAdCreatives.items ?? []).filter((e) => e.adCampaignId === j).map((e) => l(e)) : [], [M?.headshotmarketingAdCreatives.items, j]), Y = y(() => {
37
- if (!q) return [];
38
- let e = new Set(q.audiences);
39
- return (M?.headshotmarketingAudiences.items ?? []).filter((t) => e.has(t.id)).map((e) => u(e));
40
- }, [M?.headshotmarketingAudiences.items, q]), X = () => k(A + "/ads/campaigns"), Z = async () => {
41
- if (j && q) {
42
- B(null);
36
+ var A = () => {
37
+ let { navigate: A, basePath: j } = h(), { adCampaignId: M } = he(), { data: N, loading: P, error: F, refetch: I } = ae(), [L, R] = _(null), [_e, z] = _(!1), [B, V] = _(null), [H, U] = _(null), [W, { loading: G }] = t(), [ve, { loading: K }] = e(), q = g(() => (N?.headshotmarketingAdCampaigns.items ?? []).find((e) => e.id === M) ?? null, [N?.headshotmarketingAdCampaigns.items, M]), J = q ? te(q) : null, Y = g(() => M ? (N?.headshotmarketingAdCreatives.items ?? []).filter((e) => e.adCampaignId === M).map((e) => c(e)) : [], [N?.headshotmarketingAdCreatives.items, M]), X = g(() => {
38
+ if (!J) return [];
39
+ let e = new Set(J.audiences);
40
+ return (N?.headshotmarketingAudiences.items ?? []).filter((t) => e.has(t.id)).map((e) => l(e));
41
+ }, [N?.headshotmarketingAudiences.items, J]), Z = () => A(j + "/ads/campaigns"), ye = async () => {
42
+ if (M && J) {
43
+ V(null);
43
44
  try {
44
- await U({ variables: {
45
- id: j,
46
- input: { status: q.status === "active" ? n.Paused : n.Active }
47
- } }), await F();
45
+ await W({ variables: {
46
+ id: M,
47
+ input: { status: J.status === "active" ? n.Paused : n.Active }
48
+ } }), await I();
48
49
  } catch (e) {
49
- B(e instanceof Error ? e.message : "Failed to update campaign.");
50
+ V(e instanceof Error ? e.message : "Failed to update campaign.");
50
51
  }
51
52
  }
52
- }, ye = async () => {
53
- if (!j || !I) return;
54
- if (!I.name.trim()) {
55
- B("Campaign name is required.");
53
+ }, be = async () => {
54
+ if (!M || !L) return;
55
+ if (!L.name.trim()) {
56
+ V("Campaign name is required.");
56
57
  return;
57
58
  }
58
- B(null);
59
- let e = Number(I.totalBudget);
59
+ V(null);
60
+ let e = Number(L.totalBudget);
60
61
  try {
61
- await U({ variables: {
62
- id: j,
62
+ await W({ variables: {
63
+ id: M,
63
64
  input: {
64
- name: I.name.trim(),
65
- status: ee(I.status),
66
- bidStrategy: I.bidStrategy || null,
67
- totalBudget: I.totalBudget && Number.isFinite(e) ? e : null,
68
- startDate: I.startDate ? new Date(I.startDate).toISOString() : null,
69
- endDate: I.endDate ? new Date(I.endDate).toISOString() : null
65
+ name: L.name.trim(),
66
+ status: s(L.status),
67
+ bidStrategy: L.bidStrategy || null,
68
+ totalBudget: L.totalBudget && Number.isFinite(e) ? e : null,
69
+ startDate: L.startDate ? new Date(L.startDate).toISOString() : null,
70
+ endDate: L.endDate ? new Date(L.endDate).toISOString() : null
70
71
  }
71
- } }), L(null), await F();
72
+ } }), R(null), await I();
72
73
  } catch (e) {
73
- B(e instanceof Error ? e.message : "Failed to save campaign.");
74
+ V(e instanceof Error ? e.message : "Failed to save campaign.");
74
75
  }
75
- }, be = async () => {
76
- if (j) {
77
- B(null);
76
+ }, xe = async () => {
77
+ if (M) {
78
+ V(null);
78
79
  try {
79
- await ve({ variables: { id: j } }), R(!1), await F(), X();
80
+ await ve({ variables: { id: M } }), z(!1), await I(), Z();
80
81
  } catch (e) {
81
- B(e instanceof Error ? e.message : "Failed to delete campaign.");
82
+ V(e instanceof Error ? e.message : "Failed to delete campaign.");
82
83
  }
83
84
  }
84
- }, xe = () => {
85
- q && (B(null), L({
86
- name: q.name,
87
- status: q.status,
88
- totalBudget: q.budget.total > 0 ? String(q.budget.total) : "",
89
- bidStrategy: q.bidStrategy,
90
- startDate: O(q.startDate),
91
- endDate: O(q.endDate)
85
+ }, Se = () => {
86
+ J && (V(null), R({
87
+ name: J.name,
88
+ status: J.status,
89
+ totalBudget: J.budget.total > 0 ? String(J.budget.total) : "",
90
+ bidStrategy: J.bidStrategy,
91
+ startDate: k(J.startDate),
92
+ endDate: k(J.endDate)
92
93
  }));
93
94
  };
94
- if (!q) return /* @__PURE__ */ w(d, {
95
+ if (!J) return /* @__PURE__ */ w(u, {
95
96
  title: "Ad Campaign",
96
- children: /* @__PURE__ */ w(re, {
97
- loading: N,
98
- error: P,
99
- onRetry: F,
100
- hasData: !!M,
101
- children: /* @__PURE__ */ w(te, {
97
+ children: /* @__PURE__ */ w(ie, {
98
+ loading: P,
99
+ error: F,
100
+ onRetry: I,
101
+ hasData: !!N,
102
+ children: /* @__PURE__ */ w(ne, {
102
103
  illustration: "empty-generic",
103
104
  title: "Campaign not found",
104
105
  description: "This ad campaign doesn't exist or has been removed.",
105
106
  action: /* @__PURE__ */ T("button", {
106
- onClick: X,
107
+ onClick: Z,
107
108
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
108
- children: [/* @__PURE__ */ w(x, { className: "h-4 w-4" }), "Back to Campaigns"]
109
+ children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Back to Campaigns"]
109
110
  })
110
111
  })
111
112
  })
112
113
  });
113
- let Q = q.budget.total > 0 ? Math.round(q.budget.spent / q.budget.total * 100) : 0, Se = q.status === "active", $ = W || G;
114
- return /* @__PURE__ */ T(d, {
115
- title: q.name,
116
- description: `${D[q.platform] ?? q.platform} · ${q.bidStrategy}`,
114
+ let Q = J.budget.total > 0 ? Math.round(J.budget.spent / J.budget.total * 100) : 0, Ce = J.status === "active", $ = G || K;
115
+ return /* @__PURE__ */ T(u, {
116
+ title: J.name,
117
+ description: `${O[J.platform] ?? J.platform} · ${J.bidStrategy}`,
117
118
  actions: /* @__PURE__ */ T("div", {
118
119
  className: "flex flex-wrap items-center gap-2",
119
120
  children: [
120
- /* @__PURE__ */ w(ne, { status: q.status }),
121
+ /* @__PURE__ */ w(re, { status: J.status }),
121
122
  /* @__PURE__ */ T("button", {
122
- onClick: X,
123
+ onClick: Z,
123
124
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
124
- children: [/* @__PURE__ */ w(x, { className: "h-4 w-4" }), "Back"]
125
+ children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Back"]
125
126
  }),
126
127
  /* @__PURE__ */ w("button", {
127
- onClick: () => void Z(),
128
+ onClick: () => void ye(),
128
129
  disabled: $,
129
130
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
130
- children: Se ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ce, { className: "h-4 w-4" }), "Pause"] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ue, { className: "h-4 w-4" }), "Activate"] })
131
+ children: Ce ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(S, { className: "h-4 w-4" }), "Pause"] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(de, { className: "h-4 w-4" }), "Activate"] })
131
132
  }),
132
133
  /* @__PURE__ */ T("button", {
133
- onClick: xe,
134
+ onClick: Se,
134
135
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
135
- children: [/* @__PURE__ */ w(le, { className: "h-4 w-4" }), "Edit"]
136
+ children: [/* @__PURE__ */ w(ue, { className: "h-4 w-4" }), "Edit"]
136
137
  }),
137
138
  /* @__PURE__ */ T("button", {
138
- onClick: () => R(!0),
139
+ onClick: () => z(!0),
139
140
  disabled: $,
140
141
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-status-error-text hover:bg-bg-sunken disabled:opacity-60",
141
- children: [/* @__PURE__ */ w(fe, { className: "h-4 w-4" }), "Delete"]
142
+ children: [/* @__PURE__ */ w(pe, { className: "h-4 w-4" }), "Delete"]
142
143
  })
143
144
  ]
144
145
  }),
145
146
  children: [
146
- /* @__PURE__ */ w(ge, { children: "Manage this ad campaign — review budget pacing and performance, adjust its schedule and bid strategy, pause or activate it, and see the creatives and audience it's running against." }),
147
- z && /* @__PURE__ */ w("div", {
147
+ /* @__PURE__ */ w(E, { children: "Manage this ad campaign — review budget pacing and performance, adjust its schedule and bid strategy, pause or activate it, and see the creatives and audience it's running against." }),
148
+ B && /* @__PURE__ */ w("div", {
148
149
  role: "alert",
149
150
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
150
- children: z
151
+ children: B
151
152
  }),
152
- /* @__PURE__ */ w(he, { children: /* @__PURE__ */ T("div", {
153
+ /* @__PURE__ */ w(ge, { children: /* @__PURE__ */ T("div", {
153
154
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
154
155
  children: [
155
- /* @__PURE__ */ w(f, {
156
+ /* @__PURE__ */ w(d, {
156
157
  title: "Spend",
157
- value: i(q.metrics.spend),
158
- icon: /* @__PURE__ */ w(S, { className: "h-5 w-5" })
158
+ value: r(J.metrics.spend),
159
+ icon: /* @__PURE__ */ w(y, { className: "h-5 w-5" })
159
160
  }),
160
- /* @__PURE__ */ w(f, {
161
+ /* @__PURE__ */ w(d, {
161
162
  title: "Impressions",
162
- value: o(q.metrics.impressions),
163
- icon: /* @__PURE__ */ w(ae, { className: "h-5 w-5" })
163
+ value: a(J.metrics.impressions),
164
+ icon: /* @__PURE__ */ w(le, { className: "h-5 w-5" })
164
165
  }),
165
- /* @__PURE__ */ w(f, {
166
+ /* @__PURE__ */ w(d, {
166
167
  title: "Clicks",
167
- value: o(q.metrics.clicks),
168
- icon: /* @__PURE__ */ w(se, { className: "h-5 w-5" })
168
+ value: a(J.metrics.clicks),
169
+ icon: /* @__PURE__ */ w(x, { className: "h-5 w-5" })
169
170
  }),
170
- /* @__PURE__ */ w(f, {
171
+ /* @__PURE__ */ w(d, {
171
172
  title: "ROAS",
172
- value: `${q.metrics.roas.toFixed(1)}x`,
173
- icon: /* @__PURE__ */ w(pe, { className: "h-5 w-5" })
173
+ value: `${J.metrics.roas.toFixed(1)}x`,
174
+ icon: /* @__PURE__ */ w(me, { className: "h-5 w-5" })
174
175
  })
175
176
  ]
176
177
  }) }),
178
+ /* @__PURE__ */ w("div", {
179
+ className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
180
+ children: /* @__PURE__ */ w(m, {
181
+ entityType: "HEADSHOTMARKETING_AD_CAMPAIGN",
182
+ entityId: J.id
183
+ })
184
+ }),
177
185
  /* @__PURE__ */ T("div", {
178
186
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
179
187
  children: [/* @__PURE__ */ T("div", {
@@ -181,33 +189,33 @@ var k = () => {
181
189
  children: [
182
190
  /* @__PURE__ */ T("h4", {
183
191
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
184
- children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 text-text-secondary" }), "Budget"]
192
+ children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 text-text-secondary" }), "Budget"]
185
193
  }),
186
194
  /* @__PURE__ */ T("div", {
187
195
  className: "mb-1.5 flex items-center justify-between text-xs text-text-secondary",
188
196
  children: [
189
- /* @__PURE__ */ T("span", { children: [i(q.budget.spent), " spent"] }),
197
+ /* @__PURE__ */ T("span", { children: [r(J.budget.spent), " spent"] }),
190
198
  /* @__PURE__ */ T("span", { children: [Q, "%"] }),
191
- /* @__PURE__ */ T("span", { children: [i(q.budget.total), " total"] })
199
+ /* @__PURE__ */ T("span", { children: [r(J.budget.total), " total"] })
192
200
  ]
193
201
  }),
194
202
  /* @__PURE__ */ w("div", {
195
203
  className: "h-2.5 w-full rounded-full bg-bg-sunken",
196
204
  children: /* @__PURE__ */ w("div", {
197
- className: r("h-2.5 rounded-full transition-all", Q >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
205
+ className: ee("h-2.5 rounded-full transition-all", Q >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
198
206
  style: { width: `${Math.min(Q, 100)}%` }
199
207
  })
200
208
  }),
201
209
  /* @__PURE__ */ T("p", {
202
210
  className: "mt-3 text-xs text-text-secondary",
203
- children: ["Remaining: ", i(q.budget.remaining)]
211
+ children: ["Remaining: ", r(J.budget.remaining)]
204
212
  })
205
213
  ]
206
214
  }), /* @__PURE__ */ T("div", {
207
215
  className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
208
216
  children: [/* @__PURE__ */ T("h4", {
209
217
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
210
- children: [/* @__PURE__ */ w(ie, { className: "h-4 w-4 text-text-secondary" }), "Schedule & settings"]
218
+ children: [/* @__PURE__ */ w(ce, { className: "h-4 w-4 text-text-secondary" }), "Schedule & settings"]
211
219
  }), /* @__PURE__ */ T("dl", {
212
220
  className: "space-y-2 text-sm",
213
221
  children: [
@@ -218,7 +226,7 @@ var k = () => {
218
226
  children: "Platform"
219
227
  }), /* @__PURE__ */ w("dd", {
220
228
  className: "font-medium text-text-primary",
221
- children: D[q.platform] ?? q.platform
229
+ children: O[J.platform] ?? J.platform
222
230
  })]
223
231
  }),
224
232
  /* @__PURE__ */ T("div", {
@@ -228,7 +236,7 @@ var k = () => {
228
236
  children: "Bid strategy"
229
237
  }), /* @__PURE__ */ w("dd", {
230
238
  className: "font-medium text-text-primary",
231
- children: q.bidStrategy
239
+ children: J.bidStrategy
232
240
  })]
233
241
  }),
234
242
  /* @__PURE__ */ T("div", {
@@ -238,7 +246,7 @@ var k = () => {
238
246
  children: "Start"
239
247
  }), /* @__PURE__ */ w("dd", {
240
248
  className: "font-medium text-text-primary",
241
- children: a(q.startDate)
249
+ children: i(J.startDate)
242
250
  })]
243
251
  }),
244
252
  /* @__PURE__ */ T("div", {
@@ -248,7 +256,7 @@ var k = () => {
248
256
  children: "End"
249
257
  }), /* @__PURE__ */ w("dd", {
250
258
  className: "font-medium text-text-primary",
251
- children: a(q.endDate)
259
+ children: i(J.endDate)
252
260
  })]
253
261
  }),
254
262
  /* @__PURE__ */ T("div", {
@@ -258,7 +266,7 @@ var k = () => {
258
266
  children: "CTR"
259
267
  }), /* @__PURE__ */ w("dd", {
260
268
  className: "font-medium text-text-primary",
261
- children: s(q.metrics.ctr)
269
+ children: o(J.metrics.ctr)
262
270
  })]
263
271
  }),
264
272
  /* @__PURE__ */ T("div", {
@@ -268,24 +276,24 @@ var k = () => {
268
276
  children: "CPC"
269
277
  }), /* @__PURE__ */ T("dd", {
270
278
  className: "font-medium text-text-primary",
271
- children: ["$", q.metrics.cpc.toFixed(2)]
279
+ children: ["$", J.metrics.cpc.toFixed(2)]
272
280
  })]
273
281
  })
274
282
  ]
275
283
  })]
276
284
  })]
277
285
  }),
278
- j && /* @__PURE__ */ w(v, {
279
- adCampaignId: j,
280
- onApplied: F
286
+ M && /* @__PURE__ */ w(se, {
287
+ adCampaignId: M,
288
+ onApplied: I
281
289
  }),
282
- j && /* @__PURE__ */ w(_, {
283
- adCampaignId: j,
284
- onSynced: F
290
+ M && /* @__PURE__ */ w(oe, {
291
+ adCampaignId: M,
292
+ onSynced: I
285
293
  }),
286
- j && /* @__PURE__ */ w(m, {
294
+ M && /* @__PURE__ */ w(p, {
287
295
  sourceType: "AD_CAMPAIGN",
288
- sourceId: j,
296
+ sourceId: M,
289
297
  allowCreate: !0,
290
298
  title: "Tracked links",
291
299
  description: "Create a tracked URL for this campaign's landing page and paste it as the ad destination. Clicks are counted here and attributed as AD_CLICK touchpoints.",
@@ -297,12 +305,12 @@ var k = () => {
297
305
  className: "mb-4 text-sm font-semibold text-text-primary",
298
306
  children: [
299
307
  "Creatives (",
300
- J.length,
308
+ Y.length,
301
309
  ")"
302
310
  ]
303
- }), J.length > 0 ? /* @__PURE__ */ w("div", {
311
+ }), Y.length > 0 ? /* @__PURE__ */ w("div", {
304
312
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
305
- children: J.map((e) => /* @__PURE__ */ T("div", {
313
+ children: Y.map((e) => /* @__PURE__ */ T("div", {
306
314
  className: "rounded-md border border-border-subtle p-3",
307
315
  children: [
308
316
  /* @__PURE__ */ T("div", {
@@ -322,20 +330,20 @@ var k = () => {
322
330
  /* @__PURE__ */ T("div", {
323
331
  className: "mt-2 flex flex-wrap gap-3 text-[11px] text-text-secondary",
324
332
  children: [
325
- /* @__PURE__ */ T("span", { children: [o(e.performance.impressions), " impr."] }),
326
- /* @__PURE__ */ T("span", { children: [o(e.performance.clicks), " clicks"] }),
327
- /* @__PURE__ */ T("span", { children: [s(e.performance.ctr), " CTR"] })
333
+ /* @__PURE__ */ T("span", { children: [a(e.performance.impressions), " impr."] }),
334
+ /* @__PURE__ */ T("span", { children: [a(e.performance.clicks), " clicks"] }),
335
+ /* @__PURE__ */ T("span", { children: [o(e.performance.ctr), " CTR"] })
328
336
  ]
329
337
  }),
330
338
  /* @__PURE__ */ T("button", {
331
339
  type: "button",
332
- onClick: () => H({
340
+ onClick: () => U({
333
341
  id: e.id,
334
342
  name: e.name,
335
343
  landingPageUrl: e.landingPageUrl
336
344
  }),
337
345
  className: "mt-2 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-2 py-1 text-[11px] font-medium text-text-primary hover:bg-bg-sunken",
338
- children: [/* @__PURE__ */ w(oe, { className: "h-3 w-3" }), "Tracked link"]
346
+ children: [/* @__PURE__ */ w(b, { className: "h-3 w-3" }), "Tracked link"]
339
347
  })
340
348
  ]
341
349
  }, e.id))
@@ -349,14 +357,14 @@ var k = () => {
349
357
  children: [/* @__PURE__ */ T("h4", {
350
358
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
351
359
  children: [
352
- /* @__PURE__ */ w(de, { className: "h-4 w-4 text-text-secondary" }),
360
+ /* @__PURE__ */ w(fe, { className: "h-4 w-4 text-text-secondary" }),
353
361
  "Audience (",
354
- Y.length,
362
+ X.length,
355
363
  ")"
356
364
  ]
357
- }), Y.length > 0 ? /* @__PURE__ */ w("div", {
365
+ }), X.length > 0 ? /* @__PURE__ */ w("div", {
358
366
  className: "space-y-3",
359
- children: Y.map((e) => /* @__PURE__ */ T("div", {
367
+ children: X.map((e) => /* @__PURE__ */ T("div", {
360
368
  className: "rounded-md border border-border-subtle p-3",
361
369
  children: [/* @__PURE__ */ T("div", {
362
370
  className: "flex items-center justify-between gap-2",
@@ -365,7 +373,7 @@ var k = () => {
365
373
  children: e.name
366
374
  }), /* @__PURE__ */ T("span", {
367
375
  className: "text-xs text-text-secondary",
368
- children: [o(e.size), " people"]
376
+ children: [a(e.size), " people"]
369
377
  })]
370
378
  }), e.description && /* @__PURE__ */ w("p", {
371
379
  className: "mt-1 text-xs text-text-secondary",
@@ -377,23 +385,23 @@ var k = () => {
377
385
  children: "No audience is linked to this campaign."
378
386
  })]
379
387
  }),
380
- /* @__PURE__ */ w(p, {
381
- open: I !== null,
382
- onClose: () => L(null),
388
+ /* @__PURE__ */ w(f, {
389
+ open: L !== null,
390
+ onClose: () => R(null),
383
391
  title: "Edit Campaign",
384
392
  description: "Update campaign details",
385
393
  size: "lg",
386
394
  footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
387
- onClick: () => L(null),
395
+ onClick: () => R(null),
388
396
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
389
397
  children: "Cancel"
390
398
  }), /* @__PURE__ */ w("button", {
391
- onClick: () => void ye(),
392
- disabled: W,
399
+ onClick: () => void be(),
400
+ disabled: G,
393
401
  className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
394
- children: W ? "Saving..." : "Save Changes"
402
+ children: G ? "Saving..." : "Save Changes"
395
403
  })] }),
396
- children: I && /* @__PURE__ */ T("div", {
404
+ children: L && /* @__PURE__ */ T("div", {
397
405
  className: "space-y-4",
398
406
  children: [
399
407
  /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
@@ -401,9 +409,9 @@ var k = () => {
401
409
  children: "Campaign Name"
402
410
  }), /* @__PURE__ */ w("input", {
403
411
  type: "text",
404
- value: I.name,
405
- onChange: (e) => L({
406
- ...I,
412
+ value: L.name,
413
+ onChange: (e) => R({
414
+ ...L,
407
415
  name: e.target.value
408
416
  }),
409
417
  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)]"
@@ -413,10 +421,10 @@ var k = () => {
413
421
  children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
414
422
  className: "mb-1.5 block text-sm font-medium text-text-primary",
415
423
  children: "Status"
416
- }), /* @__PURE__ */ T(E, {
417
- value: I.status,
418
- onChange: (e) => L({
419
- ...I,
424
+ }), /* @__PURE__ */ T(D, {
425
+ value: L.status,
426
+ onChange: (e) => R({
427
+ ...L,
420
428
  status: e.target.value
421
429
  }),
422
430
  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)]",
@@ -443,9 +451,9 @@ var k = () => {
443
451
  children: "Total Budget (USD)"
444
452
  }), /* @__PURE__ */ w("input", {
445
453
  type: "number",
446
- value: I.totalBudget,
447
- onChange: (e) => L({
448
- ...I,
454
+ value: L.totalBudget,
455
+ onChange: (e) => R({
456
+ ...L,
449
457
  totalBudget: e.target.value
450
458
  }),
451
459
  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)]"
@@ -456,9 +464,9 @@ var k = () => {
456
464
  children: "Bid Strategy"
457
465
  }), /* @__PURE__ */ w("input", {
458
466
  type: "text",
459
- value: I.bidStrategy,
460
- onChange: (e) => L({
461
- ...I,
467
+ value: L.bidStrategy,
468
+ onChange: (e) => R({
469
+ ...L,
462
470
  bidStrategy: e.target.value
463
471
  }),
464
472
  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)]"
@@ -470,9 +478,9 @@ var k = () => {
470
478
  children: "Start Date"
471
479
  }), /* @__PURE__ */ w("input", {
472
480
  type: "date",
473
- value: I.startDate,
474
- onChange: (e) => L({
475
- ...I,
481
+ value: L.startDate,
482
+ onChange: (e) => R({
483
+ ...L,
476
484
  startDate: e.target.value
477
485
  }),
478
486
  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)]"
@@ -481,9 +489,9 @@ var k = () => {
481
489
  children: "End Date"
482
490
  }), /* @__PURE__ */ w("input", {
483
491
  type: "date",
484
- value: I.endDate,
485
- onChange: (e) => L({
486
- ...I,
492
+ value: L.endDate,
493
+ onChange: (e) => R({
494
+ ...L,
487
495
  endDate: e.target.value
488
496
  }),
489
497
  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)]"
@@ -492,35 +500,35 @@ var k = () => {
492
500
  ]
493
501
  })
494
502
  }),
495
- /* @__PURE__ */ w(p, {
496
- open: V !== null,
497
- onClose: () => H(null),
498
- title: V ? `Tracked link · ${V.name}` : "Tracked link",
503
+ /* @__PURE__ */ w(f, {
504
+ open: H !== null,
505
+ onClose: () => U(null),
506
+ title: H ? `Tracked link · ${H.name}` : "Tracked link",
499
507
  description: "Use the tracked URL as this creative's ad destination.",
500
508
  size: "lg",
501
- children: V && /* @__PURE__ */ w(m, {
509
+ children: H && /* @__PURE__ */ w(p, {
502
510
  sourceType: "AD_CREATIVE",
503
- sourceId: V.id,
511
+ sourceId: H.id,
504
512
  allowCreate: !0,
505
- defaultDestinationUrl: V.landingPageUrl,
513
+ defaultDestinationUrl: H.landingPageUrl,
506
514
  title: "Creative tracked links",
507
515
  emptyMessage: "No tracked links for this creative yet."
508
- }, V.id)
516
+ }, H.id)
509
517
  }),
510
- /* @__PURE__ */ w(p, {
518
+ /* @__PURE__ */ w(f, {
511
519
  open: _e,
512
- onClose: () => R(!1),
520
+ onClose: () => z(!1),
513
521
  title: "Delete Campaign",
514
522
  size: "sm",
515
523
  footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
516
- onClick: () => R(!1),
524
+ onClick: () => z(!1),
517
525
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
518
526
  children: "Cancel"
519
527
  }), /* @__PURE__ */ w("button", {
520
- onClick: () => void be(),
521
- disabled: G,
528
+ onClick: () => void xe(),
529
+ disabled: K,
522
530
  className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
523
- children: G ? "Deleting..." : "Delete"
531
+ children: K ? "Deleting..." : "Delete"
524
532
  })] }),
525
533
  children: /* @__PURE__ */ T("p", {
526
534
  className: "text-sm text-text-secondary",
@@ -529,7 +537,7 @@ var k = () => {
529
537
  " ",
530
538
  /* @__PURE__ */ w("span", {
531
539
  className: "font-semibold text-text-primary",
532
- children: q.name
540
+ children: J.name
533
541
  }),
534
542
  "? This action cannot be undone."
535
543
  ]
@@ -538,6 +546,6 @@ var k = () => {
538
546
  ]
539
547
  });
540
548
  };
541
- export { k as AdCampaignDetailsPage };
549
+ export { A as AdCampaignDetailsPage };
542
550
 
543
551
  //# sourceMappingURL=AdCampaignDetailsPage.js.map