@burdenoff/microfe-headshotmarketing 2026.703.1 → 2026.704.2

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 (137) hide show
  1. package/dist/generated/wspace-operations.js +960 -77
  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 +334 -301
  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 +221 -211
  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 +290 -217
  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/helpers.js +11 -1
  132. package/dist/headshotmarketing/utils/helpers.js.map +1 -1
  133. package/dist/headshotmarketing/utils/influencerMapper.js +1 -0
  134. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  135. package/package.json +1 -1
  136. package/dist/headshotmarketing/utils/reportMapper.js +0 -33
  137. package/dist/headshotmarketing/utils/reportMapper.js.map +0 -1
@@ -1,380 +1,523 @@
1
- import { useHeadshotMarketing as e } from "../../context/HeadshotMarketingContext.js";
2
- import { useHeadshotmarketingCampaignsListQuery as t } from "../../../generated/wspace-operations.js";
3
- import { cn as n, formatCurrency as r, formatNumber as i } from "../../utils/helpers.js";
4
- import { toCampaignModel as a } from "../../utils/campaignMapper.js";
5
- import { PageLayout as o } from "../../components/PageLayout.js";
6
- import { StatCard as s } from "../../components/StatCard.js";
7
- import { DataTable as c } from "../../components/DataTable.js";
8
- import { StatusBadge as l } from "../../components/StatusBadge.js";
9
- import { EmptyState as u } from "../../components/EmptyState.js";
1
+ import { HeadshotmarketingBootstrapDataDocument as e, HeadshotmarketingCampaignsListDocument as t, useCreateHeadshotmarketingCampaignMutation as n, useDeleteHeadshotmarketingCampaignMutation as r, useHeadshotmarketingCampaignsListQuery as ee } from "../../../generated/wspace-operations.js";
2
+ import { useHeadshotMarketing as te } from "../../context/HeadshotMarketingContext.js";
3
+ import { cn as i, formatCurrency as a, formatNumber as o } from "../../utils/helpers.js";
4
+ import { toCampaignModel as s } from "../../utils/campaignMapper.js";
5
+ import { HeadshotmarketingCampaignStatus as ne } from "../../../generated/wspace-types.js";
6
+ import { PageLayout as re } from "../../components/PageLayout.js";
7
+ import { StatCard as c } from "../../components/StatCard.js";
8
+ import { DataTable as l } from "../../components/DataTable.js";
9
+ import { StatusBadge as u } from "../../components/StatusBadge.js";
10
+ import { EmptyState as ie } from "../../components/EmptyState.js";
10
11
  import { FilterBar as d } from "../../components/FilterBar.js";
12
+ import { QueryStateBoundary as ae } from "../../components/QueryStateBoundary.js";
13
+ import { Pagination as oe } from "../../components/Pagination.js";
11
14
  import "../../components/index.js";
12
- import { useMemo as f, useState as p } from "react";
13
- import { DollarSign as m, Eye as h, FileText as g, LayoutGrid as _, List as v, Megaphone as y, MoreVertical as b, MousePointerClick as x, Plus as S, Target as C, TrendingUp as w } from "lucide-react";
14
- import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
16
- import { EmphasisPanel as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
15
+ import { useHeadshotmarketingBootstrap as se } from "../../hooks/useHeadshotmarketingBootstrap.js";
16
+ import { usePagination as ce } from "../../hooks/usePagination.js";
17
+ import "../../hooks/index.js";
18
+ import { useEffect as f, useMemo as p, useState as m } from "react";
19
+ import { Copy as le, DollarSign as ue, Eye as h, FileText as g, LayoutGrid as de, List as fe, Megaphone as pe, MousePointerClick as me, Pencil as he, Plus as _, Target as v, Trash2 as y, TrendingUp as b } from "lucide-react";
20
+ import { useI18n as ge } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
22
+ import { CTAOverflowMenu as C, EmphasisPanel as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
17
23
  //#region src/headshotmarketing/pages/campaigns/CampaignsPage.tsx
18
- var j = () => {
19
- let { navigate: j, basePath: M } = e(), { t: N } = T(), P = (e, t) => {
20
- let n = N(e);
24
+ var w = [{ query: e }, t], T = () => {
25
+ let { navigate: e, basePath: t } = te(), { t: T } = ge(), E = (e, t) => {
26
+ let n = T(e);
21
27
  return n === e ? t : n;
22
- }, { data: F } = t(), [I, L] = p(""), [R, z] = p("all"), [B, V] = p("all"), [H, U] = p("grid"), W = f(() => (F?.headshotmarketingCampaigns.items ?? []).map((e) => a(e)), [F?.headshotmarketingCampaigns.items]), G = f(() => W.filter((e) => {
23
- let t = !I || e.name.toLowerCase().includes(I.toLowerCase()) || e.description.toLowerCase().includes(I.toLowerCase()), n = R === "all" || e.status === R, r = B === "all" || e.type === B;
24
- return t && n && r;
25
- }), [
26
- W,
28
+ }, { data: D, loading: O, refetch: k } = se(), [A, j] = m(""), [M, N] = m(""), [P, F] = m("all"), [I, ye] = m("all"), [L, R] = m("grid"), [z, B] = m(null), [V, H] = m(null);
29
+ f(() => {
30
+ let e = setTimeout(() => N(A.trim()), 300);
31
+ return () => clearTimeout(e);
32
+ }, [A]);
33
+ let U = ce({ initialPageSize: 12 }), { limit: be, offset: xe, setTotal: W, setPage: G } = U, Se = P === "all" ? void 0 : P, Ce = I === "all" ? void 0 : I;
34
+ f(() => {
35
+ G(1);
36
+ }, [
37
+ M,
38
+ P,
27
39
  I,
28
- R,
29
- B
30
- ]), K = f(() => W.reduce((e, t) => e + t.budget.total, 0), [W]), q = f(() => W.filter((e) => e.status === "active").length, [W]), J = f(() => W.reduce((e, t) => e + t.metrics.conversions, 0), [W]), Y = f(() => {
31
- let e = W.filter((e) => e.metrics.roas > 0);
40
+ G
41
+ ]);
42
+ let { data: K, loading: q, error: we, refetch: Te } = ee({
43
+ variables: {
44
+ limit: be,
45
+ offset: xe,
46
+ search: M || void 0,
47
+ status: Se,
48
+ type: Ce
49
+ },
50
+ notifyOnNetworkStatusChange: !0,
51
+ fetchPolicy: "cache-and-network"
52
+ }), J = K?.headshotmarketingCampaigns.total ?? 0;
53
+ f(() => {
54
+ W(J);
55
+ }, [J, W]);
56
+ let [Ee] = n(), [De] = r(), Y = p(() => (D?.headshotmarketingCampaigns.items ?? []).map((e) => s(e)), [D?.headshotmarketingCampaigns.items]), Oe = p(() => Y.reduce((e, t) => e + t.budget.total, 0), [Y]), ke = p(() => Y.filter((e) => e.status === "active").length, [Y]), Ae = p(() => Y.reduce((e, t) => e + t.metrics.conversions, 0), [Y]), je = p(() => {
57
+ let e = Y.filter((e) => e.metrics.roas > 0);
32
58
  return e.length > 0 ? e.reduce((e, t) => e + t.metrics.roas, 0) / e.length : 0;
33
- }, [W]), X = [
59
+ }, [Y]), X = p(() => K?.headshotmarketingCampaigns.items ?? [], [K?.headshotmarketingCampaigns.items]), Me = p(() => {
60
+ let e = /* @__PURE__ */ new Map();
61
+ for (let t of X) e.set(t.id, t);
62
+ return e;
63
+ }, [X]), Z = p(() => X.map((e) => s(e)), [X]), Ne = !!M || P !== "all" || I !== "all", Q = (D?.headshotmarketingCampaigns.total ?? Y.length) > 0, Pe = () => {
64
+ Te(), k();
65
+ }, Fe = async (e) => {
66
+ B(null), H(e.id);
67
+ try {
68
+ await Ee({
69
+ variables: { input: {
70
+ name: `${e.name} (Copy)`,
71
+ description: e.description ?? null,
72
+ type: e.type,
73
+ status: ne.Draft,
74
+ budget: e.budget ?? null,
75
+ startDate: e.startDate ?? null,
76
+ endDate: e.endDate ?? null,
77
+ tags: e.tags,
78
+ goals: e.goals ?? void 0
79
+ } },
80
+ refetchQueries: w,
81
+ awaitRefetchQueries: !0
82
+ });
83
+ } catch (e) {
84
+ B(e instanceof Error ? e.message : "Failed to duplicate campaign.");
85
+ } finally {
86
+ H(null);
87
+ }
88
+ }, Ie = async (e, t) => {
89
+ if (window.confirm(`Delete campaign "${t}"? This cannot be undone.`)) {
90
+ B(null), H(e);
91
+ try {
92
+ await De({
93
+ variables: { id: e },
94
+ refetchQueries: w,
95
+ awaitRefetchQueries: !0
96
+ });
97
+ } catch (e) {
98
+ B(e instanceof Error ? e.message : "Failed to delete campaign.");
99
+ } finally {
100
+ H(null);
101
+ }
102
+ }
103
+ }, $ = (n) => {
104
+ let r = Me.get(n);
105
+ return [
106
+ {
107
+ label: E("headshotmarketing.common.edit", "Edit"),
108
+ icon: /* @__PURE__ */ x(he, { className: "h-4 w-4" }),
109
+ onSelect: () => e(t + "/campaigns/" + n + "/edit")
110
+ },
111
+ {
112
+ label: E("headshotmarketing.common.duplicate", "Duplicate"),
113
+ icon: /* @__PURE__ */ x(le, { className: "h-4 w-4" }),
114
+ disabled: !r || V === n,
115
+ onSelect: () => {
116
+ r && Fe(r);
117
+ }
118
+ },
119
+ {
120
+ label: E("headshotmarketing.common.delete", "Delete"),
121
+ icon: /* @__PURE__ */ x(y, { className: "h-4 w-4" }),
122
+ intent: "destructive",
123
+ disabled: V === n,
124
+ onSelect: () => {
125
+ Ie(n, r?.name ?? "");
126
+ }
127
+ }
128
+ ];
129
+ }, Le = [
34
130
  {
35
131
  key: "name",
36
- header: P("headshotmarketing.campaigns.table.columns.name", "Name"),
132
+ header: E("headshotmarketing.campaigns.table.columns.name", "Name"),
37
133
  sortable: !0
38
134
  },
39
135
  {
40
136
  key: "type",
41
- header: P("headshotmarketing.campaigns.table.columns.type", "Type"),
137
+ header: E("headshotmarketing.campaigns.table.columns.type", "Type"),
42
138
  sortable: !0,
43
- render: (e) => /* @__PURE__ */ D("span", {
139
+ render: (e) => /* @__PURE__ */ x("span", {
44
140
  className: "capitalize",
45
141
  children: e.type
46
142
  })
47
143
  },
48
144
  {
49
145
  key: "status",
50
- header: P("headshotmarketing.campaigns.table.columns.status", "Status"),
51
- render: (e) => /* @__PURE__ */ D(l, { status: e.status })
146
+ header: E("headshotmarketing.campaigns.table.columns.status", "Status"),
147
+ render: (e) => /* @__PURE__ */ x(u, { status: e.status })
52
148
  },
53
149
  {
54
150
  key: "budget",
55
- header: P("headshotmarketing.campaigns.table.columns.budget", "Budget"),
151
+ header: E("headshotmarketing.campaigns.table.columns.budget", "Budget"),
56
152
  sortable: !0,
57
- render: (e) => /* @__PURE__ */ O("div", {
153
+ render: (e) => /* @__PURE__ */ S("div", {
58
154
  className: "space-y-1",
59
- children: [/* @__PURE__ */ O("span", {
155
+ children: [/* @__PURE__ */ S("span", {
60
156
  className: "text-sm",
61
157
  children: [
62
- r(e.budget.spent),
158
+ a(e.budget.spent),
63
159
  " /",
64
160
  " ",
65
- r(e.budget.total)
161
+ a(e.budget.total)
66
162
  ]
67
- }), /* @__PURE__ */ D("div", {
163
+ }), /* @__PURE__ */ x("div", {
68
164
  className: "h-1.5 w-20 rounded-full bg-bg-sunken",
69
- children: /* @__PURE__ */ D("div", {
165
+ children: /* @__PURE__ */ x("div", {
70
166
  className: "h-1.5 rounded-full bg-action-primary-bg",
71
- style: { width: `${Math.min(e.budget.spent / e.budget.total * 100, 100)}%` }
167
+ style: { width: `${e.budget.total > 0 ? Math.min(e.budget.spent / e.budget.total * 100, 100) : 0}%` }
72
168
  })
73
169
  })]
74
170
  })
75
171
  },
76
172
  {
77
173
  key: "impressions",
78
- header: P("headshotmarketing.campaigns.table.columns.impressions", "Impressions"),
174
+ header: E("headshotmarketing.campaigns.table.columns.impressions", "Impressions"),
79
175
  sortable: !0,
80
- render: (e) => i(e.metrics.impressions)
176
+ render: (e) => o(e.metrics.impressions)
81
177
  },
82
178
  {
83
179
  key: "clicks",
84
- header: P("headshotmarketing.campaigns.table.columns.clicks", "Clicks"),
180
+ header: E("headshotmarketing.campaigns.table.columns.clicks", "Clicks"),
85
181
  sortable: !0,
86
- render: (e) => i(e.metrics.clicks)
182
+ render: (e) => o(e.metrics.clicks)
87
183
  },
88
184
  {
89
185
  key: "conversions",
90
- header: P("headshotmarketing.campaigns.table.columns.conversions", "Conversions"),
186
+ header: E("headshotmarketing.campaigns.table.columns.conversions", "Conversions"),
91
187
  sortable: !0,
92
- render: (e) => i(e.metrics.conversions)
188
+ render: (e) => o(e.metrics.conversions)
93
189
  },
94
190
  {
95
191
  key: "roas",
96
- header: P("headshotmarketing.campaigns.table.columns.roas", "ROAS"),
192
+ header: E("headshotmarketing.campaigns.table.columns.roas", "ROAS"),
97
193
  sortable: !0,
98
194
  render: (e) => e.metrics.roas > 0 ? `${e.metrics.roas.toFixed(1)}x` : "-"
195
+ },
196
+ {
197
+ key: "actions",
198
+ header: "",
199
+ className: "w-12 text-right",
200
+ render: (e) => /* @__PURE__ */ x("div", {
201
+ className: "flex justify-end",
202
+ onClick: (e) => e.stopPropagation(),
203
+ role: "presentation",
204
+ children: /* @__PURE__ */ x(C, {
205
+ actions: $(e.id),
206
+ align: "end"
207
+ })
208
+ })
99
209
  }
100
- ], Z = [
210
+ ], Re = [
101
211
  {
102
212
  value: "all",
103
- label: P("headshotmarketing.campaigns.filters.allStatuses", "All Statuses")
213
+ label: E("headshotmarketing.campaigns.filters.allStatuses", "All Statuses")
104
214
  },
105
215
  {
106
- value: "active",
107
- label: P("headshotmarketing.common.status.active", "Active")
216
+ value: "ACTIVE",
217
+ label: E("headshotmarketing.common.status.active", "Active")
108
218
  },
109
219
  {
110
- value: "paused",
111
- label: P("headshotmarketing.common.status.paused", "Paused")
220
+ value: "PAUSED",
221
+ label: E("headshotmarketing.common.status.paused", "Paused")
112
222
  },
113
223
  {
114
- value: "completed",
115
- label: P("headshotmarketing.common.status.completed", "Completed")
224
+ value: "SCHEDULED",
225
+ label: E("headshotmarketing.common.status.scheduled", "Scheduled")
116
226
  },
117
227
  {
118
- value: "draft",
119
- label: P("headshotmarketing.common.status.draft", "Draft")
228
+ value: "DRAFT",
229
+ label: E("headshotmarketing.common.status.draft", "Draft")
120
230
  },
121
231
  {
122
- value: "scheduled",
123
- label: P("headshotmarketing.common.status.scheduled", "Scheduled")
232
+ value: "COMPLETED",
233
+ label: E("headshotmarketing.common.status.completed", "Completed")
234
+ },
235
+ {
236
+ value: "ARCHIVED",
237
+ label: E("headshotmarketing.common.status.archived", "Archived")
124
238
  }
125
- ], Q = [
239
+ ], ze = [
126
240
  {
127
241
  value: "all",
128
- label: P("headshotmarketing.campaigns.filters.allTypes", "All Types")
242
+ label: E("headshotmarketing.campaigns.filters.allTypes", "All Types")
129
243
  },
130
244
  {
131
- value: "email",
132
- label: P("headshotmarketing.common.types.email", "Email")
245
+ value: "EMAIL",
246
+ label: E("headshotmarketing.common.types.email", "Email")
133
247
  },
134
248
  {
135
- value: "social",
136
- label: P("headshotmarketing.common.types.social", "Social")
249
+ value: "SOCIAL",
250
+ label: E("headshotmarketing.common.types.social", "Social")
137
251
  },
138
252
  {
139
- value: "ppc",
140
- label: P("headshotmarketing.common.types.ppc", "PPC")
253
+ value: "AD",
254
+ label: E("headshotmarketing.common.types.ad", "Ads")
141
255
  },
142
256
  {
143
- value: "display",
144
- label: P("headshotmarketing.common.types.display", "Display")
257
+ value: "INFLUENCER",
258
+ label: E("headshotmarketing.common.types.influencer", "Influencer")
145
259
  },
146
260
  {
147
- value: "video",
148
- label: P("headshotmarketing.common.types.video", "Video")
261
+ value: "CONTENT",
262
+ label: E("headshotmarketing.common.types.content", "Content")
149
263
  },
150
264
  {
151
- value: "influencer",
152
- label: P("headshotmarketing.common.types.influencer", "Influencer")
265
+ value: "EVENT",
266
+ label: E("headshotmarketing.common.types.event", "Event")
153
267
  },
154
268
  {
155
- value: "content",
156
- label: P("headshotmarketing.common.types.content", "Content")
269
+ value: "MULTI_CHANNEL",
270
+ label: E("headshotmarketing.common.types.multiChannel", "Multi-channel")
157
271
  }
158
272
  ];
159
- return /* @__PURE__ */ O(o, {
160
- title: P("headshotmarketing.campaigns.title", "Campaigns"),
161
- actions: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("button", {
162
- onClick: () => j(M + "/campaigns/templates"),
163
- 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",
164
- children: [/* @__PURE__ */ D(g, { className: "h-4 w-4" }), P("headshotmarketing.campaigns.actions.templates", "Templates")]
165
- }), /* @__PURE__ */ O("button", {
166
- onClick: () => j(M + "/campaigns/new"),
167
- 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",
168
- children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), P("headshotmarketing.campaigns.actions.createCampaign", "Create Campaign")]
169
- })] }),
273
+ return /* @__PURE__ */ S(re, {
274
+ title: E("headshotmarketing.campaigns.title", "Campaigns"),
275
+ actions: /* @__PURE__ */ S("div", {
276
+ className: "flex flex-wrap items-center gap-2",
277
+ children: [/* @__PURE__ */ S("button", {
278
+ onClick: () => e(t + "/campaigns/templates"),
279
+ 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",
280
+ children: [/* @__PURE__ */ x(g, { className: "h-4 w-4" }), E("headshotmarketing.campaigns.actions.templates", "Templates")]
281
+ }), /* @__PURE__ */ S("button", {
282
+ onClick: () => e(t + "/campaigns/new"),
283
+ 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",
284
+ children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), E("headshotmarketing.campaigns.actions.createCampaign", "Create Campaign")]
285
+ })]
286
+ }),
170
287
  children: [
171
- /* @__PURE__ */ D(A, { children: P("headshotmarketing.campaigns.purpose", "Plan, launch and track every marketing campaign in one place — set budgets and goals, then watch spend, conversions and ROAS roll up here so you know what's working and where to reinvest.") }),
172
- /* @__PURE__ */ D(k, { children: /* @__PURE__ */ O("div", {
288
+ /* @__PURE__ */ x(ve, { children: E("headshotmarketing.campaigns.purpose", "Plan, launch and track every marketing campaign in one place — set budgets and goals, then watch spend, conversions and ROAS roll up here so you know what's working and where to reinvest.") }),
289
+ /* @__PURE__ */ x(_e, { children: /* @__PURE__ */ S("div", {
173
290
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
174
291
  children: [
175
- /* @__PURE__ */ D(s, {
176
- title: P("headshotmarketing.campaigns.stats.totalBudget", "Total Budget"),
177
- value: r(K),
178
- icon: /* @__PURE__ */ D(m, { className: "h-5 w-5" })
292
+ /* @__PURE__ */ x(c, {
293
+ title: E("headshotmarketing.campaigns.stats.totalBudget", "Total Budget"),
294
+ value: a(Oe),
295
+ icon: /* @__PURE__ */ x(ue, { className: "h-5 w-5" })
179
296
  }),
180
- /* @__PURE__ */ D(s, {
181
- title: P("headshotmarketing.campaigns.stats.activeCampaigns", "Active Campaigns"),
182
- value: String(q),
183
- icon: /* @__PURE__ */ D(y, { className: "h-5 w-5" })
297
+ /* @__PURE__ */ x(c, {
298
+ title: E("headshotmarketing.campaigns.stats.activeCampaigns", "Active Campaigns"),
299
+ value: String(ke),
300
+ icon: /* @__PURE__ */ x(pe, { className: "h-5 w-5" })
184
301
  }),
185
- /* @__PURE__ */ D(s, {
186
- title: P("headshotmarketing.campaigns.stats.totalConversions", "Total Conversions"),
187
- value: i(J),
188
- icon: /* @__PURE__ */ D(C, { className: "h-5 w-5" })
302
+ /* @__PURE__ */ x(c, {
303
+ title: E("headshotmarketing.campaigns.stats.totalConversions", "Total Conversions"),
304
+ value: o(Ae),
305
+ icon: /* @__PURE__ */ x(v, { className: "h-5 w-5" })
189
306
  }),
190
- /* @__PURE__ */ D(s, {
191
- title: P("headshotmarketing.campaigns.stats.avgRoas", "Avg ROAS"),
192
- value: `${Y.toFixed(1)}x`,
193
- icon: /* @__PURE__ */ D(w, { className: "h-5 w-5" })
307
+ /* @__PURE__ */ x(c, {
308
+ title: E("headshotmarketing.campaigns.stats.avgRoas", "Avg ROAS"),
309
+ value: `${je.toFixed(1)}x`,
310
+ icon: /* @__PURE__ */ x(b, { className: "h-5 w-5" })
194
311
  })
195
312
  ]
196
313
  }) }),
197
- /* @__PURE__ */ D(d, {
198
- searchValue: I,
199
- onSearchChange: L,
200
- searchPlaceholder: P("headshotmarketing.campaigns.filters.searchPlaceholder", "Search campaigns..."),
201
- filters: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("select", {
202
- value: R,
203
- onChange: (e) => z(e.target.value),
204
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
205
- children: Z.map((e) => /* @__PURE__ */ D("option", {
206
- value: e.value,
207
- children: e.label
208
- }, e.value))
209
- }), /* @__PURE__ */ D("select", {
210
- value: B,
211
- onChange: (e) => V(e.target.value),
212
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
213
- children: Q.map((e) => /* @__PURE__ */ D("option", {
214
- value: e.value,
215
- children: e.label
216
- }, e.value))
217
- })] }),
218
- actions: /* @__PURE__ */ O("div", {
314
+ /* @__PURE__ */ x(d, {
315
+ searchValue: A,
316
+ onSearchChange: j,
317
+ searchPlaceholder: E("headshotmarketing.campaigns.filters.searchPlaceholder", "Search campaigns..."),
318
+ filters: /* @__PURE__ */ S("div", {
319
+ className: "flex flex-nowrap items-center gap-2 overflow-x-auto",
320
+ children: [/* @__PURE__ */ x("select", {
321
+ value: P,
322
+ onChange: (e) => F(e.target.value),
323
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
324
+ children: Re.map((e) => /* @__PURE__ */ x("option", {
325
+ value: e.value,
326
+ children: e.label
327
+ }, e.value))
328
+ }), /* @__PURE__ */ x("select", {
329
+ value: I,
330
+ onChange: (e) => ye(e.target.value),
331
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
332
+ children: ze.map((e) => /* @__PURE__ */ x("option", {
333
+ value: e.value,
334
+ children: e.label
335
+ }, e.value))
336
+ })]
337
+ }),
338
+ actions: /* @__PURE__ */ S("div", {
219
339
  className: "flex items-center gap-1 rounded-md border border-border-subtle p-0.5",
220
- children: [/* @__PURE__ */ D("button", {
221
- onClick: () => U("grid"),
222
- className: n("rounded p-1.5", H === "grid" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
223
- children: /* @__PURE__ */ D(_, { className: "h-4 w-4" })
224
- }), /* @__PURE__ */ D("button", {
225
- onClick: () => U("table"),
226
- className: n("rounded p-1.5", H === "table" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
227
- children: /* @__PURE__ */ D(v, { className: "h-4 w-4" })
340
+ children: [/* @__PURE__ */ x("button", {
341
+ onClick: () => R("grid"),
342
+ className: i("rounded p-1.5", L === "grid" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
343
+ children: /* @__PURE__ */ x(de, { className: "h-4 w-4" })
344
+ }), /* @__PURE__ */ x("button", {
345
+ onClick: () => R("table"),
346
+ className: i("rounded p-1.5", L === "table" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
347
+ children: /* @__PURE__ */ x(fe, { className: "h-4 w-4" })
228
348
  })]
229
349
  })
230
350
  }),
231
- H === "grid" && G.length === 0 && /* @__PURE__ */ D(u, {
232
- illustration: W.length === 0 ? "empty-generic" : "empty-search",
233
- title: W.length === 0 ? P("headshotmarketing.campaigns.empty.title", "No campaigns yet") : P("headshotmarketing.campaigns.empty.filteredTitle", "No campaigns match your filters"),
234
- description: W.length === 0 ? P("headshotmarketing.campaigns.empty.description", "Create your first campaign to start planning budgets, channels and goals.") : P("headshotmarketing.campaigns.empty.filtered", "Try adjusting your search or filters."),
235
- action: W.length === 0 ? /* @__PURE__ */ O("button", {
236
- onClick: () => j(M + "/campaigns/new"),
237
- 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",
238
- children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), P("headshotmarketing.campaigns.actions.createCampaign", "Create Campaign")]
239
- }) : void 0
351
+ z && /* @__PURE__ */ x("div", {
352
+ className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
353
+ children: z
240
354
  }),
241
- H === "grid" && G.length > 0 && /* @__PURE__ */ D("div", {
242
- className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
243
- children: G.map((e) => {
244
- let t = e.budget.total > 0 ? Math.min(e.budget.spent / e.budget.total * 100, 100) : 0;
245
- return /* @__PURE__ */ O("div", {
246
- className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop hover:shadow-md transition-shadow",
247
- children: [
248
- /* @__PURE__ */ O("div", {
249
- className: "flex items-start justify-between mb-3",
250
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("button", {
251
- onClick: () => j(M + "/campaigns/" + e.id),
252
- className: "text-sm font-semibold text-text-primary hover:text-primary transition-colors text-left",
253
- children: e.name
254
- }), /* @__PURE__ */ O("div", {
255
- className: "flex items-center gap-2 mt-1",
256
- children: [/* @__PURE__ */ D(l, { status: e.status }), /* @__PURE__ */ D("span", {
257
- className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary capitalize",
258
- children: e.type
259
- })]
260
- })] }), /* @__PURE__ */ D("button", {
261
- className: "rounded-md p-1 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
262
- children: /* @__PURE__ */ D(b, { className: "h-4 w-4" })
263
- })]
264
- }),
265
- /* @__PURE__ */ O("div", {
266
- className: "mb-3",
267
- children: [/* @__PURE__ */ O("div", {
268
- className: "flex items-center justify-between text-xs text-text-secondary mb-1",
269
- children: [/* @__PURE__ */ O("span", { children: [r(e.budget.spent), " spent"] }), /* @__PURE__ */ O("span", { children: [r(e.budget.total), " total"] })]
270
- }), /* @__PURE__ */ D("div", {
271
- className: "h-1.5 w-full rounded-full bg-bg-sunken",
272
- children: /* @__PURE__ */ D("div", {
273
- className: n("h-1.5 rounded-full transition-all", t >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
274
- style: { width: `${t}%` }
275
- })
276
- })]
277
- }),
278
- /* @__PURE__ */ O("div", {
279
- className: "grid grid-cols-4 gap-2 mb-3",
280
- children: [
281
- /* @__PURE__ */ O("div", {
282
- className: "text-center",
283
- children: [
284
- /* @__PURE__ */ D("div", {
285
- className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
286
- children: /* @__PURE__ */ D(h, { className: "h-3 w-3" })
287
- }),
288
- /* @__PURE__ */ D("p", {
289
- className: "text-xs font-medium text-text-primary",
290
- children: i(e.metrics.impressions)
291
- }),
292
- /* @__PURE__ */ D("p", {
293
- className: "text-[10px] text-text-secondary",
294
- children: P("headshotmarketing.campaigns.table.columns.impressions", "Impressions")
295
- })
296
- ]
297
- }),
298
- /* @__PURE__ */ O("div", {
299
- className: "text-center",
300
- children: [
301
- /* @__PURE__ */ D("div", {
302
- className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
303
- children: /* @__PURE__ */ D(x, { className: "h-3 w-3" })
304
- }),
305
- /* @__PURE__ */ D("p", {
306
- className: "text-xs font-medium text-text-primary",
307
- children: i(e.metrics.clicks)
308
- }),
309
- /* @__PURE__ */ D("p", {
310
- className: "text-[10px] text-text-secondary",
311
- children: P("headshotmarketing.campaigns.table.columns.clicks", "Clicks")
312
- })
313
- ]
314
- }),
315
- /* @__PURE__ */ O("div", {
316
- className: "text-center",
317
- children: [
318
- /* @__PURE__ */ D("div", {
319
- className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
320
- children: /* @__PURE__ */ D(C, { className: "h-3 w-3" })
321
- }),
322
- /* @__PURE__ */ D("p", {
323
- className: "text-xs font-medium text-text-primary",
324
- children: i(e.metrics.conversions)
325
- }),
326
- /* @__PURE__ */ D("p", {
327
- className: "text-[10px] text-text-secondary",
328
- children: P("headshotmarketing.campaigns.table.columns.conversions", "Conversions")
329
- })
330
- ]
331
- }),
332
- /* @__PURE__ */ O("div", {
333
- className: "text-center",
334
- children: [
335
- /* @__PURE__ */ D("div", {
336
- className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
337
- children: /* @__PURE__ */ D(w, { className: "h-3 w-3" })
338
- }),
339
- /* @__PURE__ */ D("p", {
340
- className: "text-xs font-medium text-text-primary",
341
- children: e.metrics.roas > 0 ? `${e.metrics.roas.toFixed(1)}x` : "-"
342
- }),
343
- /* @__PURE__ */ D("p", {
344
- className: "text-[10px] text-text-secondary",
345
- children: P("headshotmarketing.campaigns.table.columns.roas", "ROAS")
346
- })
347
- ]
348
- })
349
- ]
350
- }),
351
- /* @__PURE__ */ O("div", {
352
- className: "flex items-center gap-2 pt-3 border-t border-border-subtle",
353
- children: [/* @__PURE__ */ D("button", {
354
- onClick: () => j(M + "/campaigns/" + e.id),
355
- className: "flex-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
356
- children: P("headshotmarketing.campaigns.actions.viewDetails", "View Details")
357
- }), /* @__PURE__ */ D("button", {
358
- onClick: () => j(M + "/campaigns/" + e.id + "/edit"),
359
- className: "flex-1 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
360
- children: P("headshotmarketing.common.edit", "Edit")
361
- })]
355
+ /* @__PURE__ */ x(ae, {
356
+ loading: q || O && !D,
357
+ error: we,
358
+ onRetry: Pe,
359
+ hasData: !!K,
360
+ children: Z.length === 0 ? /* @__PURE__ */ x(ie, {
361
+ illustration: Q ? "empty-search" : "empty-generic",
362
+ title: Q ? E("headshotmarketing.campaigns.empty.filteredTitle", "No campaigns match your filters") : E("headshotmarketing.campaigns.empty.title", "No campaigns yet"),
363
+ description: Q ? E("headshotmarketing.campaigns.empty.filtered", "Try adjusting your search or filters.") : E("headshotmarketing.campaigns.empty.description", "Create your first campaign to start planning budgets, channels and goals."),
364
+ action: !Q && !Ne ? /* @__PURE__ */ S("button", {
365
+ onClick: () => e(t + "/campaigns/new"),
366
+ 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",
367
+ children: [/* @__PURE__ */ x(_, { className: "h-4 w-4" }), E("headshotmarketing.campaigns.actions.createCampaign", "Create Campaign")]
368
+ }) : void 0
369
+ }) : /* @__PURE__ */ S("div", {
370
+ className: "space-y-4",
371
+ children: [
372
+ L === "grid" && /* @__PURE__ */ x("div", {
373
+ className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
374
+ children: Z.map((n) => {
375
+ let r = n.budget.total > 0 ? Math.min(n.budget.spent / n.budget.total * 100, 100) : 0;
376
+ return /* @__PURE__ */ S("div", {
377
+ className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop hover:shadow-md transition-shadow",
378
+ children: [
379
+ /* @__PURE__ */ S("div", {
380
+ className: "flex items-start justify-between mb-3",
381
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("button", {
382
+ onClick: () => e(t + "/campaigns/" + n.id),
383
+ className: "text-sm font-semibold text-text-primary hover:text-primary transition-colors text-left",
384
+ children: n.name
385
+ }), /* @__PURE__ */ S("div", {
386
+ className: "flex items-center gap-2 mt-1",
387
+ children: [/* @__PURE__ */ x(u, { status: n.status }), /* @__PURE__ */ x("span", {
388
+ className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary capitalize",
389
+ children: n.type
390
+ })]
391
+ })] }), /* @__PURE__ */ x(C, {
392
+ actions: $(n.id),
393
+ align: "end"
394
+ })]
395
+ }),
396
+ /* @__PURE__ */ S("div", {
397
+ className: "mb-3",
398
+ children: [/* @__PURE__ */ S("div", {
399
+ className: "flex items-center justify-between text-xs text-text-secondary mb-1",
400
+ children: [/* @__PURE__ */ S("span", { children: [a(n.budget.spent), " spent"] }), /* @__PURE__ */ S("span", { children: [a(n.budget.total), " total"] })]
401
+ }), /* @__PURE__ */ x("div", {
402
+ className: "h-1.5 w-full rounded-full bg-bg-sunken",
403
+ children: /* @__PURE__ */ x("div", {
404
+ className: i("h-1.5 rounded-full transition-all", r >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
405
+ style: { width: `${r}%` }
406
+ })
407
+ })]
408
+ }),
409
+ /* @__PURE__ */ S("div", {
410
+ className: "grid grid-cols-4 gap-2 mb-3",
411
+ children: [
412
+ /* @__PURE__ */ S("div", {
413
+ className: "text-center",
414
+ children: [
415
+ /* @__PURE__ */ x("div", {
416
+ className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
417
+ children: /* @__PURE__ */ x(h, { className: "h-3 w-3" })
418
+ }),
419
+ /* @__PURE__ */ x("p", {
420
+ className: "text-xs font-medium text-text-primary",
421
+ children: o(n.metrics.impressions)
422
+ }),
423
+ /* @__PURE__ */ x("p", {
424
+ className: "text-[10px] text-text-secondary",
425
+ children: E("headshotmarketing.campaigns.table.columns.impressions", "Impressions")
426
+ })
427
+ ]
428
+ }),
429
+ /* @__PURE__ */ S("div", {
430
+ className: "text-center",
431
+ children: [
432
+ /* @__PURE__ */ x("div", {
433
+ className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
434
+ children: /* @__PURE__ */ x(me, { className: "h-3 w-3" })
435
+ }),
436
+ /* @__PURE__ */ x("p", {
437
+ className: "text-xs font-medium text-text-primary",
438
+ children: o(n.metrics.clicks)
439
+ }),
440
+ /* @__PURE__ */ x("p", {
441
+ className: "text-[10px] text-text-secondary",
442
+ children: E("headshotmarketing.campaigns.table.columns.clicks", "Clicks")
443
+ })
444
+ ]
445
+ }),
446
+ /* @__PURE__ */ S("div", {
447
+ className: "text-center",
448
+ children: [
449
+ /* @__PURE__ */ x("div", {
450
+ className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
451
+ children: /* @__PURE__ */ x(v, { className: "h-3 w-3" })
452
+ }),
453
+ /* @__PURE__ */ x("p", {
454
+ className: "text-xs font-medium text-text-primary",
455
+ children: o(n.metrics.conversions)
456
+ }),
457
+ /* @__PURE__ */ x("p", {
458
+ className: "text-[10px] text-text-secondary",
459
+ children: E("headshotmarketing.campaigns.table.columns.conversions", "Conversions")
460
+ })
461
+ ]
462
+ }),
463
+ /* @__PURE__ */ S("div", {
464
+ className: "text-center",
465
+ children: [
466
+ /* @__PURE__ */ x("div", {
467
+ className: "flex items-center justify-center gap-1 text-text-secondary mb-0.5",
468
+ children: /* @__PURE__ */ x(b, { className: "h-3 w-3" })
469
+ }),
470
+ /* @__PURE__ */ x("p", {
471
+ className: "text-xs font-medium text-text-primary",
472
+ children: n.metrics.roas > 0 ? `${n.metrics.roas.toFixed(1)}x` : "-"
473
+ }),
474
+ /* @__PURE__ */ x("p", {
475
+ className: "text-[10px] text-text-secondary",
476
+ children: E("headshotmarketing.campaigns.table.columns.roas", "ROAS")
477
+ })
478
+ ]
479
+ })
480
+ ]
481
+ }),
482
+ /* @__PURE__ */ S("div", {
483
+ className: "flex flex-wrap items-center gap-2 pt-3 border-t border-border-subtle",
484
+ children: [/* @__PURE__ */ x("button", {
485
+ onClick: () => e(t + "/campaigns/" + n.id),
486
+ className: "flex-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
487
+ children: E("headshotmarketing.campaigns.actions.viewDetails", "View Details")
488
+ }), /* @__PURE__ */ x("button", {
489
+ onClick: () => e(t + "/campaigns/" + n.id + "/edit"),
490
+ className: "flex-1 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
491
+ children: E("headshotmarketing.common.edit", "Edit")
492
+ })]
493
+ })
494
+ ]
495
+ }, n.id);
362
496
  })
363
- ]
364
- }, e.id);
497
+ }),
498
+ L === "table" && /* @__PURE__ */ x(l, {
499
+ data: Z,
500
+ columns: Le,
501
+ pageSize: U.pageSize,
502
+ onRowClick: (n) => e(t + "/campaigns/" + n.id),
503
+ emptyMessage: E("headshotmarketing.campaigns.empty.filtered", "No campaigns match your filters")
504
+ }),
505
+ /* @__PURE__ */ x(oe, {
506
+ page: U.page,
507
+ pageSize: U.pageSize,
508
+ total: U.total,
509
+ onPageChange: U.setPage,
510
+ onPageSizeChange: U.setPageSize,
511
+ disabled: q,
512
+ hideWhenSinglePage: !0
513
+ })
514
+ ]
365
515
  })
366
- }),
367
- H === "table" && /* @__PURE__ */ D(c, {
368
- data: G,
369
- columns: X,
370
- pageSize: 10,
371
- onRowClick: (e) => j(M + "/campaigns/" + e.id),
372
- emptyMessage: P("headshotmarketing.campaigns.empty.filtered", "No campaigns match your filters")
373
516
  })
374
517
  ]
375
518
  });
376
519
  };
377
520
  //#endregion
378
- export { j as CampaignsPage };
521
+ export { T as CampaignsPage };
379
522
 
380
523
  //# sourceMappingURL=CampaignsPage.js.map