@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,17 +1,18 @@
1
- import { useHeadshotMarketing as e } from "../../context/HeadshotMarketingContext.js";
2
- import { HeadshotmarketingCampaignByIdDocument as t, HeadshotmarketingCampaignsListDocument as n, useCreateHeadshotmarketingCampaignMutation as r, useHeadshotmarketingCampaignByIdQuery as ee, useUpdateHeadshotmarketingCampaignMutation as te } from "../../../generated/wspace-operations.js";
3
- import { cn as i } from "../../utils/helpers.js";
4
- import { toCampaignModel as ne } from "../../utils/campaignMapper.js";
5
- import { PageLayout as a } from "../../components/PageLayout.js";
6
- import "../../components/index.js";
1
+ import { HeadshotmarketingCampaignByIdDocument as e, HeadshotmarketingCampaignsListDocument as t, useCreateHeadshotmarketingCampaignMutation as n, useHeadshotmarketingCampaignByIdQuery as r, useUpdateHeadshotmarketingCampaignMutation as i } from "../../../generated/wspace-operations.js";
2
+ import { useHeadshotMarketing as ee } from "../../context/HeadshotMarketingContext.js";
3
+ import { cn as a } from "../../utils/helpers.js";
4
+ import { toCampaignModel as te } from "../../utils/campaignMapper.js";
7
5
  import { HeadshotmarketingCampaignStatus as o, HeadshotmarketingCampaignType as s } from "../../../generated/wspace-types.js";
8
- import { useEffect as re, useState as c } from "react";
9
- import { ArrowLeft as l, FileText as ie, Image as u, Rocket as d, Save as f, Upload as p, Video as ae, X as m } from "lucide-react";
10
- import { useParams as oe } from "react-router-dom";
11
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
- import { EmphasisPanel as se, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
6
+ import { PageLayout as c } from "../../components/PageLayout.js";
7
+ import "../../components/index.js";
8
+ import { useEffect as ne, useState as l } from "react";
9
+ import { ArrowLeft as u, FileText as d, Image as re, Rocket as ie, Save as f, Upload as p, Video as m, X as h } from "lucide-react";
10
+ import { useParams as ae } from "react-router-dom";
11
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
+ import { EmphasisPanel as oe, PagePurpose as se } from "@burdenoff/fe-libs/ui";
13
+ import { useSaveToFiles as ce } from "@burdenoff/fe-libs/storage";
13
14
  //#region src/headshotmarketing/pages/campaigns/CreateCampaignPage.tsx
14
- var ce = [
15
+ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)$/i, de = /\.(pdf|docx?|xlsx?|pptx?|txt|csv|rtf|odt|ods)$/i, fe = [
15
16
  "Brand Awareness",
16
17
  "Lead Generation",
17
18
  "Sales Conversion",
@@ -20,7 +21,7 @@ var ce = [
20
21
  "Engagement",
21
22
  "Product Launch",
22
23
  "Market Research"
23
- ], le = [
24
+ ], pe = [
24
25
  "Google Ads",
25
26
  "Facebook",
26
27
  "Instagram",
@@ -31,7 +32,7 @@ var ce = [
31
32
  "Email",
32
33
  "Blog",
33
34
  "Display Network"
34
- ], ue = [
35
+ ], me = [
35
36
  "Impressions",
36
37
  "Clicks",
37
38
  "CTR",
@@ -42,7 +43,7 @@ var ce = [
42
43
  "Revenue",
43
44
  "Engagement Rate",
44
45
  "Reach"
45
- ], de = [
46
+ ], he = [
46
47
  {
47
48
  value: "email",
48
49
  label: "Email"
@@ -77,14 +78,14 @@ var ce = [
77
78
  "GBP",
78
79
  "CAD",
79
80
  "AUD"
80
- ], y = [
81
+ ], ge = [
81
82
  "Urban Professionals",
82
83
  "College Students",
83
84
  "Parents",
84
85
  "Retirees",
85
86
  "Tech Enthusiasts",
86
87
  "Small Business Owners"
87
- ], b = [
88
+ ], _e = [
88
89
  {
89
90
  key: "basics",
90
91
  label: "Basics"
@@ -106,64 +107,96 @@ var ce = [
106
107
  label: "Tracking"
107
108
  }
108
109
  ];
109
- function x(e) {
110
+ function y(e) {
110
111
  return typeof e == "object" && e && !Array.isArray(e) ? e : {};
111
112
  }
112
- function S(e) {
113
+ function b(e) {
113
114
  return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
114
115
  }
115
- function C(e, t) {
116
+ function x(e, t) {
116
117
  let n = Number(e);
117
118
  return Number.isFinite(n) ? String(n) : t;
118
119
  }
119
- function w(e, t) {
120
- let n = x(t.ageRange);
120
+ function S(e, t) {
121
+ let n = y(t.ageRange);
121
122
  return {
122
123
  name: e?.name ?? "",
123
124
  description: e?.description ?? "",
124
125
  type: e?.type ?? "",
125
- objectives: S(t.objectives),
126
+ objectives: b(t.objectives),
126
127
  channels: e?.channels ?? [],
127
128
  budget: e ? String(e.budget.total) : "",
128
129
  currency: String(t.currency ?? e?.budget.currency ?? "USD"),
129
130
  startDate: e?.timeline.startDate ?? "",
130
131
  endDate: e?.timeline.endDate ?? "",
131
- kpis: S(t.kpis),
132
+ kpis: b(t.kpis),
132
133
  tags: e?.tags ?? [],
133
- ageMin: C(n.min, "18"),
134
- ageMax: C(n.max, "65"),
135
- demographics: e?.targeting.demographics ?? []
134
+ ageMin: x(n.min, "18"),
135
+ ageMax: x(n.max, "65"),
136
+ demographics: e?.targeting.demographics ?? [],
137
+ assets: e?.assets ?? []
136
138
  };
137
139
  }
138
- var T = () => {
139
- let { navigate: S, basePath: C } = e(), { id: T } = oe(), { data: fe, loading: E, error: pe } = ee({
140
- skip: !T,
141
- variables: T ? { id: T } : void 0
142
- }), D = fe?.headshotmarketingCampaign, O = D ? ne(D) : null, k = x(D?.goals), A = !!T, [j, { loading: M, error: N }] = r(), [P, { loading: F, error: I }] = te(), [L, R] = c("basics"), [z, B] = c(""), [V, H] = c(""), [me, U] = c(null), [W, G] = c(() => w(O, k));
143
- re(() => {
144
- O && G(w(O, k));
145
- }, [D?.id, D?.updatedAt]);
146
- let K = (e, t) => {
147
- G((n) => ({
140
+ var C = () => {
141
+ let { navigate: b, basePath: x } = ee(), { campaignId: C } = ae(), { data: ve, loading: w, error: ye } = r({
142
+ skip: !C,
143
+ variables: C ? { id: C } : void 0
144
+ }), T = ve?.headshotmarketingCampaign, E = T ? te(T) : null, D = y(T?.goals), O = !!C, [k, { loading: A, error: j }] = n(), [M, { loading: N, error: P }] = i(), [F, be] = l("basics"), [I, L] = l(""), [R, z] = l(""), [xe, B] = l(null), [V, H] = l(() => S(E, D));
145
+ ne(() => {
146
+ E && H(S(E, D));
147
+ }, [T?.id, T?.updatedAt]);
148
+ let U = (e, t) => {
149
+ H((n) => ({
148
150
  ...n,
149
151
  [e]: t
150
152
  }));
151
- }, q = (e, t) => {
152
- G((n) => ({
153
+ }, W = (e, t) => {
154
+ H((n) => ({
153
155
  ...n,
154
156
  [e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
155
157
  }));
156
- }, J = () => {
157
- let e = z.trim();
158
- e && !W.tags.includes(e) && K("tags", [...W.tags, e]), B("");
159
- }, he = (e) => {
160
- K("tags", W.tags.filter((t) => t !== e));
161
- }, Y = (e) => {
162
- let t = (e || V).trim();
163
- t && !W.demographics.includes(t) && K("demographics", [...W.demographics, t]), H("");
164
- }, ge = (e) => {
165
- K("demographics", W.demographics.filter((t) => t !== e));
166
- }, _e = (e) => {
158
+ }, G = () => {
159
+ let e = I.trim();
160
+ e && !V.tags.includes(e) && U("tags", [...V.tags, e]), L("");
161
+ }, Se = (e) => {
162
+ U("tags", V.tags.filter((t) => t !== e));
163
+ }, K = (e) => {
164
+ let t = (e || R).trim();
165
+ t && !V.demographics.includes(t) && U("demographics", [...V.demographics, t]), z("");
166
+ }, Ce = (e) => {
167
+ U("demographics", V.demographics.filter((t) => t !== e));
168
+ }, { save: we, isPending: q } = ce(), [J, Y] = l(null), Te = async (e) => {
169
+ if (!e || e.length === 0) return;
170
+ Y(null);
171
+ let t = V.name.trim() || "Untitled Campaign";
172
+ try {
173
+ let n = [];
174
+ for (let r of Array.from(e)) {
175
+ let e = r.type || "application/octet-stream", i = await we({
176
+ source: {
177
+ kind: "blob",
178
+ getBlob: async () => ({
179
+ blob: r,
180
+ filename: r.name,
181
+ mimeType: e
182
+ }),
183
+ filename: r.name,
184
+ mimeType: e
185
+ },
186
+ folderPath: `Marketing/Campaigns/${t}`
187
+ });
188
+ n.push(i.name);
189
+ }
190
+ H((e) => ({
191
+ ...e,
192
+ assets: Array.from(new Set([...e.assets, ...n]))
193
+ }));
194
+ } catch (e) {
195
+ Y(e instanceof Error ? e.message : "Failed to upload file(s).");
196
+ }
197
+ }, Ee = (e) => {
198
+ U("assets", V.assets.filter((t) => t !== e));
199
+ }, De = (e) => {
167
200
  switch (e) {
168
201
  case "email": return s.Email;
169
202
  case "social": return s.Social;
@@ -173,406 +206,458 @@ var T = () => {
173
206
  case "influencer": return s.Influencer;
174
207
  default: return s.Content;
175
208
  }
176
- }, ve = (e) => {
209
+ }, Oe = (e) => {
177
210
  if (e === "draft") return o.Draft;
178
- if (W.startDate) {
179
- let e = new Date(W.startDate).getTime();
211
+ if (V.startDate) {
212
+ let e = new Date(V.startDate).getTime();
180
213
  if (Number.isFinite(e) && e > Date.now()) return o.Scheduled;
181
214
  }
182
215
  return o.Active;
183
- }, ye = () => {
184
- if (!W.name.trim()) return "Campaign name is required.";
185
- if (!W.type) return "Campaign type is required.";
186
- if (W.budget) {
187
- let e = Number(W.budget);
216
+ }, ke = () => {
217
+ if (!V.name.trim()) return "Campaign name is required.";
218
+ if (!V.type) return "Campaign type is required.";
219
+ if (V.budget) {
220
+ let e = Number(V.budget);
188
221
  if (!Number.isFinite(e) || e < 0) return "Budget must be a valid non-negative number.";
189
222
  }
190
- let e = Number(W.ageMin), t = Number(W.ageMax);
223
+ let e = Number(V.ageMin), t = Number(V.ageMax);
191
224
  if (!Number.isFinite(e) || !Number.isFinite(t) || e > t) return "Age range is invalid.";
192
- if (W.startDate && W.endDate) {
193
- let e = new Date(W.startDate).getTime(), t = new Date(W.endDate).getTime();
225
+ if (V.startDate && V.endDate) {
226
+ let e = new Date(V.startDate).getTime(), t = new Date(V.endDate).getTime();
194
227
  if (Number.isFinite(e) && Number.isFinite(t) && t < e) return "End date must be on or after start date.";
195
228
  }
196
229
  return null;
197
230
  }, X = (e) => {
198
- let t = W.type ? _e(W.type) : s.Content;
231
+ let t = V.type ? De(V.type) : s.Content;
199
232
  return {
200
- name: W.name,
201
- description: W.description || null,
233
+ name: V.name,
234
+ description: V.description || null,
202
235
  type: t,
203
- status: ve(e),
204
- budget: W.budget ? Number(W.budget) : null,
205
- startDate: W.startDate || null,
206
- endDate: W.endDate || null,
207
- tags: W.tags,
208
- metadata: { currency: W.currency },
236
+ status: Oe(e),
237
+ budget: V.budget ? Number(V.budget) : null,
238
+ startDate: V.startDate || null,
239
+ endDate: V.endDate || null,
240
+ tags: V.tags,
241
+ metadata: { currency: V.currency },
209
242
  goals: {
210
- currency: W.currency,
211
- objectives: W.objectives,
212
- channels: W.channels,
213
- kpis: W.kpis,
214
- demographics: W.demographics,
243
+ currency: V.currency,
244
+ objectives: V.objectives,
245
+ channels: V.channels,
246
+ kpis: V.kpis,
247
+ demographics: V.demographics,
248
+ assets: V.assets,
215
249
  ageRange: {
216
- min: Number(W.ageMin || "18"),
217
- max: Number(W.ageMax || "65")
250
+ min: Number(V.ageMin || "18"),
251
+ max: Number(V.ageMax || "65")
218
252
  }
219
253
  }
220
254
  };
221
- }, Z = async (e) => {
222
- let r = ye();
255
+ }, Z = async (n) => {
256
+ let r = ke();
223
257
  if (r) {
224
- U(r);
258
+ B(r);
225
259
  return;
226
260
  }
227
- U(null);
261
+ B(null);
228
262
  try {
229
- A && T ? await P({
263
+ O && C ? await M({
230
264
  variables: {
231
- id: T,
232
- input: X(e)
265
+ id: C,
266
+ input: X(n)
233
267
  },
234
268
  refetchQueries: [{
235
- query: t,
236
- variables: { id: T }
269
+ query: e,
270
+ variables: { id: C }
237
271
  }, {
238
- query: n,
272
+ query: t,
239
273
  variables: {
240
274
  limit: 100,
241
275
  offset: 0
242
276
  }
243
277
  }],
244
278
  awaitRefetchQueries: !0
245
- }) : await j({
246
- variables: { input: X(e) },
279
+ }) : await k({
280
+ variables: { input: X(n) },
247
281
  refetchQueries: [{
248
- query: n,
282
+ query: t,
249
283
  variables: {
250
284
  limit: 100,
251
285
  offset: 0
252
286
  }
253
287
  }],
254
288
  awaitRefetchQueries: !0
255
- }), S(C + "/campaigns");
289
+ }), b(x + "/campaigns");
256
290
  } catch (e) {
257
- U(e instanceof Error ? e.message : "Failed to save campaign.");
291
+ B(e instanceof Error ? e.message : "Failed to save campaign.");
258
292
  }
259
- }, Q = M || F, $ = me ?? N?.message ?? I?.message ?? null;
260
- return A && E && !O ? /* @__PURE__ */ h(a, {
293
+ }, Q = A || N, $ = xe ?? j?.message ?? P?.message ?? null;
294
+ return O && w && !E ? /* @__PURE__ */ g(c, {
261
295
  title: "Edit Campaign",
262
- children: /* @__PURE__ */ h("div", {
296
+ children: /* @__PURE__ */ g("div", {
263
297
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6 text-sm text-text-secondary",
264
298
  children: "Loading campaign details..."
265
299
  })
266
- }) : A && !E && !O ? /* @__PURE__ */ h(a, {
300
+ }) : O && !w && !E ? /* @__PURE__ */ g(c, {
267
301
  title: "Edit Campaign",
268
- children: /* @__PURE__ */ g("div", {
302
+ children: /* @__PURE__ */ _("div", {
269
303
  className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
270
304
  children: [
271
- /* @__PURE__ */ h("p", {
305
+ /* @__PURE__ */ g("p", {
272
306
  className: "text-sm font-medium text-text-primary",
273
307
  children: "Campaign not found."
274
308
  }),
275
- /* @__PURE__ */ h("p", {
309
+ /* @__PURE__ */ g("p", {
276
310
  className: "text-xs text-text-secondary mt-1",
277
- children: pe?.message ?? "The requested campaign could not be loaded."
311
+ children: ye?.message ?? "The requested campaign could not be loaded."
278
312
  }),
279
- /* @__PURE__ */ g("button", {
280
- onClick: () => S(C + "/campaigns"),
313
+ /* @__PURE__ */ _("button", {
314
+ onClick: () => b(x + "/campaigns"),
281
315
  className: "mt-4 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",
282
- children: [/* @__PURE__ */ h(l, { className: "h-4 w-4" }), "Back to Campaigns"]
316
+ children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
283
317
  })
284
318
  ]
285
319
  })
286
- }) : /* @__PURE__ */ g(a, {
287
- title: A ? "Edit Campaign" : "Create Campaign",
288
- actions: /* @__PURE__ */ g("button", {
289
- onClick: () => S(C + "/campaigns"),
320
+ }) : /* @__PURE__ */ _(c, {
321
+ title: O ? "Edit Campaign" : "Create Campaign",
322
+ actions: /* @__PURE__ */ _("button", {
323
+ onClick: () => b(x + "/campaigns"),
290
324
  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",
291
- children: [/* @__PURE__ */ h(l, { className: "h-4 w-4" }), "Back to Campaigns"]
325
+ children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
292
326
  }),
293
327
  children: [
294
- /* @__PURE__ */ h(_, { children: A ? "Refine this campaign's setup — its goals, audience targeting, creative, budget and the KPIs you'll track. Changes apply the next time the campaign runs." : "Set up a new campaign step by step: name it and pick a type, define who you're targeting, attach creative, set a budget and timeline, then choose the KPIs you want to measure. Save as a draft anytime or launch when ready." }),
295
- /* @__PURE__ */ h("div", {
296
- className: "flex items-center gap-1 border-b border-border-subtle",
297
- children: b.map((e, t) => /* @__PURE__ */ g("button", {
298
- onClick: () => R(e.key),
299
- className: i("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px", L === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
300
- children: [/* @__PURE__ */ g("span", {
328
+ /* @__PURE__ */ g(se, { children: O ? "Refine this campaign's setup — its goals, audience targeting, creative, budget and the KPIs you'll track. Changes apply the next time the campaign runs." : "Set up a new campaign step by step: name it and pick a type, define who you're targeting, attach creative, set a budget and timeline, then choose the KPIs you want to measure. Save as a draft anytime or launch when ready." }),
329
+ /* @__PURE__ */ g("div", {
330
+ className: "flex flex-nowrap items-center gap-1 overflow-x-auto border-b border-border-subtle",
331
+ children: _e.map((e, t) => /* @__PURE__ */ _("button", {
332
+ onClick: () => be(e.key),
333
+ className: a("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px", F === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
334
+ children: [/* @__PURE__ */ _("span", {
301
335
  className: "mr-1.5 text-xs text-text-secondary",
302
336
  children: [t + 1, "."]
303
337
  }), e.label]
304
338
  }, e.key))
305
339
  }),
306
- /* @__PURE__ */ g(se, {
340
+ /* @__PURE__ */ _(oe, {
307
341
  className: "p-6",
308
342
  children: [
309
- L === "basics" && /* @__PURE__ */ g("div", {
343
+ F === "basics" && /* @__PURE__ */ _("div", {
310
344
  className: "space-y-6 max-w-2xl",
311
345
  children: [
312
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
346
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
313
347
  className: "block text-sm font-medium text-text-primary mb-1.5",
314
348
  children: "Campaign Name"
315
- }), /* @__PURE__ */ h("input", {
349
+ }), /* @__PURE__ */ g("input", {
316
350
  type: "text",
317
- value: W.name,
318
- onChange: (e) => K("name", e.target.value),
351
+ value: V.name,
352
+ onChange: (e) => U("name", e.target.value),
319
353
  placeholder: "Enter campaign name...",
320
354
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
321
355
  })] }),
322
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
356
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
323
357
  className: "block text-sm font-medium text-text-primary mb-1.5",
324
358
  children: "Campaign Type"
325
- }), /* @__PURE__ */ g("select", {
326
- value: W.type,
327
- onChange: (e) => K("type", e.target.value),
359
+ }), /* @__PURE__ */ _("select", {
360
+ value: V.type,
361
+ onChange: (e) => U("type", e.target.value),
328
362
  className: "w-full 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)]",
329
- children: [/* @__PURE__ */ h("option", {
363
+ children: [/* @__PURE__ */ g("option", {
330
364
  value: "",
331
365
  children: "Select type..."
332
- }), de.map((e) => /* @__PURE__ */ h("option", {
366
+ }), he.map((e) => /* @__PURE__ */ g("option", {
333
367
  value: e.value,
334
368
  children: e.label
335
369
  }, e.value))]
336
370
  })] }),
337
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
371
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
338
372
  className: "block text-sm font-medium text-text-primary mb-1.5",
339
373
  children: "Description"
340
- }), /* @__PURE__ */ h("textarea", {
341
- value: W.description,
342
- onChange: (e) => K("description", e.target.value),
374
+ }), /* @__PURE__ */ g("textarea", {
375
+ value: V.description,
376
+ onChange: (e) => U("description", e.target.value),
343
377
  placeholder: "Describe the campaign goals and strategy...",
344
378
  rows: 4,
345
379
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
346
380
  })] }),
347
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
381
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
348
382
  className: "block text-sm font-medium text-text-primary mb-2",
349
383
  children: "Objectives"
350
- }), /* @__PURE__ */ h("div", {
384
+ }), /* @__PURE__ */ g("div", {
351
385
  className: "flex flex-wrap gap-2",
352
- children: ce.map((e) => /* @__PURE__ */ h("button", {
353
- onClick: () => q("objectives", e),
354
- className: i("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", W.objectives.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
386
+ children: fe.map((e) => /* @__PURE__ */ g("button", {
387
+ onClick: () => W("objectives", e),
388
+ className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", V.objectives.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
355
389
  children: e
356
390
  }, e))
357
391
  })] })
358
392
  ]
359
393
  }),
360
- L === "targeting" && /* @__PURE__ */ g("div", {
394
+ F === "targeting" && /* @__PURE__ */ _("div", {
361
395
  className: "space-y-6 max-w-2xl",
362
396
  children: [
363
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
397
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
364
398
  className: "block text-sm font-medium text-text-primary mb-1.5",
365
399
  children: "Age Range"
366
- }), /* @__PURE__ */ g("div", {
400
+ }), /* @__PURE__ */ _("div", {
367
401
  className: "flex items-center gap-3",
368
402
  children: [
369
- /* @__PURE__ */ h("input", {
403
+ /* @__PURE__ */ g("input", {
370
404
  type: "number",
371
- value: W.ageMin,
372
- onChange: (e) => K("ageMin", e.target.value),
405
+ value: V.ageMin,
406
+ onChange: (e) => U("ageMin", e.target.value),
373
407
  min: 13,
374
408
  max: 100,
375
409
  className: "w-24 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)]"
376
410
  }),
377
- /* @__PURE__ */ h("span", {
411
+ /* @__PURE__ */ g("span", {
378
412
  className: "text-sm text-text-secondary",
379
413
  children: "to"
380
414
  }),
381
- /* @__PURE__ */ h("input", {
415
+ /* @__PURE__ */ g("input", {
382
416
  type: "number",
383
- value: W.ageMax,
384
- onChange: (e) => K("ageMax", e.target.value),
417
+ value: V.ageMax,
418
+ onChange: (e) => U("ageMax", e.target.value),
385
419
  min: 13,
386
420
  max: 100,
387
421
  className: "w-24 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)]"
388
422
  })
389
423
  ]
390
424
  })] }),
391
- /* @__PURE__ */ g("div", { children: [
392
- /* @__PURE__ */ h("label", {
425
+ /* @__PURE__ */ _("div", { children: [
426
+ /* @__PURE__ */ g("label", {
393
427
  className: "block text-sm font-medium text-text-primary mb-2",
394
428
  children: "Demographics"
395
429
  }),
396
- /* @__PURE__ */ h("div", {
430
+ /* @__PURE__ */ g("div", {
397
431
  className: "flex flex-wrap gap-2 mb-2",
398
- children: W.demographics.map((e) => /* @__PURE__ */ g("span", {
432
+ children: V.demographics.map((e) => /* @__PURE__ */ _("span", {
399
433
  className: "inline-flex items-center gap-1 rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-primary",
400
- children: [e, /* @__PURE__ */ h("button", {
401
- onClick: () => ge(e),
434
+ children: [e, /* @__PURE__ */ g("button", {
435
+ onClick: () => Ce(e),
402
436
  className: "text-text-secondary hover:text-text-primary",
403
- children: /* @__PURE__ */ h(m, { className: "h-3 w-3" })
437
+ children: /* @__PURE__ */ g(h, { className: "h-3 w-3" })
404
438
  })]
405
439
  }, e))
406
440
  }),
407
- /* @__PURE__ */ g("div", {
441
+ /* @__PURE__ */ _("div", {
408
442
  className: "flex items-center gap-2 mb-2",
409
- children: [/* @__PURE__ */ h("input", {
443
+ children: [/* @__PURE__ */ g("input", {
410
444
  type: "text",
411
- value: V,
412
- onChange: (e) => H(e.target.value),
413
- onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), Y()),
445
+ value: R,
446
+ onChange: (e) => z(e.target.value),
447
+ onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), K()),
414
448
  placeholder: "Add demographic...",
415
449
  className: "flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
416
- }), /* @__PURE__ */ h("button", {
417
- onClick: () => Y(),
450
+ }), /* @__PURE__ */ g("button", {
451
+ onClick: () => K(),
418
452
  className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
419
453
  children: "Add"
420
454
  })]
421
455
  }),
422
- /* @__PURE__ */ h("div", {
456
+ /* @__PURE__ */ g("div", {
423
457
  className: "flex flex-wrap gap-1.5",
424
- children: y.filter((e) => !W.demographics.includes(e)).map((e) => /* @__PURE__ */ g("button", {
425
- onClick: () => Y(e),
458
+ children: ge.filter((e) => !V.demographics.includes(e)).map((e) => /* @__PURE__ */ _("button", {
459
+ onClick: () => K(e),
426
460
  className: "rounded-full border border-dashed border-border-subtle px-2.5 py-1 text-xs text-text-secondary hover:text-text-primary hover:border-foreground transition-colors",
427
461
  children: ["+ ", e]
428
462
  }, e))
429
463
  })
430
464
  ] }),
431
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
465
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
432
466
  className: "block text-sm font-medium text-text-primary mb-2",
433
467
  children: "Channels"
434
- }), /* @__PURE__ */ h("div", {
468
+ }), /* @__PURE__ */ g("div", {
435
469
  className: "flex flex-wrap gap-2",
436
- children: le.map((e) => /* @__PURE__ */ h("button", {
437
- onClick: () => q("channels", e),
438
- className: i("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", W.channels.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
470
+ children: pe.map((e) => /* @__PURE__ */ g("button", {
471
+ onClick: () => W("channels", e),
472
+ className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", V.channels.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
439
473
  children: e
440
474
  }, e))
441
475
  })] })
442
476
  ]
443
477
  }),
444
- L === "content" && /* @__PURE__ */ g("div", {
478
+ F === "content" && /* @__PURE__ */ _("div", {
445
479
  className: "space-y-6",
446
- children: [/* @__PURE__ */ h("p", {
447
- className: "text-sm text-text-secondary",
448
- children: "Upload creative assets for your campaign."
449
- }), /* @__PURE__ */ h("div", {
450
- className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
451
- children: [
452
- {
453
- label: "Images",
454
- icon: u,
455
- count: 0,
456
- accept: "image/*"
457
- },
458
- {
459
- label: "Videos",
460
- icon: ae,
461
- count: 0,
462
- accept: "video/*"
463
- },
464
- {
465
- label: "Documents",
466
- icon: ie,
467
- count: 0,
468
- accept: ".pdf,.doc,.docx,.xlsx"
469
- }
470
- ].map((e) => /* @__PURE__ */ g("div", {
471
- className: "flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border-subtle bg-bg-sunken/30 p-8 text-center hover:border-primary/50 hover:bg-bg-sunken/50 transition-colors cursor-pointer",
480
+ children: [
481
+ /* @__PURE__ */ g("p", {
482
+ className: "text-sm text-text-secondary",
483
+ children: "Upload creative assets for your campaign. Files are stored in your workspace Files and attached to this campaign."
484
+ }),
485
+ /* @__PURE__ */ g("div", {
486
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
472
487
  children: [
473
- /* @__PURE__ */ h(e.icon, { className: "h-10 w-10 text-text-secondary mb-3" }),
474
- /* @__PURE__ */ h("p", {
475
- className: "text-sm font-medium text-text-primary",
476
- children: e.label
477
- }),
478
- /* @__PURE__ */ g("p", {
479
- className: "text-xs text-text-secondary mt-1",
480
- children: [e.count, " files uploaded"]
481
- }),
482
- /* @__PURE__ */ g("button", {
483
- className: "mt-3 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
484
- children: [/* @__PURE__ */ h(p, { className: "h-3 w-3" }), "Upload"]
485
- })
488
+ {
489
+ label: "Images",
490
+ icon: re,
491
+ accept: "image/*",
492
+ match: le
493
+ },
494
+ {
495
+ label: "Videos",
496
+ icon: m,
497
+ accept: "video/*",
498
+ match: ue
499
+ },
500
+ {
501
+ label: "Documents",
502
+ icon: d,
503
+ accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv",
504
+ match: de
505
+ }
506
+ ].map((e) => {
507
+ let t = V.assets.filter((t) => e.match.test(t)).length;
508
+ return /* @__PURE__ */ _("label", {
509
+ className: a("flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border-subtle bg-bg-sunken/30 p-8 text-center transition-colors", q ? "cursor-progress opacity-70" : "cursor-pointer hover:border-primary/50 hover:bg-bg-sunken/50"),
510
+ children: [
511
+ /* @__PURE__ */ g("input", {
512
+ type: "file",
513
+ accept: e.accept,
514
+ multiple: !0,
515
+ disabled: q,
516
+ className: "sr-only",
517
+ onChange: (e) => {
518
+ Te(e.currentTarget.files), e.currentTarget.value = "";
519
+ }
520
+ }),
521
+ /* @__PURE__ */ g(e.icon, { className: "h-10 w-10 text-text-secondary mb-3" }),
522
+ /* @__PURE__ */ g("p", {
523
+ className: "text-sm font-medium text-text-primary",
524
+ children: e.label
525
+ }),
526
+ /* @__PURE__ */ _("p", {
527
+ className: "text-xs text-text-secondary mt-1",
528
+ children: [
529
+ t,
530
+ " ",
531
+ t === 1 ? "file" : "files",
532
+ " uploaded"
533
+ ]
534
+ }),
535
+ /* @__PURE__ */ _("span", {
536
+ className: "mt-3 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
537
+ children: [/* @__PURE__ */ g(p, { className: "h-3 w-3" }), q ? "Uploading..." : "Upload"]
538
+ })
539
+ ]
540
+ }, e.label);
541
+ })
542
+ }),
543
+ J && /* @__PURE__ */ g("div", {
544
+ className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
545
+ children: J
546
+ }),
547
+ V.assets.length > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
548
+ className: "block text-sm font-medium text-text-primary mb-2",
549
+ children: [
550
+ "Attached Assets (",
551
+ V.assets.length,
552
+ ")"
486
553
  ]
487
- }, e.label))
488
- })]
554
+ }), /* @__PURE__ */ g("div", {
555
+ className: "space-y-2",
556
+ children: V.assets.map((e) => /* @__PURE__ */ _("div", {
557
+ className: "flex items-center justify-between gap-3 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
558
+ children: [/* @__PURE__ */ _("div", {
559
+ className: "flex min-w-0 items-center gap-2",
560
+ children: [/* @__PURE__ */ g(d, { className: "h-4 w-4 flex-shrink-0 text-text-secondary" }), /* @__PURE__ */ g("span", {
561
+ className: "truncate text-sm text-text-primary",
562
+ children: e.split("/").pop() ?? e
563
+ })]
564
+ }), /* @__PURE__ */ g("button", {
565
+ type: "button",
566
+ onClick: () => Ee(e),
567
+ className: "flex-shrink-0 rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
568
+ "aria-label": `Remove ${e}`,
569
+ children: /* @__PURE__ */ g(h, { className: "h-4 w-4" })
570
+ })]
571
+ }, e))
572
+ })] })
573
+ ]
489
574
  }),
490
- L === "budget" && /* @__PURE__ */ g("div", {
575
+ F === "budget" && /* @__PURE__ */ _("div", {
491
576
  className: "space-y-6 max-w-2xl",
492
- children: [/* @__PURE__ */ g("div", {
577
+ children: [/* @__PURE__ */ _("div", {
493
578
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
494
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
579
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
495
580
  className: "block text-sm font-medium text-text-primary mb-1.5",
496
581
  children: "Budget"
497
- }), /* @__PURE__ */ h("input", {
582
+ }), /* @__PURE__ */ g("input", {
498
583
  type: "number",
499
- value: W.budget,
500
- onChange: (e) => K("budget", e.target.value),
584
+ value: V.budget,
585
+ onChange: (e) => U("budget", e.target.value),
501
586
  placeholder: "0",
502
587
  min: 0,
503
588
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
504
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
589
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
505
590
  className: "block text-sm font-medium text-text-primary mb-1.5",
506
591
  children: "Currency"
507
- }), /* @__PURE__ */ h("select", {
508
- value: W.currency,
509
- onChange: (e) => K("currency", e.target.value),
592
+ }), /* @__PURE__ */ g("select", {
593
+ value: V.currency,
594
+ onChange: (e) => U("currency", e.target.value),
510
595
  className: "w-full 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)]",
511
- children: v.map((e) => /* @__PURE__ */ h("option", {
596
+ children: v.map((e) => /* @__PURE__ */ g("option", {
512
597
  value: e,
513
598
  children: e
514
599
  }, e))
515
600
  })] })]
516
- }), /* @__PURE__ */ g("div", {
601
+ }), /* @__PURE__ */ _("div", {
517
602
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
518
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
603
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
519
604
  className: "block text-sm font-medium text-text-primary mb-1.5",
520
605
  children: "Start Date"
521
- }), /* @__PURE__ */ h("input", {
606
+ }), /* @__PURE__ */ g("input", {
522
607
  type: "date",
523
- value: W.startDate,
524
- onChange: (e) => K("startDate", e.target.value),
608
+ value: V.startDate,
609
+ onChange: (e) => U("startDate", e.target.value),
525
610
  className: "w-full 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)]"
526
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
611
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
527
612
  className: "block text-sm font-medium text-text-primary mb-1.5",
528
613
  children: "End Date"
529
- }), /* @__PURE__ */ h("input", {
614
+ }), /* @__PURE__ */ g("input", {
530
615
  type: "date",
531
- value: W.endDate,
532
- onChange: (e) => K("endDate", e.target.value),
616
+ value: V.endDate,
617
+ onChange: (e) => U("endDate", e.target.value),
533
618
  className: "w-full 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)]"
534
619
  })] })]
535
620
  })]
536
621
  }),
537
- L === "tracking" && /* @__PURE__ */ g("div", {
622
+ F === "tracking" && /* @__PURE__ */ _("div", {
538
623
  className: "space-y-6 max-w-2xl",
539
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
624
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
540
625
  className: "block text-sm font-medium text-text-primary mb-2",
541
626
  children: "Key Performance Indicators"
542
- }), /* @__PURE__ */ h("div", {
627
+ }), /* @__PURE__ */ g("div", {
543
628
  className: "flex flex-wrap gap-2",
544
- children: ue.map((e) => /* @__PURE__ */ h("button", {
545
- onClick: () => q("kpis", e),
546
- className: i("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", W.kpis.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
629
+ children: me.map((e) => /* @__PURE__ */ g("button", {
630
+ onClick: () => W("kpis", e),
631
+ className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", V.kpis.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
547
632
  children: e
548
633
  }, e))
549
- })] }), /* @__PURE__ */ g("div", { children: [
550
- /* @__PURE__ */ h("label", {
634
+ })] }), /* @__PURE__ */ _("div", { children: [
635
+ /* @__PURE__ */ g("label", {
551
636
  className: "block text-sm font-medium text-text-primary mb-2",
552
637
  children: "Tags"
553
638
  }),
554
- /* @__PURE__ */ h("div", {
639
+ /* @__PURE__ */ g("div", {
555
640
  className: "flex flex-wrap gap-2 mb-2",
556
- children: W.tags.map((e) => /* @__PURE__ */ g("span", {
641
+ children: V.tags.map((e) => /* @__PURE__ */ _("span", {
557
642
  className: "inline-flex items-center gap-1 rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-primary",
558
- children: [e, /* @__PURE__ */ h("button", {
559
- onClick: () => he(e),
643
+ children: [e, /* @__PURE__ */ g("button", {
644
+ onClick: () => Se(e),
560
645
  className: "text-text-secondary hover:text-text-primary",
561
- children: /* @__PURE__ */ h(m, { className: "h-3 w-3" })
646
+ children: /* @__PURE__ */ g(h, { className: "h-3 w-3" })
562
647
  })]
563
648
  }, e))
564
649
  }),
565
- /* @__PURE__ */ g("div", {
650
+ /* @__PURE__ */ _("div", {
566
651
  className: "flex items-center gap-2",
567
- children: [/* @__PURE__ */ h("input", {
652
+ children: [/* @__PURE__ */ g("input", {
568
653
  type: "text",
569
- value: z,
570
- onChange: (e) => B(e.target.value),
571
- onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), J()),
654
+ value: I,
655
+ onChange: (e) => L(e.target.value),
656
+ onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), G()),
572
657
  placeholder: "Add a tag...",
573
658
  className: "flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
574
- }), /* @__PURE__ */ h("button", {
575
- onClick: J,
659
+ }), /* @__PURE__ */ g("button", {
660
+ onClick: G,
576
661
  className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
577
662
  children: "Add"
578
663
  })]
@@ -581,29 +666,29 @@ var T = () => {
581
666
  })
582
667
  ]
583
668
  }),
584
- $ && /* @__PURE__ */ h("div", {
669
+ $ && /* @__PURE__ */ g("div", {
585
670
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
586
671
  children: $
587
672
  }),
588
- /* @__PURE__ */ g("div", {
589
- className: "flex items-center justify-end gap-3 rounded-lg border border-border-seam bg-gloss-card p-4 shadow-pop",
673
+ /* @__PURE__ */ _("div", {
674
+ className: "flex flex-wrap items-center justify-end gap-3 rounded-lg border border-border-seam bg-gloss-card p-4 shadow-pop",
590
675
  children: [
591
- /* @__PURE__ */ h("button", {
592
- onClick: () => S(C + "/campaigns"),
676
+ /* @__PURE__ */ g("button", {
677
+ onClick: () => b(x + "/campaigns"),
593
678
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
594
679
  children: "Cancel"
595
680
  }),
596
- /* @__PURE__ */ g("button", {
681
+ /* @__PURE__ */ _("button", {
597
682
  onClick: () => Z("draft"),
598
683
  disabled: Q,
599
684
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
600
- children: [/* @__PURE__ */ h(f, { className: "h-4 w-4" }), "Save Draft"]
685
+ children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), "Save Draft"]
601
686
  }),
602
- /* @__PURE__ */ g("button", {
687
+ /* @__PURE__ */ _("button", {
603
688
  onClick: () => Z("launch"),
604
689
  disabled: Q,
605
690
  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 disabled:opacity-60",
606
- children: [/* @__PURE__ */ h(d, { className: "h-4 w-4" }), A ? "Update Campaign" : "Create Campaign"]
691
+ children: [/* @__PURE__ */ g(ie, { className: "h-4 w-4" }), O ? "Update Campaign" : "Create Campaign"]
607
692
  })
608
693
  ]
609
694
  })
@@ -611,6 +696,6 @@ var T = () => {
611
696
  });
612
697
  };
613
698
  //#endregion
614
- export { T as CreateCampaignPage };
699
+ export { C as CreateCampaignPage };
615
700
 
616
701
  //# sourceMappingURL=CreateCampaignPage.js.map