@burdenoff/microfe-headshotmarketing 2026.626.2 → 2026.704.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 (140) hide show
  1. package/dist/generated/wspace-operations.js +970 -52
  2. package/dist/generated/wspace-operations.js.map +1 -1
  3. package/dist/generated/wspace-types.js +26 -10
  4. package/dist/generated/wspace-types.js.map +1 -1
  5. package/dist/headshotmarketing/HeadshotMarketingRoot.js +45 -44
  6. package/dist/headshotmarketing/HeadshotMarketingRoot.js.map +1 -1
  7. package/dist/headshotmarketing/HeadshotMarketingRoutes.js +20 -0
  8. package/dist/headshotmarketing/HeadshotMarketingRoutes.js.map +1 -1
  9. package/dist/headshotmarketing/components/ActionMenu.js +57 -0
  10. package/dist/headshotmarketing/components/ActionMenu.js.map +1 -0
  11. package/dist/headshotmarketing/components/AssetUploadButton.js +47 -0
  12. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -0
  13. package/dist/headshotmarketing/components/FilterBar.js.map +1 -1
  14. package/dist/headshotmarketing/components/InfluencerModals.js +606 -0
  15. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -0
  16. package/dist/headshotmarketing/components/LoadingSkeleton.js +11 -1
  17. package/dist/headshotmarketing/components/LoadingSkeleton.js.map +1 -0
  18. package/dist/headshotmarketing/components/Modal.js +6 -3
  19. package/dist/headshotmarketing/components/Modal.js.map +1 -1
  20. package/dist/headshotmarketing/components/Pagination.js +117 -0
  21. package/dist/headshotmarketing/components/Pagination.js.map +1 -0
  22. package/dist/headshotmarketing/components/QueryStateBoundary.js +46 -0
  23. package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -0
  24. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  25. package/dist/headshotmarketing/components/TagChipsInput.js +74 -0
  26. package/dist/headshotmarketing/components/TagChipsInput.js.map +1 -0
  27. package/dist/headshotmarketing/components/index.js +6 -0
  28. package/dist/headshotmarketing/context/HeadshotMarketingContext.js +26 -22
  29. package/dist/headshotmarketing/context/HeadshotMarketingContext.js.map +1 -1
  30. package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js +29 -0
  31. package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js.map +1 -0
  32. package/dist/headshotmarketing/hooks/index.js +4 -0
  33. package/dist/headshotmarketing/hooks/useAssetUpload.js +86 -0
  34. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -0
  35. package/dist/headshotmarketing/hooks/useHeadshotmarketingBootstrap.js +12 -0
  36. package/dist/headshotmarketing/hooks/useHeadshotmarketingBootstrap.js.map +1 -0
  37. package/dist/headshotmarketing/hooks/usePagination.js +53 -0
  38. package/dist/headshotmarketing/hooks/usePagination.js.map +1 -0
  39. package/dist/headshotmarketing/pages/HomePage.js +291 -322
  40. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  41. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +522 -225
  42. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +749 -147
  44. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  45. package/dist/headshotmarketing/pages/ads/AdsPage.js +197 -188
  46. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +583 -147
  48. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +218 -206
  50. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +244 -237
  52. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  53. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +278 -272
  54. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
  55. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +197 -193
  56. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  57. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +254 -295
  58. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  59. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +227 -210
  60. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
  61. package/dist/headshotmarketing/pages/automation/AutomationPage.js +239 -168
  62. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  63. package/dist/headshotmarketing/pages/automation/TriggersPage.js +150 -102
  64. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  65. package/dist/headshotmarketing/pages/automation/WorkflowActions.js +287 -0
  66. package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -0
  67. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +56 -58
  68. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +211 -179
  70. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  71. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +444 -306
  72. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  73. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +303 -342
  74. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  75. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +189 -151
  76. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  77. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +417 -274
  78. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  79. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +345 -260
  80. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  81. package/dist/headshotmarketing/pages/content/AIToolsPage.js +261 -192
  82. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  83. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +213 -141
  84. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  85. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +242 -246
  86. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
  87. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +184 -136
  88. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  89. package/dist/headshotmarketing/pages/content/ContentPage.js +208 -159
  90. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  91. package/dist/headshotmarketing/pages/crm/ContactsPage.js +336 -265
  92. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  93. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +76 -87
  94. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  95. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +195 -196
  96. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  97. package/dist/headshotmarketing/pages/crm/CrmActions.js +663 -0
  98. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -0
  99. package/dist/headshotmarketing/pages/crm/CrmPage.js +237 -207
  100. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  101. package/dist/headshotmarketing/pages/crm/LeadsPage.js +168 -165
  102. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  103. package/dist/headshotmarketing/pages/crm/PipelinePage.js +189 -178
  104. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  105. package/dist/headshotmarketing/pages/events/CreateEventPage.js +188 -190
  106. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  107. package/dist/headshotmarketing/pages/events/EventsPage.js +256 -238
  108. package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
  109. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +195 -167
  110. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
  111. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +280 -243
  112. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  113. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +186 -183
  114. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  115. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +303 -231
  116. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  117. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +460 -310
  118. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  119. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +318 -104
  120. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  121. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +266 -255
  122. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
  123. package/dist/headshotmarketing/pages/social-media/PostsPage.js +365 -202
  124. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  125. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +321 -233
  126. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  127. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +324 -308
  128. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  129. package/dist/headshotmarketing/utils/adsMapper.js +74 -51
  130. package/dist/headshotmarketing/utils/adsMapper.js.map +1 -1
  131. package/dist/headshotmarketing/utils/analyticsMapper.js +11 -11
  132. package/dist/headshotmarketing/utils/analyticsMapper.js.map +1 -1
  133. package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
  134. package/dist/headshotmarketing/utils/helpers.js +11 -1
  135. package/dist/headshotmarketing/utils/helpers.js.map +1 -1
  136. package/dist/headshotmarketing/utils/influencerMapper.js +5 -4
  137. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  138. package/package.json +1 -1
  139. package/dist/headshotmarketing/utils/reportMapper.js +0 -33
  140. package/dist/headshotmarketing/utils/reportMapper.js.map +0 -1
@@ -1,324 +1,621 @@
1
- import { useHeadshotMarketing as e } from "../../context/HeadshotMarketingContext.js";
2
- import { useHeadshotmarketingBootstrapDataQuery as t } from "../../../generated/wspace-operations.js";
3
- import { cn as n, formatCurrency as r, formatNumber as i, formatPercentage as a } from "../../utils/helpers.js";
4
- import { toAdCampaignModel as o } from "../../utils/adsMapper.js";
5
- import { PageLayout as s } from "../../components/PageLayout.js";
6
- import { StatusBadge as c } from "../../components/StatusBadge.js";
7
- import { EmptyState as l } from "../../components/EmptyState.js";
8
- import { FilterBar as u } from "../../components/FilterBar.js";
1
+ import { useCreateHeadshotmarketingAdCampaignMutation as e, useDeleteHeadshotmarketingAdCampaignMutation as t, useHeadshotmarketingAdCampaignsListQuery as n, useUpdateHeadshotmarketingAdCampaignMutation as r } from "../../../generated/wspace-operations.js";
2
+ import { useHeadshotMarketing as i } from "../../context/HeadshotMarketingContext.js";
3
+ import { cn as a, formatCurrency as o, formatNumber as s, formatPercentage as c } from "../../utils/helpers.js";
4
+ import { HeadshotmarketingAdCampaignStatus as l, HeadshotmarketingAdPlatform as u } from "../../../generated/wspace-types.js";
5
+ import { toAdCampaignModel as d, toAdCampaignStatusEnum as f, toAdPlatformEnum as ee } from "../../utils/adsMapper.js";
6
+ import { PageLayout as te } from "../../components/PageLayout.js";
7
+ import { StatusBadge as p } from "../../components/StatusBadge.js";
8
+ import { EmptyState as ne } from "../../components/EmptyState.js";
9
+ import { FilterBar as re } from "../../components/FilterBar.js";
10
+ import { Modal as m } from "../../components/Modal.js";
11
+ import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
12
+ import { Pagination as h } from "../../components/Pagination.js";
9
13
  import "../../components/index.js";
10
- import { useMemo as d, useState as f } from "react";
11
- import { DollarSign as p, Eye as m, MoreHorizontal as h, MousePointerClick as g, Plus as _, TrendingUp as v } from "lucide-react";
12
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
13
- import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
14
+ import { useHeadshotmarketingBootstrap as ae } from "../../hooks/useHeadshotmarketingBootstrap.js";
15
+ import { usePagination as oe } from "../../hooks/usePagination.js";
16
+ import { useEffect as g, useMemo as _, useState as v } from "react";
17
+ import { Copy as y, DollarSign as b, Eye as x, MoreHorizontal as S, MousePointerClick as C, Pause as w, Pencil as T, Play as E, Plus as D, Trash2 as O, TrendingUp as k } from "lucide-react";
18
+ import { useExclusiveMenu as A } from "@burdenoff/fe-libs/shared/hooks";
19
+ import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
20
+ import { EmphasisPanel as se, PagePurpose as ce } from "@burdenoff/fe-libs/ui";
14
21
  //#region src/headshotmarketing/pages/ads/AdCampaignsPage.tsx
15
- var w = {
22
+ var P = {
16
23
  google_ads: "Google Ads",
17
24
  facebook: "Facebook",
18
25
  instagram: "Instagram",
19
26
  linkedin: "LinkedIn",
20
27
  twitter: "Twitter"
21
- }, T = {
28
+ }, F = {
22
29
  google_ads: "bg-status-info-bg text-status-info-text",
23
30
  facebook: "bg-status-info-bg text-status-info-text",
24
31
  instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
25
32
  linkedin: "bg-status-info-bg text-status-info-text",
26
33
  twitter: "bg-status-info-bg text-status-info-text"
27
- }, E = () => {
28
- let { navigate: E } = e(), { data: D } = t({ variables: {
29
- limit: 200,
30
- offset: 0
31
- } }), [O, k] = f(""), [A, j] = f("all"), [M, N] = f("all"), [P, F] = f(null), I = d(() => (D?.headshotmarketingAdCampaigns.items ?? []).map((e) => o(e)), [D?.headshotmarketingAdCampaigns.items]), L = d(() => {
32
- let e = [...I];
33
- if (O) {
34
- let t = O.toLowerCase();
35
- e = e.filter((e) => e.name.toLowerCase().includes(t));
36
- }
37
- return A !== "all" && (e = e.filter((e) => e.status === A)), M !== "all" && (e = e.filter((e) => e.platform === M)), e;
34
+ }, le = {
35
+ active: l.Active,
36
+ paused: l.Paused,
37
+ completed: l.Completed,
38
+ draft: l.Draft
39
+ }, ue = {
40
+ google_ads: u.GoogleAds,
41
+ facebook: u.FacebookAds,
42
+ instagram: u.InstagramAds,
43
+ linkedin: u.LinkedinAds,
44
+ twitter: u.TwitterAds
45
+ };
46
+ function I(e) {
47
+ if (!e) return "";
48
+ let t = new Date(e);
49
+ return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
50
+ }
51
+ var L = () => {
52
+ let { navigate: a, basePath: c } = i(), u = (e) => a(c + e), { data: p, refetch: y } = ae(), [b, x] = v(""), [S, C] = v(""), [w, T] = v("all"), [E, O] = v("all"), [k, A] = v(null), [P, F] = v(null), [L, R] = v(null), [z, B] = v(null), V = oe({ initialPageSize: 10 }), { limit: fe, offset: pe, setPage: H, setTotal: U } = V;
53
+ g(() => {
54
+ let e = setTimeout(() => C(b), 300);
55
+ return () => clearTimeout(e);
56
+ }, [b]), g(() => {
57
+ H(1);
38
58
  }, [
39
- O,
40
- A,
41
- M,
42
- I
43
- ]), R = d(() => {
44
- let e = I.filter((e) => e.status === "active").length, t = I.reduce((e, t) => e + t.metrics.spend, 0), n = I.reduce((e, t) => e + t.metrics.impressions, 0), r = I.filter((e) => e.metrics.roas > 0);
59
+ S,
60
+ w,
61
+ E,
62
+ H
63
+ ]);
64
+ let { data: W, loading: G, error: me, refetch: K } = n({
65
+ variables: {
66
+ limit: fe,
67
+ offset: pe,
68
+ search: S || null,
69
+ status: le[w] ?? null,
70
+ platform: ue[E] ?? null
71
+ },
72
+ errorPolicy: "all",
73
+ notifyOnNetworkStatusChange: !0
74
+ }), q = W?.headshotmarketingAdCampaigns.total ?? 0;
75
+ g(() => {
76
+ U(q);
77
+ }, [q, U]);
78
+ let J = _(() => (W?.headshotmarketingAdCampaigns.items ?? []).map((e) => d(e)), [W?.headshotmarketingAdCampaigns.items]), Y = _(() => {
79
+ let e = (p?.headshotmarketingAdCampaigns.items ?? []).map((e) => d(e)), t = e.filter((e) => e.status === "active").length, n = e.reduce((e, t) => e + t.metrics.spend, 0), r = e.reduce((e, t) => e + t.metrics.impressions, 0), i = e.filter((e) => e.metrics.roas > 0);
45
80
  return {
46
- active: e,
47
- totalSpend: t,
48
- totalImpressions: n,
49
- avgRoas: r.length > 0 ? r.reduce((e, t) => e + t.metrics.roas, 0) / r.length : 0
81
+ active: t,
82
+ totalSpend: n,
83
+ totalImpressions: r,
84
+ avgRoas: i.length > 0 ? i.reduce((e, t) => e + t.metrics.roas, 0) / i.length : 0
50
85
  };
51
- }, [I]);
52
- return /* @__PURE__ */ x(s, {
86
+ }, [p?.headshotmarketingAdCampaigns.items]), [he] = e(), [X, { loading: Z }] = r(), [ge, { loading: Q }] = t(), $ = async () => {
87
+ await Promise.all([K(), y()]);
88
+ }, _e = async (e) => {
89
+ A(null), B(null);
90
+ try {
91
+ await X({ variables: {
92
+ id: e.id,
93
+ input: { status: e.status === "active" ? l.Paused : l.Active }
94
+ } }), await $();
95
+ } catch (e) {
96
+ B(e instanceof Error ? e.message : "Failed to update campaign.");
97
+ }
98
+ }, ve = async (e) => {
99
+ A(null), B(null);
100
+ try {
101
+ await he({ variables: { input: {
102
+ name: `${e.name} (Copy)`,
103
+ platform: ee(e.platform),
104
+ status: l.Draft,
105
+ bidStrategy: e.bidStrategy,
106
+ totalBudget: e.budget.total > 0 ? e.budget.total : null,
107
+ startDate: e.startDate ? new Date(e.startDate).toISOString() : null,
108
+ endDate: e.endDate ? new Date(e.endDate).toISOString() : null,
109
+ audienceId: e.audiences[0] ?? null
110
+ } } }), await $();
111
+ } catch (e) {
112
+ B(e instanceof Error ? e.message : "Failed to duplicate campaign.");
113
+ }
114
+ }, ye = async () => {
115
+ if (!P) return;
116
+ if (!P.name.trim()) {
117
+ B("Campaign name is required.");
118
+ return;
119
+ }
120
+ B(null);
121
+ let e = Number(P.totalBudget);
122
+ try {
123
+ await X({ variables: {
124
+ id: P.id,
125
+ input: {
126
+ name: P.name.trim(),
127
+ status: f(P.status),
128
+ bidStrategy: P.bidStrategy || null,
129
+ totalBudget: P.totalBudget && Number.isFinite(e) ? e : null,
130
+ startDate: P.startDate ? new Date(P.startDate).toISOString() : null,
131
+ endDate: P.endDate ? new Date(P.endDate).toISOString() : null
132
+ }
133
+ } }), F(null), await $();
134
+ } catch (e) {
135
+ B(e instanceof Error ? e.message : "Failed to save campaign.");
136
+ }
137
+ }, be = async () => {
138
+ if (L) {
139
+ B(null);
140
+ try {
141
+ await ge({ variables: { id: L.id } }), R(null), await $();
142
+ } catch (e) {
143
+ B(e instanceof Error ? e.message : "Failed to delete campaign.");
144
+ }
145
+ }
146
+ }, xe = (e) => {
147
+ A(null), B(null), F({
148
+ id: e.id,
149
+ name: e.name,
150
+ status: e.status,
151
+ totalBudget: e.budget.total > 0 ? String(e.budget.total) : "",
152
+ bidStrategy: e.bidStrategy,
153
+ startDate: I(e.startDate),
154
+ endDate: I(e.endDate)
155
+ });
156
+ };
157
+ return /* @__PURE__ */ N(te, {
53
158
  title: "Ad Campaigns",
54
159
  description: "Create and manage your advertising campaigns",
55
- actions: /* @__PURE__ */ x("button", {
56
- onClick: () => E("/ads/campaigns/new"),
160
+ actions: /* @__PURE__ */ N("button", {
161
+ onClick: () => u("/ads/campaigns/new"),
57
162
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
58
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Create Campaign"]
163
+ children: [/* @__PURE__ */ M(D, { className: "h-4 w-4" }), "Create Campaign"]
59
164
  }),
60
165
  children: [
61
- /* @__PURE__ */ b(C, { children: "A focused view of every ad campaign — filter by platform or status, watch budget pacing at a glance, and pause, edit or duplicate any campaign without leaving the list." }),
62
- /* @__PURE__ */ b(S, { children: /* @__PURE__ */ x("div", {
166
+ /* @__PURE__ */ M(ce, { children: "A focused view of every ad campaign — filter by platform or status, watch budget pacing at a glance, and pause, edit or duplicate any campaign without leaving the list." }),
167
+ /* @__PURE__ */ M(se, { children: /* @__PURE__ */ N("div", {
63
168
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
64
169
  children: [
65
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
170
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
66
171
  className: "text-xs text-text-secondary",
67
172
  children: "Active Campaigns"
68
- }), /* @__PURE__ */ b("p", {
173
+ }), /* @__PURE__ */ M("p", {
69
174
  className: "text-2xl font-semibold text-text-primary",
70
- children: i(R.active)
175
+ children: s(Y.active)
71
176
  })] }),
72
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
177
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
73
178
  className: "text-xs text-text-secondary",
74
179
  children: "Total Spend"
75
- }), /* @__PURE__ */ b("p", {
180
+ }), /* @__PURE__ */ M("p", {
76
181
  className: "text-2xl font-semibold text-text-primary",
77
- children: r(R.totalSpend)
182
+ children: o(Y.totalSpend)
78
183
  })] }),
79
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
184
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
80
185
  className: "text-xs text-text-secondary",
81
186
  children: "Impressions"
82
- }), /* @__PURE__ */ b("p", {
187
+ }), /* @__PURE__ */ M("p", {
83
188
  className: "text-2xl font-semibold text-text-primary",
84
- children: i(R.totalImpressions)
189
+ children: s(Y.totalImpressions)
85
190
  })] }),
86
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
191
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
87
192
  className: "text-xs text-text-secondary",
88
193
  children: "Avg ROAS"
89
- }), /* @__PURE__ */ x("p", {
194
+ }), /* @__PURE__ */ N("p", {
90
195
  className: "text-2xl font-semibold text-text-primary",
91
- children: [R.avgRoas.toFixed(1), "x"]
196
+ children: [Y.avgRoas.toFixed(1), "x"]
92
197
  })] })
93
198
  ]
94
199
  }) }),
95
- /* @__PURE__ */ b(u, {
96
- searchValue: O,
97
- onSearchChange: k,
200
+ /* @__PURE__ */ M(re, {
201
+ searchValue: b,
202
+ onSearchChange: x,
98
203
  searchPlaceholder: "Search campaigns...",
99
- filters: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("select", {
100
- value: A,
101
- onChange: (e) => j(e.target.value),
204
+ filters: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("select", {
205
+ value: w,
206
+ onChange: (e) => T(e.target.value),
102
207
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
103
208
  children: [
104
- /* @__PURE__ */ b("option", {
209
+ /* @__PURE__ */ M("option", {
105
210
  value: "all",
106
211
  children: "All Status"
107
212
  }),
108
- /* @__PURE__ */ b("option", {
213
+ /* @__PURE__ */ M("option", {
109
214
  value: "active",
110
215
  children: "Active"
111
216
  }),
112
- /* @__PURE__ */ b("option", {
217
+ /* @__PURE__ */ M("option", {
113
218
  value: "paused",
114
219
  children: "Paused"
115
220
  }),
116
- /* @__PURE__ */ b("option", {
221
+ /* @__PURE__ */ M("option", {
117
222
  value: "completed",
118
223
  children: "Completed"
119
224
  }),
120
- /* @__PURE__ */ b("option", {
225
+ /* @__PURE__ */ M("option", {
121
226
  value: "draft",
122
227
  children: "Draft"
123
228
  })
124
229
  ]
125
- }), /* @__PURE__ */ x("select", {
126
- value: M,
127
- onChange: (e) => N(e.target.value),
230
+ }), /* @__PURE__ */ N("select", {
231
+ value: E,
232
+ onChange: (e) => O(e.target.value),
128
233
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
129
234
  children: [
130
- /* @__PURE__ */ b("option", {
235
+ /* @__PURE__ */ M("option", {
131
236
  value: "all",
132
237
  children: "All Platforms"
133
238
  }),
134
- /* @__PURE__ */ b("option", {
239
+ /* @__PURE__ */ M("option", {
135
240
  value: "google_ads",
136
241
  children: "Google Ads"
137
242
  }),
138
- /* @__PURE__ */ b("option", {
243
+ /* @__PURE__ */ M("option", {
139
244
  value: "facebook",
140
245
  children: "Facebook"
141
246
  }),
142
- /* @__PURE__ */ b("option", {
247
+ /* @__PURE__ */ M("option", {
143
248
  value: "instagram",
144
249
  children: "Instagram"
145
250
  }),
146
- /* @__PURE__ */ b("option", {
251
+ /* @__PURE__ */ M("option", {
147
252
  value: "linkedin",
148
253
  children: "LinkedIn"
149
254
  }),
150
- /* @__PURE__ */ b("option", {
255
+ /* @__PURE__ */ M("option", {
151
256
  value: "twitter",
152
257
  children: "Twitter"
153
258
  })
154
259
  ]
155
260
  })] })
156
261
  }),
157
- L.length === 0 && /* @__PURE__ */ b(l, {
158
- illustration: I.length === 0 ? "empty-generic" : "empty-search",
159
- title: I.length === 0 ? "No ad campaigns yet" : "No campaigns match your filters",
160
- description: I.length === 0 ? "Create your first ad campaign to start running paid traffic." : "Try a different search term, platform or status.",
161
- action: I.length === 0 ? /* @__PURE__ */ x("button", {
162
- onClick: () => E("/ads/campaigns/new"),
163
- 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",
164
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Create Campaign"]
165
- }) : void 0
262
+ z && /* @__PURE__ */ M("div", {
263
+ role: "alert",
264
+ className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
265
+ children: z
166
266
  }),
167
- /* @__PURE__ */ b("div", {
168
- className: "space-y-4",
169
- children: L.map((e) => {
170
- let t = e.budget.total > 0 ? e.budget.spent / e.budget.total * 100 : 0;
171
- return /* @__PURE__ */ x("div", {
172
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-5",
173
- children: [
174
- /* @__PURE__ */ x("div", {
175
- className: "flex items-start justify-between mb-4",
176
- children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
177
- className: "flex items-center gap-3 mb-1",
178
- children: [
179
- /* @__PURE__ */ b("h3", {
180
- className: "text-sm font-semibold text-text-primary",
181
- children: e.name
182
- }),
183
- /* @__PURE__ */ b("span", {
184
- className: n("rounded-full px-2.5 py-0.5 text-xs font-medium", T[e.platform]),
185
- children: w[e.platform]
186
- }),
187
- /* @__PURE__ */ b(c, { status: e.status })
188
- ]
189
- }), /* @__PURE__ */ x("p", {
190
- className: "text-xs text-text-secondary",
191
- children: [
192
- e.adFormat,
193
- " · ",
194
- e.bidStrategy,
195
- " ·",
196
- " ",
197
- e.startDate,
198
- " to ",
199
- e.endDate
200
- ]
201
- })] }), /* @__PURE__ */ x("div", {
202
- className: "relative",
203
- children: [/* @__PURE__ */ b("button", {
204
- onClick: () => F(P === e.id ? null : e.id),
205
- className: "rounded-md p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
206
- children: /* @__PURE__ */ b(h, { className: "h-4 w-4" })
207
- }), P === e.id && /* @__PURE__ */ x("div", {
208
- className: "absolute right-0 top-8 z-10 w-40 rounded-md border border-border-seam bg-gloss-card shadow-pop py-1 shadow-lg",
209
- children: [
210
- /* @__PURE__ */ b("button", {
211
- className: "w-full px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
212
- children: "Edit"
213
- }),
214
- /* @__PURE__ */ b("button", {
215
- className: "w-full px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
216
- children: e.status === "active" ? "Pause" : "Resume"
217
- }),
218
- /* @__PURE__ */ b("button", {
219
- className: "w-full px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
220
- children: "Duplicate"
221
- }),
222
- /* @__PURE__ */ b("button", {
223
- className: "w-full px-4 py-2 text-left text-sm text-status-error-text hover:bg-bg-sunken",
224
- children: "Delete"
225
- })
226
- ]
227
- })]
228
- })]
229
- }),
230
- /* @__PURE__ */ x("div", {
231
- className: "mb-4",
232
- children: [/* @__PURE__ */ x("div", {
233
- className: "flex items-center justify-between text-xs mb-1",
234
- children: [/* @__PURE__ */ x("span", {
235
- className: "text-text-secondary",
236
- children: [
237
- "Budget: ",
238
- r(e.budget.spent),
239
- " /",
240
- " ",
241
- r(e.budget.total)
242
- ]
243
- }), /* @__PURE__ */ x("span", {
244
- className: "text-text-secondary",
245
- children: [t.toFixed(0), "%"]
246
- })]
247
- }), /* @__PURE__ */ b("div", {
248
- className: "h-2 w-full rounded-full bg-bg-sunken overflow-hidden",
249
- children: /* @__PURE__ */ b("div", {
250
- className: n("h-full rounded-full", t > 90 ? "bg-status-error-text" : t > 70 ? "bg-status-warning-text" : "bg-status-success-text"),
251
- style: { width: `${Math.min(t, 100)}%` }
252
- })
253
- })]
267
+ /* @__PURE__ */ M(ie, {
268
+ loading: G,
269
+ error: me,
270
+ onRetry: K,
271
+ hasData: !!W,
272
+ children: J.length === 0 ? /* @__PURE__ */ M(ne, {
273
+ illustration: q === 0 ? "empty-generic" : "empty-search",
274
+ title: q === 0 ? "No ad campaigns yet" : "No campaigns match your filters",
275
+ description: q === 0 ? "Create your first ad campaign to start running paid traffic." : "Try a different search term, platform or status.",
276
+ action: q === 0 ? /* @__PURE__ */ N("button", {
277
+ onClick: () => u("/ads/campaigns/new"),
278
+ 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",
279
+ children: [/* @__PURE__ */ M(D, { className: "h-4 w-4" }), "Create Campaign"]
280
+ }) : void 0
281
+ }) : /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
282
+ className: "space-y-4",
283
+ children: J.map((e) => /* @__PURE__ */ M(de, {
284
+ campaign: e,
285
+ menuOpen: k === e.id,
286
+ onToggleMenu: () => A(k === e.id ? null : e.id),
287
+ onCloseMenu: () => A(null),
288
+ onEdit: () => xe(e),
289
+ onToggleStatus: () => _e(e),
290
+ onDuplicate: () => ve(e),
291
+ onDelete: () => {
292
+ A(null), R(e);
293
+ }
294
+ }, e.id))
295
+ }), /* @__PURE__ */ M(h, {
296
+ page: V.page,
297
+ pageSize: V.pageSize,
298
+ total: V.total,
299
+ onPageChange: V.setPage,
300
+ onPageSizeChange: V.setPageSize,
301
+ disabled: G,
302
+ hideWhenSinglePage: !0
303
+ })] })
304
+ }),
305
+ /* @__PURE__ */ M(m, {
306
+ open: P !== null,
307
+ onClose: () => F(null),
308
+ title: "Edit Campaign",
309
+ description: "Update campaign details",
310
+ size: "lg",
311
+ footer: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
312
+ onClick: () => F(null),
313
+ className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
314
+ children: "Cancel"
315
+ }), /* @__PURE__ */ M("button", {
316
+ onClick: ye,
317
+ disabled: Z,
318
+ className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
319
+ children: Z ? "Saving..." : "Save Changes"
320
+ })] }),
321
+ children: P && /* @__PURE__ */ N("div", {
322
+ className: "space-y-4",
323
+ children: [
324
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
325
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
326
+ children: "Campaign Name"
327
+ }), /* @__PURE__ */ M("input", {
328
+ type: "text",
329
+ value: P.name,
330
+ onChange: (e) => F({
331
+ ...P,
332
+ name: e.target.value
254
333
  }),
255
- /* @__PURE__ */ x("div", {
256
- className: "grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-6",
334
+ 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)]"
335
+ })] }),
336
+ /* @__PURE__ */ N("div", {
337
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
338
+ children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
339
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
340
+ children: "Status"
341
+ }), /* @__PURE__ */ N("select", {
342
+ value: P.status,
343
+ onChange: (e) => F({
344
+ ...P,
345
+ status: e.target.value
346
+ }),
347
+ 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)]",
257
348
  children: [
258
- /* @__PURE__ */ x("div", {
259
- className: "flex items-center gap-2",
260
- children: [/* @__PURE__ */ b(p, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
261
- className: "text-xs text-text-secondary",
262
- children: "Spend"
263
- }), /* @__PURE__ */ b("p", {
264
- className: "text-sm font-medium text-text-primary",
265
- children: r(e.metrics.spend)
266
- })] })]
349
+ /* @__PURE__ */ M("option", {
350
+ value: "draft",
351
+ children: "Draft"
267
352
  }),
268
- /* @__PURE__ */ x("div", {
269
- className: "flex items-center gap-2",
270
- children: [/* @__PURE__ */ b(m, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
271
- className: "text-xs text-text-secondary",
272
- children: "Impressions"
273
- }), /* @__PURE__ */ b("p", {
274
- className: "text-sm font-medium text-text-primary",
275
- children: i(e.metrics.impressions)
276
- })] })]
353
+ /* @__PURE__ */ M("option", {
354
+ value: "active",
355
+ children: "Active"
277
356
  }),
278
- /* @__PURE__ */ x("div", {
279
- className: "flex items-center gap-2",
280
- children: [/* @__PURE__ */ b(g, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
281
- className: "text-xs text-text-secondary",
282
- children: "Clicks"
283
- }), /* @__PURE__ */ b("p", {
284
- className: "text-sm font-medium text-text-primary",
285
- children: i(e.metrics.clicks)
286
- })] })]
357
+ /* @__PURE__ */ M("option", {
358
+ value: "paused",
359
+ children: "Paused"
287
360
  }),
288
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
289
- className: "text-xs text-text-secondary",
290
- children: "CTR"
291
- }), /* @__PURE__ */ b("p", {
292
- className: "text-sm font-medium text-text-primary",
293
- children: a(e.metrics.ctr)
294
- })] }),
295
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
296
- className: "text-xs text-text-secondary",
297
- children: "CPC"
298
- }), /* @__PURE__ */ x("p", {
299
- className: "text-sm font-medium text-text-primary",
300
- children: ["$", e.metrics.cpc.toFixed(2)]
301
- })] }),
302
- /* @__PURE__ */ x("div", {
303
- className: "flex items-center gap-2",
304
- children: [/* @__PURE__ */ b(v, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
305
- className: "text-xs text-text-secondary",
306
- children: "ROAS"
307
- }), /* @__PURE__ */ x("p", {
308
- className: "text-sm font-medium text-text-primary",
309
- children: [e.metrics.roas.toFixed(1), "x"]
310
- })] })]
361
+ /* @__PURE__ */ M("option", {
362
+ value: "completed",
363
+ children: "Completed"
311
364
  })
312
365
  ]
366
+ })] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
367
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
368
+ children: "Total Budget (USD)"
369
+ }), /* @__PURE__ */ M("input", {
370
+ type: "number",
371
+ value: P.totalBudget,
372
+ onChange: (e) => F({
373
+ ...P,
374
+ totalBudget: e.target.value
375
+ }),
376
+ 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)]"
377
+ })] })]
378
+ }),
379
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
380
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
381
+ children: "Bid Strategy"
382
+ }), /* @__PURE__ */ M("input", {
383
+ type: "text",
384
+ value: P.bidStrategy,
385
+ onChange: (e) => F({
386
+ ...P,
387
+ bidStrategy: e.target.value
388
+ }),
389
+ 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)]"
390
+ })] }),
391
+ /* @__PURE__ */ N("div", {
392
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
393
+ children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
394
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
395
+ children: "Start Date"
396
+ }), /* @__PURE__ */ M("input", {
397
+ type: "date",
398
+ value: P.startDate,
399
+ onChange: (e) => F({
400
+ ...P,
401
+ startDate: e.target.value
402
+ }),
403
+ 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)]"
404
+ })] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("label", {
405
+ className: "mb-1.5 block text-sm font-medium text-text-primary",
406
+ children: "End Date"
407
+ }), /* @__PURE__ */ M("input", {
408
+ type: "date",
409
+ value: P.endDate,
410
+ onChange: (e) => F({
411
+ ...P,
412
+ endDate: e.target.value
413
+ }),
414
+ 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)]"
415
+ })] })]
416
+ }),
417
+ z && /* @__PURE__ */ M("p", {
418
+ className: "text-sm text-status-error-text",
419
+ children: z
420
+ })
421
+ ]
422
+ })
423
+ }),
424
+ /* @__PURE__ */ M(m, {
425
+ open: L !== null,
426
+ onClose: () => R(null),
427
+ title: "Delete Campaign",
428
+ size: "sm",
429
+ footer: /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("button", {
430
+ onClick: () => R(null),
431
+ className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
432
+ children: "Cancel"
433
+ }), /* @__PURE__ */ M("button", {
434
+ onClick: be,
435
+ disabled: Q,
436
+ className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
437
+ children: Q ? "Deleting..." : "Delete"
438
+ })] }),
439
+ children: /* @__PURE__ */ N("p", {
440
+ className: "text-sm text-text-secondary",
441
+ children: [
442
+ "Are you sure you want to delete",
443
+ " ",
444
+ /* @__PURE__ */ M("span", {
445
+ className: "font-semibold text-text-primary",
446
+ children: L?.name
447
+ }),
448
+ "? This action cannot be undone."
449
+ ]
450
+ })
451
+ })
452
+ ]
453
+ });
454
+ }, de = ({ campaign: e, menuOpen: t, onToggleMenu: n, onCloseMenu: r, onEdit: i, onToggleStatus: l, onDuplicate: u, onDelete: d }) => {
455
+ A(`ad-campaign-${e.id}`, t, r);
456
+ let f = e.budget.total > 0 ? e.budget.spent / e.budget.total * 100 : 0;
457
+ return /* @__PURE__ */ N("div", {
458
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-5",
459
+ children: [
460
+ /* @__PURE__ */ N("div", {
461
+ className: "mb-4 flex items-start justify-between gap-3",
462
+ children: [/* @__PURE__ */ N("div", {
463
+ className: "min-w-0",
464
+ children: [/* @__PURE__ */ N("div", {
465
+ className: "mb-1 flex flex-wrap items-center gap-2",
466
+ children: [
467
+ /* @__PURE__ */ M("h3", {
468
+ className: "text-sm font-semibold text-text-primary",
469
+ children: e.name
470
+ }),
471
+ /* @__PURE__ */ M("span", {
472
+ className: a("rounded-full px-2.5 py-0.5 text-xs font-medium", F[e.platform]),
473
+ children: P[e.platform]
474
+ }),
475
+ /* @__PURE__ */ M(p, { status: e.status })
476
+ ]
477
+ }), /* @__PURE__ */ N("p", {
478
+ className: "text-xs text-text-secondary",
479
+ children: [
480
+ e.adFormat,
481
+ " · ",
482
+ e.bidStrategy,
483
+ " ·",
484
+ " ",
485
+ e.startDate,
486
+ " to ",
487
+ e.endDate
488
+ ]
489
+ })]
490
+ }), /* @__PURE__ */ N("div", {
491
+ className: "relative shrink-0",
492
+ children: [/* @__PURE__ */ M("button", {
493
+ onClick: n,
494
+ "aria-haspopup": "menu",
495
+ "aria-expanded": t,
496
+ "aria-label": "Campaign actions",
497
+ className: "rounded-md p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
498
+ children: /* @__PURE__ */ M(S, { className: "h-4 w-4" })
499
+ }), t && /* @__PURE__ */ N("div", {
500
+ role: "menu",
501
+ className: "absolute right-0 top-8 z-20 w-44 rounded-md border border-border-seam bg-gloss-card py-1 shadow-lg",
502
+ children: [
503
+ /* @__PURE__ */ N("button", {
504
+ role: "menuitem",
505
+ onClick: i,
506
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
507
+ children: [/* @__PURE__ */ M(T, { className: "h-3.5 w-3.5" }), "Edit"]
508
+ }),
509
+ /* @__PURE__ */ M("button", {
510
+ role: "menuitem",
511
+ onClick: l,
512
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
513
+ children: e.status === "active" ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(w, { className: "h-3.5 w-3.5" }), "Pause"] }) : /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(E, { className: "h-3.5 w-3.5" }), "Resume"] })
514
+ }),
515
+ /* @__PURE__ */ N("button", {
516
+ role: "menuitem",
517
+ onClick: u,
518
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
519
+ children: [/* @__PURE__ */ M(y, { className: "h-3.5 w-3.5" }), "Duplicate"]
520
+ }),
521
+ /* @__PURE__ */ N("button", {
522
+ role: "menuitem",
523
+ onClick: d,
524
+ className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-status-error-text hover:bg-bg-sunken",
525
+ children: [/* @__PURE__ */ M(O, { className: "h-3.5 w-3.5" }), "Delete"]
313
526
  })
314
527
  ]
315
- }, e.id);
316
- })
528
+ })]
529
+ })]
530
+ }),
531
+ /* @__PURE__ */ N("div", {
532
+ className: "mb-4",
533
+ children: [/* @__PURE__ */ N("div", {
534
+ className: "mb-1 flex items-center justify-between text-xs",
535
+ children: [/* @__PURE__ */ N("span", {
536
+ className: "text-text-secondary",
537
+ children: [
538
+ "Budget: ",
539
+ o(e.budget.spent),
540
+ " /",
541
+ " ",
542
+ o(e.budget.total)
543
+ ]
544
+ }), /* @__PURE__ */ N("span", {
545
+ className: "text-text-secondary",
546
+ children: [f.toFixed(0), "%"]
547
+ })]
548
+ }), /* @__PURE__ */ M("div", {
549
+ className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
550
+ children: /* @__PURE__ */ M("div", {
551
+ className: a("h-full rounded-full", f > 90 ? "bg-status-error-text" : f > 70 ? "bg-status-warning-text" : "bg-status-success-text"),
552
+ style: { width: `${Math.min(f, 100)}%` }
553
+ })
554
+ })]
555
+ }),
556
+ /* @__PURE__ */ N("div", {
557
+ className: "grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-6",
558
+ children: [
559
+ /* @__PURE__ */ N("div", {
560
+ className: "flex items-center gap-2",
561
+ children: [/* @__PURE__ */ M(b, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
562
+ className: "text-xs text-text-secondary",
563
+ children: "Spend"
564
+ }), /* @__PURE__ */ M("p", {
565
+ className: "text-sm font-medium text-text-primary",
566
+ children: o(e.metrics.spend)
567
+ })] })]
568
+ }),
569
+ /* @__PURE__ */ N("div", {
570
+ className: "flex items-center gap-2",
571
+ children: [/* @__PURE__ */ M(x, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
572
+ className: "text-xs text-text-secondary",
573
+ children: "Impressions"
574
+ }), /* @__PURE__ */ M("p", {
575
+ className: "text-sm font-medium text-text-primary",
576
+ children: s(e.metrics.impressions)
577
+ })] })]
578
+ }),
579
+ /* @__PURE__ */ N("div", {
580
+ className: "flex items-center gap-2",
581
+ children: [/* @__PURE__ */ M(C, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
582
+ className: "text-xs text-text-secondary",
583
+ children: "Clicks"
584
+ }), /* @__PURE__ */ M("p", {
585
+ className: "text-sm font-medium text-text-primary",
586
+ children: s(e.metrics.clicks)
587
+ })] })]
588
+ }),
589
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
590
+ className: "text-xs text-text-secondary",
591
+ children: "CTR"
592
+ }), /* @__PURE__ */ M("p", {
593
+ className: "text-sm font-medium text-text-primary",
594
+ children: c(e.metrics.ctr)
595
+ })] }),
596
+ /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
597
+ className: "text-xs text-text-secondary",
598
+ children: "CPC"
599
+ }), /* @__PURE__ */ N("p", {
600
+ className: "text-sm font-medium text-text-primary",
601
+ children: ["$", e.metrics.cpc.toFixed(2)]
602
+ })] }),
603
+ /* @__PURE__ */ N("div", {
604
+ className: "flex items-center gap-2",
605
+ children: [/* @__PURE__ */ M(k, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
606
+ className: "text-xs text-text-secondary",
607
+ children: "ROAS"
608
+ }), /* @__PURE__ */ N("p", {
609
+ className: "text-sm font-medium text-text-primary",
610
+ children: [e.metrics.roas.toFixed(1), "x"]
611
+ })] })]
612
+ })
613
+ ]
317
614
  })
318
615
  ]
319
616
  });
320
617
  };
321
618
  //#endregion
322
- export { E as AdCampaignsPage };
619
+ export { L as AdCampaignsPage };
323
620
 
324
621
  //# sourceMappingURL=AdCampaignsPage.js.map