@burdenoff/microfe-headshotmarketing 2026.1202.1 → 2026.1203.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/generated/wspace-operations.d.ts +346 -0
  2. package/dist/generated/wspace-operations.js +565 -443
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +114 -2
  5. package/dist/generated/wspace-types.js.map +1 -1
  6. package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
  7. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
  8. package/dist/headshotmarketing/components/CrmRecordSelection.js +51 -43
  9. package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -1
  10. package/dist/headshotmarketing/components/EntityTagPicker.d.ts +9 -0
  11. package/dist/headshotmarketing/components/EntityTagPicker.js +261 -0
  12. package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -0
  13. package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
  14. package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
  15. package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
  16. package/dist/headshotmarketing/components/index.d.ts +1 -0
  17. package/dist/headshotmarketing/components/index.js +2 -1
  18. package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
  19. package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
  20. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  21. package/dist/headshotmarketing/hooks/useEntityTags.d.ts +31 -0
  22. package/dist/headshotmarketing/hooks/useEntityTags.js +34 -0
  23. package/dist/headshotmarketing/hooks/useEntityTags.js.map +1 -0
  24. package/dist/headshotmarketing/pages/HomePage.js +33 -26
  25. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  26. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +182 -174
  27. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  28. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +309 -294
  29. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  30. package/dist/headshotmarketing/pages/ads/AdsPage.js +0 -8
  31. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  32. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +173 -164
  33. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  34. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +0 -4
  35. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  36. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +0 -4
  37. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  38. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +0 -4
  39. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
  40. package/dist/headshotmarketing/pages/automation/AutomationPage.js +28 -25
  41. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +163 -155
  43. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  44. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +2 -0
  45. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  46. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +268 -256
  47. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  48. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +1 -1
  49. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  50. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +136 -128
  51. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  52. package/dist/headshotmarketing/pages/content/ContentPage.js +1 -0
  53. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  54. package/dist/headshotmarketing/pages/crm/ContactsPage.js +1 -0
  55. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  56. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +190 -182
  57. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  58. package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
  59. package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
  60. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +0 -3
  61. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  62. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
  63. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  64. package/dist/headshotmarketing/pages/social-media/PostsPage.js +3 -6
  65. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  66. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +0 -8
  67. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  68. package/package.json +5 -3
@@ -1,57 +1,58 @@
1
1
  import { useCreateHeadshotmarketingAdCreativeMutation as e, useDeleteHeadshotmarketingAdCreativeMutation as t, useHeadshotmarketingAdCreativesListQuery as n, useUpdateHeadshotmarketingAdCreativeMutation as r } from "../../../generated/wspace-operations.js";
2
2
  import { HeadshotmarketingAdCreativeStatus as i, HeadshotmarketingAdCreativeType as a } from "../../../generated/wspace-types.js";
3
+ import { UploadAudienceSelect as ee } from "../../components/UploadAudienceSelect.js";
3
4
  import { cn as o, formatNumber as s, formatPercentage as c } from "../../utils/helpers.js";
4
- import { toAdCreativeModel as l } from "../../utils/adsMapper.js";
5
- import { PageLayout as ee } from "../../components/PageLayout.js";
5
+ import { PageLayout as l } from "../../components/PageLayout.js";
6
6
  import { EmptyState as te } from "../../components/EmptyState.js";
7
- import { StatusBadge as u } from "../../components/StatusBadge.js";
8
- import { FilterBar as ne } from "../../components/FilterBar.js";
9
- import { Modal as d } from "../../components/Modal.js";
10
- import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
11
- import { Pagination as ie } from "../../components/Pagination.js";
12
- import { TrackedLinksPanel as ae } from "../../components/TrackedLinksPanel.js";
7
+ import { StatusBadge as ne } from "../../components/StatusBadge.js";
8
+ import { FilterBar as re } from "../../components/FilterBar.js";
9
+ import { Modal as u } from "../../components/Modal.js";
10
+ import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
11
+ import { Pagination as ae } from "../../components/Pagination.js";
12
+ import { toAdCreativeModel as oe } from "../../utils/adsMapper.js";
13
+ import { TrackedLinksPanel as se } from "../../components/TrackedLinksPanel.js";
13
14
  import "../../components/index.js";
14
- import { useHeadshotmarketingBootstrap as oe } from "../../hooks/useHeadshotmarketingBootstrap.js";
15
- import { usePagination as se } from "../../hooks/usePagination.js";
16
- import { AdCreativeTestsSection as ce } from "./AdCreativeTestsSection.js";
17
- import { useEffect as f, useMemo as p, useRef as le, useState as m } from "react";
18
- import { ExternalLink as ue, Eye as h, Image as g, Layers as _, MoreHorizontal as v, Pencil as de, Plus as fe, Smartphone as y, Trash2 as pe, Type as b, UploadCloud as me, Video as he } from "lucide-react";
19
- import { useExclusiveMenu as x } from "@burdenoff/fe-libs/shared/hooks";
20
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
21
- import { EmphasisPanel as ge, PagePurpose as _e, ThemedSelect as T } from "@burdenoff/fe-libs/ui";
22
- import { useSaveToFiles as ve } from "@burdenoff/fe-libs/storage";
15
+ import { useHeadshotmarketingBootstrap as ce } from "../../hooks/useHeadshotmarketingBootstrap.js";
16
+ import { usePagination as le } from "../../hooks/usePagination.js";
17
+ import { AdCreativeTestsSection as ue } from "./AdCreativeTestsSection.js";
18
+ import { useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
19
+ import { ExternalLink as de, Eye as h, Image as g, Layers as fe, MoreHorizontal as _, Pencil as pe, Plus as me, Smartphone as v, Trash2 as he, Type as y, UploadCloud as ge, Video as _e } from "lucide-react";
20
+ import { useExclusiveMenu as b } from "@burdenoff/fe-libs/shared/hooks";
21
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
22
+ import { EmphasisPanel as ve, PagePurpose as ye, ThemedSelect as w } from "@burdenoff/fe-libs/ui";
23
+ import { fileUploadVisibility as be, useSaveToFiles as xe } from "@burdenoff/fe-libs/storage";
23
24
  // src/headshotmarketing/pages/ads/AdCreativesPage.tsx
24
- var ye = {
25
+ var Se = {
25
26
  image: g,
26
- video: he,
27
- carousel: _,
28
- text: b,
29
- responsive: y
30
- }, be = {
27
+ video: _e,
28
+ carousel: fe,
29
+ text: y,
30
+ responsive: v
31
+ }, Ce = {
31
32
  image: "bg-status-info-bg text-status-info-text",
32
33
  video: "bg-[var(--color-accent-soft)] text-action-primary-bg",
33
34
  carousel: "bg-status-warning-bg text-status-warning-text",
34
35
  text: "bg-bg-sunken text-text-secondary",
35
36
  responsive: "bg-status-success-bg text-status-success-text"
36
- }, xe = {
37
+ }, we = {
37
38
  image: a.Image,
38
39
  video: a.Video,
39
40
  carousel: a.Carousel,
40
41
  text: a.Text,
41
42
  responsive: a.Responsive
42
- }, Se = {
43
+ }, T = {
43
44
  active: i.Active,
44
45
  paused: i.Paused,
45
46
  pending_review: i.PendingReview,
46
47
  rejected: i.Rejected
47
48
  };
48
49
  function E(e) {
49
- return xe[e] ?? a.Image;
50
+ return we[e] ?? a.Image;
50
51
  }
51
- function Ce(e) {
52
- return Se[e] ?? i.PendingReview;
52
+ function Te(e) {
53
+ return T[e] ?? i.PendingReview;
53
54
  }
54
- function we(e) {
55
+ function Ee(e) {
55
56
  return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "text";
56
57
  }
57
58
  var D = {
@@ -64,91 +65,98 @@ var D = {
64
65
  status: "pending_review",
65
66
  adCampaignId: ""
66
67
  }, O = () => {
67
- let { data: i, refetch: a } = oe(), [h, _] = m(""), [v, de] = m(""), [y, pe] = m("all"), [b, he] = m("all"), [x, O] = m(null), [A, j] = m(!1), [M, N] = m(D), [P, F] = m(null), [I, L] = m(null), [R, z] = m(null), [B, Ee] = m(null), [V, H] = m(null), [U, W] = m(null), G = le(null), K = se({ initialPageSize: 12 }), { limit: De, offset: Oe, setPage: ke, setTotal: Ae } = K;
68
- f(() => {
69
- let e = setTimeout(() => de(h), 300);
68
+ let { data: i, refetch: a } = ce(), [h, fe] = m(""), [_, pe] = m(""), [v, he] = m("all"), [y, _e] = m("all"), [b, O] = m(null), [Oe, A] = m(!1), [ke, Ae] = m("PRIVATE"), j = p(!1), [M, N] = m(D), [P, F] = m(null), [I, L] = m(null), [R, z] = m(null), [B, je] = m(null), [V, H] = m(null), [U, W] = m(null), G = p(null), K = le({ initialPageSize: 12 }), { limit: Me, offset: Ne, setPage: Pe, setTotal: Fe } = K;
69
+ d(() => {
70
+ let e = setTimeout(() => pe(h), 300);
70
71
  return () => clearTimeout(e);
71
- }, [h]), f(() => {
72
- ke(1);
72
+ }, [h]), d(() => {
73
+ Pe(1);
73
74
  }, [
75
+ _,
74
76
  v,
75
77
  y,
76
- b,
77
- ke
78
+ Pe
78
79
  ]);
79
- let { data: q, loading: je, error: Me, refetch: Ne } = n({
80
+ let { data: q, loading: Ie, error: Le, refetch: Re } = n({
80
81
  variables: {
81
- limit: De,
82
- offset: Oe,
83
- search: v || null,
84
- status: Se[b] ?? null,
85
- type: xe[y] ?? null
82
+ limit: Me,
83
+ offset: Ne,
84
+ search: _ || null,
85
+ status: T[y] ?? null,
86
+ type: we[v] ?? null
86
87
  },
87
88
  errorPolicy: "all",
88
89
  notifyOnNetworkStatusChange: !0
89
90
  }), J = q?.headshotmarketingAdCreatives.total ?? 0;
90
- f(() => {
91
- Ae(J);
92
- }, [J, Ae]);
93
- let Pe = p(() => (q?.headshotmarketingAdCreatives.items ?? []).map((e) => l(e)), [q?.headshotmarketingAdCreatives.items]), Y = p(() => {
94
- let e = (i?.headshotmarketingAdCreatives.items ?? []).map((e) => l(e)), t = e.filter((e) => e.status === "active").length, n = e.reduce((e, t) => e + t.performance.impressions, 0), r = e.filter((e) => e.performance.impressions > 0), a = r.length > 0 ? r.reduce((e, t) => e + t.performance.ctr, 0) / r.length : 0;
91
+ d(() => {
92
+ Fe(J);
93
+ }, [J, Fe]);
94
+ let ze = f(() => (q?.headshotmarketingAdCreatives.items ?? []).map((e) => oe(e)), [q?.headshotmarketingAdCreatives.items]), Y = f(() => {
95
+ let e = (i?.headshotmarketingAdCreatives.items ?? []).map((e) => oe(e)), t = e.filter((e) => e.status === "active").length, n = e.reduce((e, t) => e + t.performance.impressions, 0), r = e.filter((e) => e.performance.impressions > 0), a = r.length > 0 ? r.reduce((e, t) => e + t.performance.ctr, 0) / r.length : 0;
95
96
  return {
96
97
  total: e.length,
97
98
  active: t,
98
99
  totalImpressions: n,
99
100
  avgCtr: a
100
101
  };
101
- }, [i?.headshotmarketingAdCreatives.items]), X = p(() => i?.headshotmarketingAdCampaigns.items ?? [], [i?.headshotmarketingAdCampaigns.items]), { save: Fe, isPending: Ie } = ve(), [Le, { loading: Re }] = e(), [ze, { loading: Z }] = r(), [Be, { loading: Ve }] = t(), Q = async () => {
102
- await Promise.all([Ne(), a()]);
103
- }, $ = () => {
104
- j(!1), N(D), F(null), I && URL.revokeObjectURL(I), L(null), G.current && (G.current.value = "");
105
- }, He = () => {
106
- W(null), N(D), F(null), L(null), j(!0);
107
- }, Ue = (e) => {
102
+ }, [i?.headshotmarketingAdCreatives.items]), X = f(() => i?.headshotmarketingAdCampaigns.items ?? [], [i?.headshotmarketingAdCampaigns.items]), { save: Be, isPending: Ve } = xe(), [He, { loading: Ue }] = e(), [We, { loading: Ge }] = r(), [Ke, { loading: qe }] = t(), Z = async () => {
103
+ await Promise.all([Re(), a()]);
104
+ }, Q = () => {
105
+ A(!1), N(D), F(null), I && URL.revokeObjectURL(I), L(null), G.current && (G.current.value = "");
106
+ }, Je = () => {
107
+ Ae("PRIVATE"), W(null), N(D), F(null), L(null), A(!0);
108
+ }, Ye = (e) => {
108
109
  I && URL.revokeObjectURL(I), e ? (F(e), L(e.type.startsWith("image/") ? URL.createObjectURL(e) : null), N((t) => ({
109
110
  ...t,
110
111
  name: t.name || e.name.replace(/\.[^.]+$/, ""),
111
- type: we(e.type)
112
+ type: Ee(e.type)
112
113
  }))) : (F(null), L(null));
113
- }, We = async () => {
114
- if (!M.name.trim()) W("Creative name is required.");
115
- else if (!M.adCampaignId) W("An ad campaign is required — select one, or create an ad campaign first.");
116
- else {
117
- W(null);
118
- try {
119
- let e = [], t = {};
120
- if (P) {
121
- let e = P, n = await Fe({
122
- source: {
123
- kind: "blob",
124
- getBlob: async () => ({
125
- blob: e,
126
- filename: e.name,
127
- mimeType: e.type || "application/octet-stream"
128
- }),
129
- filename: e.name,
130
- mimeType: e.type || "application/octet-stream"
131
- },
132
- folderPath: "/Headshotmarketing/Ad Creatives"
133
- });
134
- t.fileId = n.id, t.fileName = n.name;
114
+ }, Xe = async () => {
115
+ if (!j.current) {
116
+ if (!M.name.trim()) W("Creative name is required.");
117
+ else if (!M.adCampaignId) W("An ad campaign is required — select one, or create an ad campaign first.");
118
+ else {
119
+ W(null);
120
+ try {
121
+ let e = be(ke);
122
+ j.current = !0;
123
+ let t = [], n = {};
124
+ if (P) {
125
+ let t = P, r = await Be({
126
+ source: {
127
+ kind: "blob",
128
+ getBlob: async () => ({
129
+ blob: t,
130
+ filename: t.name,
131
+ mimeType: t.type || "application/octet-stream"
132
+ }),
133
+ filename: t.name,
134
+ mimeType: t.type || "application/octet-stream"
135
+ },
136
+ folderPath: "/Headshotmarketing/Ad Creatives",
137
+ visibility: e
138
+ });
139
+ n.fileId = r.id, n.fileName = r.name;
140
+ }
141
+ await He({ variables: { input: {
142
+ adCampaignId: M.adCampaignId,
143
+ name: M.name.trim(),
144
+ type: E(M.type),
145
+ headline: M.headline || null,
146
+ body: M.body || null,
147
+ callToAction: M.callToAction || null,
148
+ destinationUrl: M.destinationUrl || null,
149
+ mediaUrls: t,
150
+ metadata: Object.keys(n).length > 0 ? n : null
151
+ } } }), Q(), await Z();
152
+ } catch (e) {
153
+ W(e instanceof Error ? e.message : "Failed to upload creative.");
154
+ } finally {
155
+ j.current = !1;
135
156
  }
136
- await Le({ variables: { input: {
137
- adCampaignId: M.adCampaignId,
138
- name: M.name.trim(),
139
- type: E(M.type),
140
- headline: M.headline || null,
141
- body: M.body || null,
142
- callToAction: M.callToAction || null,
143
- destinationUrl: M.destinationUrl || null,
144
- mediaUrls: e,
145
- metadata: Object.keys(t).length > 0 ? t : null
146
- } } }), $(), await Q();
147
- } catch (e) {
148
- W(e instanceof Error ? e.message : "Failed to upload creative.");
149
157
  }
150
158
  }
151
- }, Ge = (e) => {
159
+ }, Ze = (e) => {
152
160
  O(null), W(null), z({
153
161
  id: e.id,
154
162
  form: {
@@ -161,13 +169,13 @@ var D = {
161
169
  status: e.status
162
170
  }
163
171
  });
164
- }, Ke = async () => {
172
+ }, Qe = async () => {
165
173
  if (R) {
166
174
  if (!R.form.name.trim()) W("Creative name is required.");
167
175
  else {
168
176
  W(null);
169
177
  try {
170
- await ze({ variables: {
178
+ await We({ variables: {
171
179
  id: R.id,
172
180
  input: {
173
181
  name: R.form.name.trim(),
@@ -176,166 +184,166 @@ var D = {
176
184
  body: R.form.body || null,
177
185
  callToAction: R.form.callToAction || null,
178
186
  destinationUrl: R.form.destinationUrl || null,
179
- status: Ce(R.form.status)
187
+ status: Te(R.form.status)
180
188
  }
181
- } }), z(null), await Q();
189
+ } }), z(null), await Z();
182
190
  } catch (e) {
183
191
  W(e instanceof Error ? e.message : "Failed to save creative.");
184
192
  }
185
193
  }
186
194
  }
187
- }, qe = async () => {
195
+ }, $e = async () => {
188
196
  if (V) {
189
197
  W(null);
190
198
  try {
191
- await Be({ variables: { id: V.id } }), H(null), await Q();
199
+ await Ke({ variables: { id: V.id } }), H(null), await Z();
192
200
  } catch (e) {
193
201
  W(e instanceof Error ? e.message : "Failed to delete creative.");
194
202
  }
195
203
  }
196
- }, Je = Ie || Re;
197
- return /* @__PURE__ */ w(ee, {
204
+ }, $ = Ve || Ue;
205
+ return /* @__PURE__ */ C(l, {
198
206
  title: "Ad Creatives",
199
207
  description: "Manage your advertising creative assets",
200
- actions: /* @__PURE__ */ w("button", {
201
- onClick: He,
208
+ actions: /* @__PURE__ */ C("button", {
209
+ onClick: Je,
202
210
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
203
- children: [/* @__PURE__ */ C(fe, { className: "h-4 w-4" }), "Upload Creative"]
211
+ children: [/* @__PURE__ */ S(me, { className: "h-4 w-4" }), "Upload Creative"]
204
212
  }),
205
213
  children: [
206
- /* @__PURE__ */ C(_e, { children: "Your library of ad creatives — images, videos, carousels and copy. Keep every asset and its real performance (impressions, CTR) in one place so you can quickly see what's resonating and reuse your best creative across campaigns." }),
207
- /* @__PURE__ */ C(ge, { children: /* @__PURE__ */ w("div", {
214
+ /* @__PURE__ */ S(ye, { children: "Your library of ad creatives — images, videos, carousels and copy. Keep every asset and its real performance (impressions, CTR) in one place so you can quickly see what's resonating and reuse your best creative across campaigns." }),
215
+ /* @__PURE__ */ S(ve, { children: /* @__PURE__ */ C("div", {
208
216
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
209
217
  children: [
210
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
218
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
211
219
  className: "text-xs text-text-secondary",
212
220
  children: "Total Creatives"
213
- }), /* @__PURE__ */ C("p", {
221
+ }), /* @__PURE__ */ S("p", {
214
222
  className: "text-2xl font-semibold text-text-primary",
215
223
  children: s(Y.total)
216
224
  })] }),
217
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
225
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
218
226
  className: "text-xs text-text-secondary",
219
227
  children: "Active"
220
- }), /* @__PURE__ */ C("p", {
228
+ }), /* @__PURE__ */ S("p", {
221
229
  className: "text-2xl font-semibold text-text-primary",
222
230
  children: s(Y.active)
223
231
  })] }),
224
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
232
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
225
233
  className: "text-xs text-text-secondary",
226
234
  children: "Impressions"
227
- }), /* @__PURE__ */ C("p", {
235
+ }), /* @__PURE__ */ S("p", {
228
236
  className: "text-2xl font-semibold text-text-primary",
229
237
  children: s(Y.totalImpressions)
230
238
  })] }),
231
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
239
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
232
240
  className: "text-xs text-text-secondary",
233
241
  children: "Avg CTR"
234
- }), /* @__PURE__ */ C("p", {
242
+ }), /* @__PURE__ */ S("p", {
235
243
  className: "text-2xl font-semibold text-text-primary",
236
244
  children: c(Y.avgCtr)
237
245
  })] })
238
246
  ]
239
247
  }) }),
240
- /* @__PURE__ */ C(ce, {
248
+ /* @__PURE__ */ S(ue, {
241
249
  adCampaigns: X,
242
- onCreativesChanged: Q
250
+ onCreativesChanged: Z
243
251
  }),
244
- /* @__PURE__ */ C(ne, {
252
+ /* @__PURE__ */ S(re, {
245
253
  searchValue: h,
246
- onSearchChange: _,
254
+ onSearchChange: fe,
247
255
  searchPlaceholder: "Search creatives...",
248
- filters: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(T, {
249
- value: y,
250
- onChange: (e) => pe(e.target.value),
256
+ filters: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(w, {
257
+ value: v,
258
+ onChange: (e) => he(e.target.value),
251
259
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
252
260
  children: [
253
- /* @__PURE__ */ C("option", {
261
+ /* @__PURE__ */ S("option", {
254
262
  value: "all",
255
263
  children: "All Types"
256
264
  }),
257
- /* @__PURE__ */ C("option", {
265
+ /* @__PURE__ */ S("option", {
258
266
  value: "image",
259
267
  children: "Image"
260
268
  }),
261
- /* @__PURE__ */ C("option", {
269
+ /* @__PURE__ */ S("option", {
262
270
  value: "video",
263
271
  children: "Video"
264
272
  }),
265
- /* @__PURE__ */ C("option", {
273
+ /* @__PURE__ */ S("option", {
266
274
  value: "carousel",
267
275
  children: "Carousel"
268
276
  }),
269
- /* @__PURE__ */ C("option", {
277
+ /* @__PURE__ */ S("option", {
270
278
  value: "text",
271
279
  children: "Text"
272
280
  }),
273
- /* @__PURE__ */ C("option", {
281
+ /* @__PURE__ */ S("option", {
274
282
  value: "responsive",
275
283
  children: "Responsive"
276
284
  })
277
285
  ]
278
- }), /* @__PURE__ */ w(T, {
279
- value: b,
280
- onChange: (e) => he(e.target.value),
286
+ }), /* @__PURE__ */ C(w, {
287
+ value: y,
288
+ onChange: (e) => _e(e.target.value),
281
289
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
282
290
  children: [
283
- /* @__PURE__ */ C("option", {
291
+ /* @__PURE__ */ S("option", {
284
292
  value: "all",
285
293
  children: "All Status"
286
294
  }),
287
- /* @__PURE__ */ C("option", {
295
+ /* @__PURE__ */ S("option", {
288
296
  value: "active",
289
297
  children: "Active"
290
298
  }),
291
- /* @__PURE__ */ C("option", {
299
+ /* @__PURE__ */ S("option", {
292
300
  value: "paused",
293
301
  children: "Paused"
294
302
  }),
295
- /* @__PURE__ */ C("option", {
303
+ /* @__PURE__ */ S("option", {
296
304
  value: "pending_review",
297
305
  children: "Pending Review"
298
306
  }),
299
- /* @__PURE__ */ C("option", {
307
+ /* @__PURE__ */ S("option", {
300
308
  value: "rejected",
301
309
  children: "Rejected"
302
310
  })
303
311
  ]
304
312
  })] })
305
313
  }),
306
- U && !A && !R && /* @__PURE__ */ C("div", {
314
+ U && !Oe && !R && /* @__PURE__ */ S("div", {
307
315
  role: "alert",
308
316
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
309
317
  children: U
310
318
  }),
311
- /* @__PURE__ */ C(re, {
312
- loading: je,
313
- error: Me,
314
- onRetry: Ne,
319
+ /* @__PURE__ */ S(ie, {
320
+ loading: Ie,
321
+ error: Le,
322
+ onRetry: Re,
315
323
  hasData: !!q,
316
- children: Pe.length === 0 ? /* @__PURE__ */ C(te, {
324
+ children: ze.length === 0 ? /* @__PURE__ */ S(te, {
317
325
  illustration: J === 0 ? "empty-files" : "empty-search",
318
326
  title: J === 0 ? "No creatives yet" : "No creatives match your filters",
319
327
  description: J === 0 ? "Upload images, videos or copy to build your ad creative library." : "Try a different search term, type or status.",
320
- action: J === 0 ? /* @__PURE__ */ w("button", {
321
- onClick: He,
328
+ action: J === 0 ? /* @__PURE__ */ C("button", {
329
+ onClick: Je,
322
330
  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",
323
- children: [/* @__PURE__ */ C(fe, { className: "h-4 w-4" }), "Upload Creative"]
331
+ children: [/* @__PURE__ */ S(me, { className: "h-4 w-4" }), "Upload Creative"]
324
332
  }) : void 0
325
- }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
333
+ }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
326
334
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
327
- children: Pe.map((e) => /* @__PURE__ */ C(Te, {
335
+ children: ze.map((e) => /* @__PURE__ */ S(De, {
328
336
  creative: e,
329
- menuOpen: x === e.id,
330
- onToggleMenu: () => O(x === e.id ? null : e.id),
337
+ menuOpen: b === e.id,
338
+ onToggleMenu: () => O(b === e.id ? null : e.id),
331
339
  onCloseMenu: () => O(null),
332
- onPreview: () => Ee(e),
333
- onEdit: () => Ge(e),
340
+ onPreview: () => je(e),
341
+ onEdit: () => Ze(e),
334
342
  onDelete: () => {
335
343
  O(null), H(e);
336
344
  }
337
345
  }, e.id))
338
- }), /* @__PURE__ */ C(ie, {
346
+ }), /* @__PURE__ */ S(ae, {
339
347
  page: K.page,
340
348
  pageSize: K.pageSize,
341
349
  total: K.total,
@@ -346,61 +354,68 @@ var D = {
346
354
  24,
347
355
  48
348
356
  ],
349
- disabled: je,
357
+ disabled: Ie,
350
358
  hideWhenSinglePage: !0
351
359
  })] })
352
360
  }),
353
- /* @__PURE__ */ C(d, {
354
- open: A,
355
- onClose: $,
361
+ /* @__PURE__ */ S(u, {
362
+ open: Oe,
363
+ onClose: Q,
356
364
  title: "Upload Creative",
357
365
  description: "Add a new creative asset to your library",
358
366
  size: "lg",
359
- footer: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("button", {
360
- onClick: $,
367
+ footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
368
+ onClick: Q,
361
369
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
362
370
  children: "Cancel"
363
- }), /* @__PURE__ */ C("button", {
364
- onClick: We,
365
- disabled: Je,
371
+ }), /* @__PURE__ */ S("button", {
372
+ onClick: Xe,
373
+ disabled: $,
366
374
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
367
- children: Je ? "Uploading..." : "Upload Creative"
375
+ children: $ ? "Uploading..." : "Upload Creative"
368
376
  })] }),
369
- children: /* @__PURE__ */ w("div", {
377
+ children: /* @__PURE__ */ C("div", {
370
378
  className: "space-y-4",
371
379
  children: [
372
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("input", {
380
+ /* @__PURE__ */ S(ee, {
381
+ value: ke,
382
+ onChange: Ae,
383
+ disabled: $
384
+ }),
385
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("input", {
373
386
  ref: G,
374
387
  type: "file",
388
+ disabled: $,
375
389
  accept: "image/*,video/*",
376
390
  className: "sr-only",
377
- onChange: (e) => Ue(e.target.files?.[0] ?? null)
378
- }), /* @__PURE__ */ w("button", {
391
+ onChange: (e) => Ye(e.target.files?.[0] ?? null)
392
+ }), /* @__PURE__ */ C("button", {
379
393
  type: "button",
380
394
  onClick: () => G.current?.click(),
395
+ disabled: $,
381
396
  className: "flex w-full flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken/40 px-4 py-6 text-center transition-colors hover:border-foreground/40",
382
397
  children: [
383
- I ? /* @__PURE__ */ C("img", {
398
+ I ? /* @__PURE__ */ S("img", {
384
399
  src: I,
385
400
  alt: "Selected creative preview",
386
401
  className: "max-h-40 rounded-md object-contain"
387
- }) : /* @__PURE__ */ C(me, { className: "h-8 w-8 text-text-secondary" }),
388
- /* @__PURE__ */ C("span", {
402
+ }) : /* @__PURE__ */ S(ge, { className: "h-8 w-8 text-text-secondary" }),
403
+ /* @__PURE__ */ S("span", {
389
404
  className: "text-sm font-medium text-text-primary",
390
405
  children: P ? P.name : "Click to select a file"
391
406
  }),
392
- /* @__PURE__ */ C("span", {
407
+ /* @__PURE__ */ S("span", {
393
408
  className: "text-xs text-text-secondary",
394
409
  children: "Images or video — stored securely in Files"
395
410
  })
396
411
  ]
397
412
  })] }),
398
- /* @__PURE__ */ w("div", {
413
+ /* @__PURE__ */ C("div", {
399
414
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
400
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
415
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
401
416
  className: "mb-1.5 block text-sm font-medium text-text-primary",
402
417
  children: "Name"
403
- }), /* @__PURE__ */ C("input", {
418
+ }), /* @__PURE__ */ S("input", {
404
419
  type: "text",
405
420
  value: M.name,
406
421
  onChange: (e) => N({
@@ -409,10 +424,10 @@ var D = {
409
424
  }),
410
425
  placeholder: "e.g., Spring Promo Hero",
411
426
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
412
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
427
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
413
428
  className: "mb-1.5 block text-sm font-medium text-text-primary",
414
429
  children: "Type"
415
- }), /* @__PURE__ */ w(T, {
430
+ }), /* @__PURE__ */ C(w, {
416
431
  value: M.type,
417
432
  onChange: (e) => N({
418
433
  ...M,
@@ -420,35 +435,35 @@ var D = {
420
435
  }),
421
436
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
422
437
  children: [
423
- /* @__PURE__ */ C("option", {
438
+ /* @__PURE__ */ S("option", {
424
439
  value: "image",
425
440
  children: "Image"
426
441
  }),
427
- /* @__PURE__ */ C("option", {
442
+ /* @__PURE__ */ S("option", {
428
443
  value: "video",
429
444
  children: "Video"
430
445
  }),
431
- /* @__PURE__ */ C("option", {
446
+ /* @__PURE__ */ S("option", {
432
447
  value: "carousel",
433
448
  children: "Carousel"
434
449
  }),
435
- /* @__PURE__ */ C("option", {
450
+ /* @__PURE__ */ S("option", {
436
451
  value: "text",
437
452
  children: "Text"
438
453
  }),
439
- /* @__PURE__ */ C("option", {
454
+ /* @__PURE__ */ S("option", {
440
455
  value: "responsive",
441
456
  children: "Responsive"
442
457
  })
443
458
  ]
444
459
  })] })]
445
460
  }),
446
- /* @__PURE__ */ w("div", { children: [
447
- /* @__PURE__ */ C("label", {
461
+ /* @__PURE__ */ C("div", { children: [
462
+ /* @__PURE__ */ S("label", {
448
463
  className: "mb-1.5 block text-sm font-medium text-text-primary",
449
464
  children: "Ad Campaign"
450
465
  }),
451
- /* @__PURE__ */ w(T, {
466
+ /* @__PURE__ */ C(w, {
452
467
  value: M.adCampaignId,
453
468
  onChange: (e) => N({
454
469
  ...M,
@@ -456,23 +471,23 @@ var D = {
456
471
  }),
457
472
  disabled: X.length === 0,
458
473
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60",
459
- children: [/* @__PURE__ */ C("option", {
474
+ children: [/* @__PURE__ */ S("option", {
460
475
  value: "",
461
476
  children: X.length === 0 ? "No ad campaigns yet — create one first" : "Select an ad campaign"
462
- }), X.map((e) => /* @__PURE__ */ C("option", {
477
+ }), X.map((e) => /* @__PURE__ */ S("option", {
463
478
  value: e.id,
464
479
  children: e.name
465
480
  }, e.id))]
466
481
  }),
467
- /* @__PURE__ */ C("p", {
482
+ /* @__PURE__ */ S("p", {
468
483
  className: "mt-1 text-xs text-text-secondary",
469
484
  children: "Every creative belongs to an ad campaign so its performance rolls up correctly."
470
485
  })
471
486
  ] }),
472
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
487
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
473
488
  className: "mb-1.5 block text-sm font-medium text-text-primary",
474
489
  children: "Headline"
475
- }), /* @__PURE__ */ C("input", {
490
+ }), /* @__PURE__ */ S("input", {
476
491
  type: "text",
477
492
  value: M.headline,
478
493
  onChange: (e) => N({
@@ -481,12 +496,12 @@ var D = {
481
496
  }),
482
497
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
483
498
  })] }),
484
- /* @__PURE__ */ w("div", {
499
+ /* @__PURE__ */ C("div", {
485
500
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
486
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
501
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
487
502
  className: "mb-1.5 block text-sm font-medium text-text-primary",
488
503
  children: "Call to Action"
489
- }), /* @__PURE__ */ C("input", {
504
+ }), /* @__PURE__ */ S("input", {
490
505
  type: "text",
491
506
  value: M.callToAction,
492
507
  onChange: (e) => N({
@@ -494,10 +509,10 @@ var D = {
494
509
  callToAction: e.target.value
495
510
  }),
496
511
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
497
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
512
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
498
513
  className: "mb-1.5 block text-sm font-medium text-text-primary",
499
514
  children: "Destination URL"
500
- }), /* @__PURE__ */ C("input", {
515
+ }), /* @__PURE__ */ S("input", {
501
516
  type: "url",
502
517
  value: M.destinationUrl,
503
518
  onChange: (e) => N({
@@ -508,37 +523,37 @@ var D = {
508
523
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
509
524
  })] })]
510
525
  }),
511
- U && /* @__PURE__ */ C("p", {
526
+ U && /* @__PURE__ */ S("p", {
512
527
  className: "text-sm text-status-error-text",
513
528
  children: U
514
529
  })
515
530
  ]
516
531
  })
517
532
  }),
518
- /* @__PURE__ */ C(d, {
533
+ /* @__PURE__ */ S(u, {
519
534
  open: R !== null,
520
535
  onClose: () => z(null),
521
536
  title: "Edit Creative",
522
537
  size: "lg",
523
- footer: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("button", {
538
+ footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
524
539
  onClick: () => z(null),
525
540
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
526
541
  children: "Cancel"
527
- }), /* @__PURE__ */ C("button", {
528
- onClick: Ke,
529
- disabled: Z,
542
+ }), /* @__PURE__ */ S("button", {
543
+ onClick: Qe,
544
+ disabled: Ge,
530
545
  className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
531
- children: Z ? "Saving..." : "Save Changes"
546
+ children: Ge ? "Saving..." : "Save Changes"
532
547
  })] }),
533
- children: R && /* @__PURE__ */ w("div", {
548
+ children: R && /* @__PURE__ */ C("div", {
534
549
  className: "space-y-4",
535
550
  children: [
536
- /* @__PURE__ */ w("div", {
551
+ /* @__PURE__ */ C("div", {
537
552
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
538
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
553
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
539
554
  className: "mb-1.5 block text-sm font-medium text-text-primary",
540
555
  children: "Name"
541
- }), /* @__PURE__ */ C("input", {
556
+ }), /* @__PURE__ */ S("input", {
542
557
  type: "text",
543
558
  value: R.form.name,
544
559
  onChange: (e) => z({
@@ -549,10 +564,10 @@ var D = {
549
564
  }
550
565
  }),
551
566
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
552
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
567
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
553
568
  className: "mb-1.5 block text-sm font-medium text-text-primary",
554
569
  children: "Status"
555
- }), /* @__PURE__ */ w(T, {
570
+ }), /* @__PURE__ */ C(w, {
556
571
  value: R.form.status,
557
572
  onChange: (e) => z({
558
573
  ...R,
@@ -563,29 +578,29 @@ var D = {
563
578
  }),
564
579
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
565
580
  children: [
566
- /* @__PURE__ */ C("option", {
581
+ /* @__PURE__ */ S("option", {
567
582
  value: "pending_review",
568
583
  children: "Pending Review"
569
584
  }),
570
- /* @__PURE__ */ C("option", {
585
+ /* @__PURE__ */ S("option", {
571
586
  value: "active",
572
587
  children: "Active"
573
588
  }),
574
- /* @__PURE__ */ C("option", {
589
+ /* @__PURE__ */ S("option", {
575
590
  value: "paused",
576
591
  children: "Paused"
577
592
  }),
578
- /* @__PURE__ */ C("option", {
593
+ /* @__PURE__ */ S("option", {
579
594
  value: "rejected",
580
595
  children: "Rejected"
581
596
  })
582
597
  ]
583
598
  })] })]
584
599
  }),
585
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
600
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
586
601
  className: "mb-1.5 block text-sm font-medium text-text-primary",
587
602
  children: "Headline"
588
- }), /* @__PURE__ */ C("input", {
603
+ }), /* @__PURE__ */ S("input", {
589
604
  type: "text",
590
605
  value: R.form.headline,
591
606
  onChange: (e) => z({
@@ -597,10 +612,10 @@ var D = {
597
612
  }),
598
613
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
599
614
  })] }),
600
- /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
615
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
601
616
  className: "mb-1.5 block text-sm font-medium text-text-primary",
602
617
  children: "Body"
603
- }), /* @__PURE__ */ C("textarea", {
618
+ }), /* @__PURE__ */ S("textarea", {
604
619
  value: R.form.body,
605
620
  onChange: (e) => z({
606
621
  ...R,
@@ -612,12 +627,12 @@ var D = {
612
627
  rows: 3,
613
628
  className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
614
629
  })] }),
615
- /* @__PURE__ */ w("div", {
630
+ /* @__PURE__ */ C("div", {
616
631
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
617
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
632
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
618
633
  className: "mb-1.5 block text-sm font-medium text-text-primary",
619
634
  children: "Call to Action"
620
- }), /* @__PURE__ */ C("input", {
635
+ }), /* @__PURE__ */ S("input", {
621
636
  type: "text",
622
637
  value: R.form.callToAction,
623
638
  onChange: (e) => z({
@@ -628,10 +643,10 @@ var D = {
628
643
  }
629
644
  }),
630
645
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
631
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
646
+ })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
632
647
  className: "mb-1.5 block text-sm font-medium text-text-primary",
633
648
  children: "Destination URL"
634
- }), /* @__PURE__ */ C("input", {
649
+ }), /* @__PURE__ */ S("input", {
635
650
  type: "url",
636
651
  value: R.form.destinationUrl,
637
652
  onChange: (e) => z({
@@ -644,69 +659,69 @@ var D = {
644
659
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
645
660
  })] })]
646
661
  }),
647
- U && /* @__PURE__ */ C("p", {
662
+ U && /* @__PURE__ */ S("p", {
648
663
  className: "text-sm text-status-error-text",
649
664
  children: U
650
665
  })
651
666
  ]
652
667
  })
653
668
  }),
654
- /* @__PURE__ */ C(d, {
669
+ /* @__PURE__ */ S(u, {
655
670
  open: B !== null,
656
- onClose: () => Ee(null),
671
+ onClose: () => je(null),
657
672
  title: B?.name ?? "Creative Preview",
658
673
  description: B?.headline,
659
674
  size: "lg",
660
- children: B && /* @__PURE__ */ w("div", {
675
+ children: B && /* @__PURE__ */ C("div", {
661
676
  className: "space-y-4",
662
677
  children: [
663
- /* @__PURE__ */ C("div", {
678
+ /* @__PURE__ */ S("div", {
664
679
  className: "flex min-h-[12rem] items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken/40 p-4",
665
- children: B.mediaUrl ? B.type === "video" ? /* @__PURE__ */ C("video", {
680
+ children: B.mediaUrl ? B.type === "video" ? /* @__PURE__ */ S("video", {
666
681
  src: B.mediaUrl,
667
682
  controls: !0,
668
683
  className: "max-h-80 rounded-md"
669
- }) : /* @__PURE__ */ C("img", {
684
+ }) : /* @__PURE__ */ S("img", {
670
685
  src: B.mediaUrl,
671
686
  alt: B.name,
672
687
  className: "max-h-80 rounded-md object-contain"
673
- }) : /* @__PURE__ */ w("div", {
688
+ }) : /* @__PURE__ */ C("div", {
674
689
  className: "flex flex-col items-center gap-2 text-text-secondary",
675
690
  children: [(() => {
676
- let e = ye[B.type] ?? g;
677
- return /* @__PURE__ */ C(e, { className: "h-12 w-12" });
678
- })(), /* @__PURE__ */ C("span", {
691
+ let e = Se[B.type] ?? g;
692
+ return /* @__PURE__ */ S(e, { className: "h-12 w-12" });
693
+ })(), /* @__PURE__ */ S("span", {
679
694
  className: "text-xs",
680
695
  children: "No media preview available"
681
696
  })]
682
697
  })
683
698
  }),
684
- /* @__PURE__ */ w("div", {
699
+ /* @__PURE__ */ C("div", {
685
700
  className: "flex flex-wrap items-center gap-2",
686
701
  children: [
687
- /* @__PURE__ */ C("span", {
688
- className: o("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", be[B.type]),
702
+ /* @__PURE__ */ S("span", {
703
+ className: o("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", Ce[B.type]),
689
704
  children: B.type
690
705
  }),
691
- /* @__PURE__ */ C(u, { status: B.status }),
692
- B.callToAction && /* @__PURE__ */ w("span", {
706
+ /* @__PURE__ */ S(ne, { status: B.status }),
707
+ B.callToAction && /* @__PURE__ */ C("span", {
693
708
  className: "text-xs text-text-secondary",
694
709
  children: ["CTA: ", B.callToAction]
695
710
  })
696
711
  ]
697
712
  }),
698
- B.description && /* @__PURE__ */ C("p", {
713
+ B.description && /* @__PURE__ */ S("p", {
699
714
  className: "text-sm text-text-secondary",
700
715
  children: B.description
701
716
  }),
702
- B.landingPageUrl && /* @__PURE__ */ w("a", {
717
+ B.landingPageUrl && /* @__PURE__ */ C("a", {
703
718
  href: B.landingPageUrl,
704
719
  target: "_blank",
705
720
  rel: "noreferrer",
706
721
  className: "inline-flex items-center gap-1.5 text-sm text-action-primary-bg hover:underline",
707
- children: [/* @__PURE__ */ C(ue, { className: "h-3.5 w-3.5" }), B.landingPageUrl]
722
+ children: [/* @__PURE__ */ S(de, { className: "h-3.5 w-3.5" }), B.landingPageUrl]
708
723
  }),
709
- /* @__PURE__ */ C(ae, {
724
+ /* @__PURE__ */ S(se, {
710
725
  sourceType: "AD_CREATIVE",
711
726
  sourceId: B.id,
712
727
  allowCreate: !0,
@@ -715,22 +730,22 @@ var D = {
715
730
  description: "Create a tracked URL for this creative and paste it as the ad destination so clicks are counted and attributed.",
716
731
  emptyMessage: "No tracked links for this creative yet."
717
732
  }, B.id),
718
- B.performance.impressions > 0 && /* @__PURE__ */ w("div", {
733
+ B.performance.impressions > 0 && /* @__PURE__ */ C("div", {
719
734
  className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
720
735
  children: [
721
- /* @__PURE__ */ C(k, {
736
+ /* @__PURE__ */ S(k, {
722
737
  label: "Impressions",
723
738
  value: s(B.performance.impressions)
724
739
  }),
725
- /* @__PURE__ */ C(k, {
740
+ /* @__PURE__ */ S(k, {
726
741
  label: "Clicks",
727
742
  value: s(B.performance.clicks)
728
743
  }),
729
- /* @__PURE__ */ C(k, {
744
+ /* @__PURE__ */ S(k, {
730
745
  label: "CTR",
731
746
  value: c(B.performance.ctr)
732
747
  }),
733
- /* @__PURE__ */ C(k, {
748
+ /* @__PURE__ */ S(k, {
734
749
  label: "Conversions",
735
750
  value: s(B.performance.conversions)
736
751
  })
@@ -739,27 +754,27 @@ var D = {
739
754
  ]
740
755
  })
741
756
  }),
742
- /* @__PURE__ */ C(d, {
757
+ /* @__PURE__ */ S(u, {
743
758
  open: V !== null,
744
759
  onClose: () => H(null),
745
760
  title: "Delete Creative",
746
761
  size: "sm",
747
- footer: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("button", {
762
+ footer: /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
748
763
  onClick: () => H(null),
749
764
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
750
765
  children: "Cancel"
751
- }), /* @__PURE__ */ C("button", {
752
- onClick: qe,
753
- disabled: Ve,
766
+ }), /* @__PURE__ */ S("button", {
767
+ onClick: $e,
768
+ disabled: qe,
754
769
  className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
755
- children: Ve ? "Deleting..." : "Delete"
770
+ children: qe ? "Deleting..." : "Delete"
756
771
  })] }),
757
- children: /* @__PURE__ */ w("p", {
772
+ children: /* @__PURE__ */ C("p", {
758
773
  className: "text-sm text-text-secondary",
759
774
  children: [
760
775
  "Are you sure you want to delete",
761
776
  " ",
762
- /* @__PURE__ */ C("span", {
777
+ /* @__PURE__ */ S("span", {
763
778
  className: "font-semibold text-text-primary",
764
779
  children: V?.name
765
780
  }),
@@ -769,133 +784,133 @@ var D = {
769
784
  })
770
785
  ]
771
786
  });
772
- }, k = ({ label: e, value: t }) => /* @__PURE__ */ w("div", {
787
+ }, k = ({ label: e, value: t }) => /* @__PURE__ */ C("div", {
773
788
  className: "rounded-md bg-bg-sunken/50 py-2 text-center",
774
- children: [/* @__PURE__ */ C("p", {
789
+ children: [/* @__PURE__ */ S("p", {
775
790
  className: "text-sm font-bold text-text-primary",
776
791
  children: t
777
- }), /* @__PURE__ */ C("p", {
792
+ }), /* @__PURE__ */ S("p", {
778
793
  className: "text-[10px] text-text-secondary",
779
794
  children: e
780
795
  })]
781
- }), Te = ({ creative: e, menuOpen: t, onToggleMenu: n, onCloseMenu: r, onPreview: i, onEdit: a, onDelete: l }) => {
782
- x(`ad-creative-${e.id}`, t, r);
783
- let ee = ye[e.type] || g;
784
- return /* @__PURE__ */ w("div", {
796
+ }), De = ({ creative: e, menuOpen: t, onToggleMenu: n, onCloseMenu: r, onPreview: i, onEdit: a, onDelete: ee }) => {
797
+ b(`ad-creative-${e.id}`, t, r);
798
+ let l = Se[e.type] || g;
799
+ return /* @__PURE__ */ C("div", {
785
800
  className: "overflow-hidden rounded-lg border border-border-seam bg-gloss-card shadow-pop transition-colors hover:border-foreground/30",
786
- children: [/* @__PURE__ */ w("button", {
801
+ children: [/* @__PURE__ */ C("button", {
787
802
  type: "button",
788
803
  onClick: i,
789
804
  "aria-label": `Preview ${e.name}`,
790
805
  className: "relative flex h-40 w-full items-center justify-center bg-bg-sunken/50",
791
- children: [e.mediaUrl && e.type === "image" ? /* @__PURE__ */ C("img", {
806
+ children: [e.mediaUrl && e.type === "image" ? /* @__PURE__ */ S("img", {
792
807
  src: e.mediaUrl,
793
808
  alt: e.name,
794
809
  className: "h-full w-full object-cover"
795
- }) : /* @__PURE__ */ C(ee, { className: "h-12 w-12 text-text-secondary/40" }), /* @__PURE__ */ C("div", {
810
+ }) : /* @__PURE__ */ S(l, { className: "h-12 w-12 text-text-secondary/40" }), /* @__PURE__ */ S("div", {
796
811
  className: "absolute end-2 top-2",
797
- children: /* @__PURE__ */ C(u, { status: e.status })
812
+ children: /* @__PURE__ */ S(ne, { status: e.status })
798
813
  })]
799
- }), /* @__PURE__ */ w("div", {
814
+ }), /* @__PURE__ */ C("div", {
800
815
  className: "space-y-3 p-4",
801
816
  children: [
802
- /* @__PURE__ */ w("div", { children: [
803
- /* @__PURE__ */ C("h3", {
817
+ /* @__PURE__ */ C("div", { children: [
818
+ /* @__PURE__ */ S("h3", {
804
819
  className: "truncate text-sm font-medium text-text-primary",
805
820
  children: e.name
806
821
  }),
807
- /* @__PURE__ */ C("p", {
822
+ /* @__PURE__ */ S("p", {
808
823
  className: "mt-0.5 truncate text-xs text-text-secondary",
809
824
  children: e.headline
810
825
  }),
811
- e.description && /* @__PURE__ */ C("p", {
826
+ e.description && /* @__PURE__ */ S("p", {
812
827
  className: "mt-1 line-clamp-2 text-xs text-text-secondary",
813
828
  children: e.description
814
829
  })
815
830
  ] }),
816
- /* @__PURE__ */ w("div", {
831
+ /* @__PURE__ */ C("div", {
817
832
  className: "flex flex-wrap items-center gap-2",
818
- children: [/* @__PURE__ */ C("span", {
819
- className: o("rounded-full px-2 py-0.5 text-xs font-medium capitalize", be[e.type]),
833
+ children: [/* @__PURE__ */ S("span", {
834
+ className: o("rounded-full px-2 py-0.5 text-xs font-medium capitalize", Ce[e.type]),
820
835
  children: e.type
821
- }), e.callToAction && /* @__PURE__ */ C("span", {
836
+ }), e.callToAction && /* @__PURE__ */ S("span", {
822
837
  className: "rounded-md border border-border-subtle px-2 py-0.5 text-xs font-medium text-text-primary",
823
838
  children: e.callToAction
824
839
  })]
825
840
  }),
826
- e.performance.impressions > 0 && /* @__PURE__ */ w("div", {
841
+ e.performance.impressions > 0 && /* @__PURE__ */ C("div", {
827
842
  className: "grid grid-cols-2 gap-2 text-center",
828
843
  children: [
829
- /* @__PURE__ */ w("div", {
844
+ /* @__PURE__ */ C("div", {
830
845
  className: "rounded-md bg-bg-sunken/50 py-1.5",
831
- children: [/* @__PURE__ */ C("p", {
846
+ children: [/* @__PURE__ */ S("p", {
832
847
  className: "text-xs font-bold text-text-primary",
833
848
  children: s(e.performance.impressions)
834
- }), /* @__PURE__ */ C("p", {
849
+ }), /* @__PURE__ */ S("p", {
835
850
  className: "text-[10px] text-text-secondary",
836
851
  children: "Impressions"
837
852
  })]
838
853
  }),
839
- /* @__PURE__ */ w("div", {
854
+ /* @__PURE__ */ C("div", {
840
855
  className: "rounded-md bg-bg-sunken/50 py-1.5",
841
- children: [/* @__PURE__ */ C("p", {
856
+ children: [/* @__PURE__ */ S("p", {
842
857
  className: "text-xs font-bold text-text-primary",
843
858
  children: s(e.performance.clicks)
844
- }), /* @__PURE__ */ C("p", {
859
+ }), /* @__PURE__ */ S("p", {
845
860
  className: "text-[10px] text-text-secondary",
846
861
  children: "Clicks"
847
862
  })]
848
863
  }),
849
- /* @__PURE__ */ w("div", {
864
+ /* @__PURE__ */ C("div", {
850
865
  className: "rounded-md bg-bg-sunken/50 py-1.5",
851
- children: [/* @__PURE__ */ C("p", {
866
+ children: [/* @__PURE__ */ S("p", {
852
867
  className: "text-xs font-bold text-text-primary",
853
868
  children: c(e.performance.ctr)
854
- }), /* @__PURE__ */ C("p", {
869
+ }), /* @__PURE__ */ S("p", {
855
870
  className: "text-[10px] text-text-secondary",
856
871
  children: "CTR"
857
872
  })]
858
873
  }),
859
- /* @__PURE__ */ w("div", {
874
+ /* @__PURE__ */ C("div", {
860
875
  className: "rounded-md bg-bg-sunken/50 py-1.5",
861
- children: [/* @__PURE__ */ C("p", {
876
+ children: [/* @__PURE__ */ S("p", {
862
877
  className: "text-xs font-bold text-text-primary",
863
878
  children: s(e.performance.conversions)
864
- }), /* @__PURE__ */ C("p", {
879
+ }), /* @__PURE__ */ S("p", {
865
880
  className: "text-[10px] text-text-secondary",
866
881
  children: "Conversions"
867
882
  })]
868
883
  })
869
884
  ]
870
885
  }),
871
- /* @__PURE__ */ w("div", {
886
+ /* @__PURE__ */ C("div", {
872
887
  className: "flex items-center justify-between border-t border-border-subtle pt-2",
873
- children: [/* @__PURE__ */ w("button", {
888
+ children: [/* @__PURE__ */ C("button", {
874
889
  onClick: i,
875
890
  className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
876
- children: [/* @__PURE__ */ C(h, { className: "h-3 w-3" }), "Preview"]
877
- }), /* @__PURE__ */ w("div", {
891
+ children: [/* @__PURE__ */ S(h, { className: "h-3 w-3" }), "Preview"]
892
+ }), /* @__PURE__ */ C("div", {
878
893
  className: "relative",
879
- children: [/* @__PURE__ */ C("button", {
894
+ children: [/* @__PURE__ */ S("button", {
880
895
  onClick: n,
881
896
  "aria-haspopup": "menu",
882
897
  "aria-expanded": t,
883
898
  "aria-label": "Creative actions",
884
899
  className: "text-text-secondary hover:text-text-primary",
885
- children: /* @__PURE__ */ C(v, { className: "h-4 w-4" })
886
- }), t && /* @__PURE__ */ w("div", {
900
+ children: /* @__PURE__ */ S(_, { className: "h-4 w-4" })
901
+ }), t && /* @__PURE__ */ C("div", {
887
902
  role: "menu",
888
903
  className: "absolute bottom-6 end-0 z-20 w-36 rounded-md border border-border-seam bg-gloss-card py-1 shadow-lg",
889
- children: [/* @__PURE__ */ w("button", {
904
+ children: [/* @__PURE__ */ C("button", {
890
905
  role: "menuitem",
891
906
  onClick: a,
892
907
  className: "flex w-full items-center gap-2 px-4 py-2 text-start text-sm text-text-primary hover:bg-bg-sunken",
893
- children: [/* @__PURE__ */ C(de, { className: "h-3.5 w-3.5" }), "Edit"]
894
- }), /* @__PURE__ */ w("button", {
908
+ children: [/* @__PURE__ */ S(pe, { className: "h-3.5 w-3.5" }), "Edit"]
909
+ }), /* @__PURE__ */ C("button", {
895
910
  role: "menuitem",
896
- onClick: l,
911
+ onClick: ee,
897
912
  className: "flex w-full items-center gap-2 px-4 py-2 text-start text-sm text-status-error-text hover:bg-bg-sunken",
898
- children: [/* @__PURE__ */ C(pe, { className: "h-3.5 w-3.5" }), "Delete"]
913
+ children: [/* @__PURE__ */ S(he, { className: "h-3.5 w-3.5" }), "Delete"]
899
914
  })]
900
915
  })]
901
916
  })]