@burdenoff/microfe-headshotmarketing 2026.1201.1 → 2026.1202.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 (161) hide show
  1. package/dist/headshotmarketing/components/ActionMenu.js +1 -1
  2. package/dist/headshotmarketing/components/ActionMenu.js.map +1 -1
  3. package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
  4. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
  5. package/dist/headshotmarketing/components/DataTable.js +33 -33
  6. package/dist/headshotmarketing/components/DataTable.js.map +1 -1
  7. package/dist/headshotmarketing/components/EmptyState.d.ts +15 -0
  8. package/dist/headshotmarketing/components/EmptyState.js +35 -15
  9. package/dist/headshotmarketing/components/EmptyState.js.map +1 -1
  10. package/dist/headshotmarketing/components/FilterBar.js +2 -2
  11. package/dist/headshotmarketing/components/FilterBar.js.map +1 -1
  12. package/dist/headshotmarketing/components/InfluencerModals.js +96 -95
  13. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
  14. package/dist/headshotmarketing/components/Pagination.js +38 -37
  15. package/dist/headshotmarketing/components/Pagination.js.map +1 -1
  16. package/dist/headshotmarketing/components/TagChipsInput.js +1 -1
  17. package/dist/headshotmarketing/components/TagChipsInput.js.map +1 -1
  18. package/dist/headshotmarketing/components/Toast.js +1 -1
  19. package/dist/headshotmarketing/components/Toast.js.map +1 -1
  20. package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
  21. package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
  22. package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
  23. package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
  24. package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
  25. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
  26. package/dist/headshotmarketing/pages/HomeMonthlyGoals.js.map +1 -1
  27. package/dist/headshotmarketing/pages/HomePage.js +10 -10
  28. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  29. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +203 -203
  30. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  31. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +148 -148
  32. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  33. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js +74 -73
  34. package/dist/headshotmarketing/pages/ads/AdCreativeTestsSection.js.map +1 -1
  35. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +427 -412
  36. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  37. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js +111 -110
  38. package/dist/headshotmarketing/pages/ads/AdPlatformConnectionsSection.js.map +1 -1
  39. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js +1 -1
  40. package/dist/headshotmarketing/pages/ads/AdPlatformSyncPanel.js.map +1 -1
  41. package/dist/headshotmarketing/pages/ads/AdsPage.js +6 -6
  42. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +49 -49
  44. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  45. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +112 -112
  46. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js +57 -57
  48. package/dist/headshotmarketing/pages/ads/CreateAudiencePage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js +175 -174
  50. package/dist/headshotmarketing/pages/ai/AiOperationsPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +1 -1
  52. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  53. package/dist/headshotmarketing/pages/analytics/AttributionPage.js +129 -129
  54. package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
  55. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +9 -9
  56. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  57. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js +95 -94
  58. package/dist/headshotmarketing/pages/analytics/ReportScheduleDialog.js.map +1 -1
  59. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +4 -4
  60. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  61. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +42 -41
  62. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -1
  63. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +132 -131
  64. package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -1
  65. package/dist/headshotmarketing/pages/automation/AutomationPage.js +8 -8
  66. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  67. package/dist/headshotmarketing/pages/automation/TriggersPage.js +48 -48
  68. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +4 -3
  70. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  71. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js +143 -142
  72. package/dist/headshotmarketing/pages/automation/WorkflowNodeConfigPanel.js.map +1 -1
  73. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js +79 -78
  74. package/dist/headshotmarketing/pages/automation/WorkflowRunsPanel.js.map +1 -1
  75. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +92 -92
  76. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  77. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +143 -143
  78. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  79. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js +3 -3
  80. package/dist/headshotmarketing/pages/builder/SectionCanvasBlock.js.map +1 -1
  81. package/dist/headshotmarketing/pages/builder/SectionInspector.js +24 -23
  82. package/dist/headshotmarketing/pages/builder/SectionInspector.js.map +1 -1
  83. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +198 -193
  84. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  85. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +41 -41
  86. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  87. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +234 -229
  88. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  89. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +199 -187
  90. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  91. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js +46 -46
  92. package/dist/headshotmarketing/pages/campaigns/CreateTemplateModal.js.map +1 -1
  93. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +29 -29
  94. package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -1
  95. package/dist/headshotmarketing/pages/content/AIToolsPage.js +3 -3
  96. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  97. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +230 -220
  98. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  99. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +431 -420
  100. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  101. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +7 -7
  102. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  103. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +2 -2
  104. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  105. package/dist/headshotmarketing/pages/content/ContentPage.js +88 -88
  106. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  107. package/dist/headshotmarketing/pages/crm/ContactsPage.js +111 -111
  108. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  109. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +59 -59
  110. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  111. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +86 -86
  112. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  113. package/dist/headshotmarketing/pages/crm/CrmActions.js +93 -92
  114. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -1
  115. package/dist/headshotmarketing/pages/crm/CrmPage.js +4 -4
  116. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  117. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +63 -62
  118. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  119. package/dist/headshotmarketing/pages/crm/LeadsPage.js +68 -68
  120. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  121. package/dist/headshotmarketing/pages/crm/PipelinePage.js +2 -2
  122. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  123. package/dist/headshotmarketing/pages/events/CreateEventPage.js +165 -165
  124. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  125. package/dist/headshotmarketing/pages/events/EventDetailsPage.js +255 -250
  126. package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
  127. package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
  128. package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
  129. package/dist/headshotmarketing/pages/events/EventPagePreview.js +2 -2
  130. package/dist/headshotmarketing/pages/events/EventPagePreview.js.map +1 -1
  131. package/dist/headshotmarketing/pages/events/EventsPage.js +70 -70
  132. package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
  133. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +7 -7
  134. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
  135. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +98 -98
  136. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  137. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +1 -1
  138. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  139. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +145 -140
  140. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  141. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js +1 -1
  142. package/dist/headshotmarketing/pages/seo/SeoScorePanel.js.map +1 -1
  143. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +286 -286
  144. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  145. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +171 -166
  146. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  147. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +1 -1
  148. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
  149. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js +1 -1
  150. package/dist/headshotmarketing/pages/social-media/CreateAccountPage.js.map +1 -1
  151. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +3 -3
  152. package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
  153. package/dist/headshotmarketing/pages/social-media/PostsPage.js +257 -252
  154. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  155. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js +2 -2
  156. package/dist/headshotmarketing/pages/social-media/SocialComposerPreview.js.map +1 -1
  157. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +4 -4
  158. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  159. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +115 -115
  160. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  161. package/package.json +6 -4
@@ -1,28 +1,28 @@
1
1
  import { useDeleteHeadshotmarketingSocialPostMutation as e, useHeadshotmarketingSocialPostsListQuery as t, usePublishHeadshotmarketingSocialPostMutation as n, useRetryHeadshotmarketingSocialPostMutation as ee, useUpdateHeadshotmarketingSocialPostMutation as te } from "../../../generated/wspace-operations.js";
2
2
  import { HeadshotmarketingSocialPostStatus as r } from "../../../generated/wspace-types.js";
3
- import { cn as i, formatDate as ne, formatNumber as a, formatPercentage as re } from "../../utils/helpers.js";
4
- import { toSocialPostModel as o } from "../../utils/socialMapper.js";
5
- import { PageLayout as ie } from "../../components/PageLayout.js";
6
- import { StatCard as s } from "../../components/StatCard.js";
7
- import { StatusBadge as c } from "../../components/StatusBadge.js";
8
- import { EmptyState as ae } from "../../components/EmptyState.js";
9
- import { FilterBar as oe } from "../../components/FilterBar.js";
10
- import { Modal as l } from "../../components/Modal.js";
11
- import { QueryStateBoundary as se } from "../../components/QueryStateBoundary.js";
12
- import { Pagination as ce } from "../../components/Pagination.js";
13
- import { ActionMenu as u } from "../../components/ActionMenu.js";
14
- import { TrackedLinksPanel as le } from "../../components/TrackedLinksPanel.js";
3
+ import { cn as i, formatDate as a, formatNumber as o, formatPercentage as ne } from "../../utils/helpers.js";
4
+ import { toSocialPostModel as s } from "../../utils/socialMapper.js";
5
+ import { PageLayout as re } from "../../components/PageLayout.js";
6
+ import { StatCard as c } from "../../components/StatCard.js";
7
+ import { EmptyState as ie } from "../../components/EmptyState.js";
8
+ import { StatusBadge as l } from "../../components/StatusBadge.js";
9
+ import { FilterBar as ae } from "../../components/FilterBar.js";
10
+ import { Modal as u } from "../../components/Modal.js";
11
+ import { QueryStateBoundary as oe } from "../../components/QueryStateBoundary.js";
12
+ import { Pagination as se } from "../../components/Pagination.js";
13
+ import { ActionMenu as d } from "../../components/ActionMenu.js";
14
+ import { TrackedLinksPanel as ce } from "../../components/TrackedLinksPanel.js";
15
15
  import "../../components/index.js";
16
- import { useHeadshotmarketingBootstrap as ue } from "../../hooks/useHeadshotmarketingBootstrap.js";
17
- import { usePagination as de } from "../../hooks/usePagination.js";
18
- import { useHeadshotMarketing as fe } from "../../context/HeadshotMarketingContext.js";
16
+ import { useHeadshotmarketingBootstrap as le } from "../../hooks/useHeadshotmarketingBootstrap.js";
17
+ import { usePagination as ue } from "../../hooks/usePagination.js";
18
+ import { useHeadshotMarketing as de } from "../../context/HeadshotMarketingContext.js";
19
19
  import "../../hooks/index.js";
20
- import { useEffect as pe, useMemo as d, useState as f } from "react";
21
- import { AlertTriangle as me, ExternalLink as p, Eye as he, Grid3X3 as ge, Heart as _e, List as ve, MessageCircle as m, Pencil as h, Plus as ye, RotateCcw as be, Send as g, Share2 as xe, Trash2 as _ } from "lucide-react";
22
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
23
- import { EmphasisPanel as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
20
+ import { useEffect as f, useMemo as p, useState as m } from "react";
21
+ import { AlertTriangle as fe, ExternalLink as h, Eye as pe, Grid3X3 as me, Heart as he, List as ge, MessageCircle as _e, Pencil as ve, Plus as ye, RotateCcw as g, Send as _, Share2 as be, Trash2 as v } from "lucide-react";
22
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
23
+ import { EmphasisPanel as xe, PagePurpose as Se, ThemedSelect as S, useConfirm as Ce } from "@burdenoff/fe-libs/ui";
24
24
  // src/headshotmarketing/pages/social-media/PostsPage.tsx
25
- var x = {
25
+ var C = {
26
26
  instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
27
27
  facebook: "bg-status-info-bg text-status-info-text",
28
28
  twitter: "bg-status-info-bg text-status-info-text",
@@ -35,114 +35,119 @@ var x = {
35
35
  draft: r.Draft,
36
36
  failed: r.Failed
37
37
  };
38
- function S(e) {
38
+ function w(e) {
39
39
  return !e || e.status !== r.Failed ? null : `Publishing failed: ${e.errorMessage ?? "the platform rejected the post."}`;
40
40
  }
41
41
  function Te(e) {
42
42
  return Array.from(new Set(e.match(/#\w+/g) ?? []));
43
43
  }
44
- var C = () => {
45
- let { navigate: r, basePath: C } = fe(), { data: w, refetch: Ee } = ue(), [T, De] = f(""), [E, Oe] = f("all"), [D, ke] = f("all"), [O, Ae] = f("newest"), [k, A] = f("grid"), [j, M] = f(null), [je, N] = f(!1), [Me, P] = f(!1), [F, Ne] = f(null), [I, L] = f(""), [Pe, R] = f(null), [z, B] = f(null), V = de({ initialPageSize: 12 }), { limit: Fe, offset: Ie, setPage: H, setTotal: U } = V, { data: W, loading: G, error: Le, refetch: K } = t({
44
+ var T = () => {
45
+ let r = Ce(), { navigate: T, basePath: E } = de(), { data: D, refetch: Ee } = le(), [O, De] = m(""), [k, Oe] = m("all"), [A, ke] = m("all"), [j, Ae] = m("newest"), [M, N] = m("grid"), [P, F] = m(null), [je, I] = m(!1), [Me, L] = m(!1), [R, Ne] = m(null), [Pe, z] = m(""), [B, V] = m(null), [H, U] = m(null), W = ue({ initialPageSize: 12 }), { limit: Fe, offset: Ie, setPage: G, setTotal: Le } = W, { data: K, loading: Re, error: ze, refetch: Be } = t({
46
46
  variables: {
47
47
  limit: Fe,
48
48
  offset: Ie,
49
- search: T.trim() || void 0,
50
- status: E === "all" ? void 0 : we[E]
49
+ search: O.trim() || void 0,
50
+ status: k === "all" ? void 0 : we[k]
51
51
  },
52
52
  notifyOnNetworkStatusChange: !0
53
- }), [Re] = e(), [ze] = n(), [Be] = ee(), [Ve, { loading: He }] = te();
54
- pe(() => {
55
- H(1);
53
+ }), [Ve] = e(), [He] = n(), [Ue] = ee(), [We, { loading: Ge }] = te();
54
+ f(() => {
55
+ G(1);
56
56
  }, [
57
- T,
58
- E,
59
- H
60
- ]), pe(() => {
61
- U(W?.headshotmarketingSocialPosts.total ?? 0);
62
- }, [W?.headshotmarketingSocialPosts.total, U]);
63
- let q = d(() => Object.fromEntries((w?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [w?.headshotmarketingSocialAccounts.items]), J = d(() => Object.fromEntries((w?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.platform === "FACEBOOK" ? "facebook" : e.platform === "INSTAGRAM" ? "instagram" : e.platform === "TWITTER" ? "twitter" : e.platform === "LINKEDIN" ? "linkedin" : e.platform === "TIKTOK" ? "tiktok" : e.platform === "YOUTUBE" ? "youtube" : "instagram"])), [w?.headshotmarketingSocialAccounts.items]), Y = d(() => (w?.headshotmarketingSocialPosts.items ?? []).map((e) => o(e, q, J)), [
64
- w?.headshotmarketingSocialPosts.items,
57
+ O,
58
+ k,
59
+ G
60
+ ]), f(() => {
61
+ Le(K?.headshotmarketingSocialPosts.total ?? 0);
62
+ }, [K?.headshotmarketingSocialPosts.total, Le]);
63
+ let q = p(() => Object.fromEntries((D?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [D?.headshotmarketingSocialAccounts.items]), J = p(() => Object.fromEntries((D?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.platform === "FACEBOOK" ? "facebook" : e.platform === "INSTAGRAM" ? "instagram" : e.platform === "TWITTER" ? "twitter" : e.platform === "LINKEDIN" ? "linkedin" : e.platform === "TIKTOK" ? "tiktok" : e.platform === "YOUTUBE" ? "youtube" : "instagram"])), [D?.headshotmarketingSocialAccounts.items]), Y = p(() => (D?.headshotmarketingSocialPosts.items ?? []).map((e) => s(e, q, J)), [
64
+ D?.headshotmarketingSocialPosts.items,
65
65
  q,
66
66
  J
67
- ]), X = d(() => {
68
- let e = (W?.headshotmarketingSocialPosts.items ?? []).map((e) => o(e, q, J));
69
- return D !== "all" && (e = e.filter((e) => e.platform === D)), [...e].sort((e, t) => O === "newest" ? new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime() : O === "oldest" ? new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime() : O === "engagement" ? t.metrics.engagementRate - e.metrics.engagementRate : 0);
67
+ ]), X = p(() => {
68
+ let e = (K?.headshotmarketingSocialPosts.items ?? []).map((e) => s(e, q, J));
69
+ return A !== "all" && (e = e.filter((e) => e.platform === A)), [...e].sort((e, t) => j === "newest" ? new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime() : j === "oldest" ? new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime() : j === "engagement" ? t.metrics.engagementRate - e.metrics.engagementRate : 0);
70
70
  }, [
71
- W?.headshotmarketingSocialPosts.items,
71
+ K?.headshotmarketingSocialPosts.items,
72
72
  q,
73
73
  J,
74
- D,
75
- O
76
- ]), Ue = Y.length, We = Y.filter((e) => e.status === "published").length, Ge = Y.filter((e) => e.status === "scheduled").length, Ke = Y.reduce((e, t) => e + t.metrics.likes + t.metrics.comments + t.metrics.shares, 0), Z = Y.filter((e) => e.status === "published"), qe = Z.length > 0 ? Z.reduce((e, t) => e + t.metrics.engagementRate, 0) / Z.length : 0, Q = async () => {
77
- await Promise.all([K(), Ee()]);
78
- }, Je = async (e) => {
79
- if (window.confirm("Delete this post? This cannot be undone.")) {
80
- B(null);
74
+ A,
75
+ j
76
+ ]), Ke = Y.length, qe = Y.filter((e) => e.status === "published").length, Je = Y.filter((e) => e.status === "scheduled").length, Ye = Y.reduce((e, t) => e + t.metrics.likes + t.metrics.comments + t.metrics.shares, 0), Z = Y.filter((e) => e.status === "published"), Xe = Z.length > 0 ? Z.reduce((e, t) => e + t.metrics.engagementRate, 0) / Z.length : 0, Q = async () => {
77
+ await Promise.all([Be(), Ee()]);
78
+ }, Ze = async (e) => {
79
+ if (await r({
80
+ title: "Delete this post?",
81
+ description: "This cannot be undone.",
82
+ tone: "danger",
83
+ confirmLabel: "Delete post"
84
+ })) {
85
+ U(null);
81
86
  try {
82
- await Re({ variables: { id: e.id } }), j?.id === e.id && N(!1), await Q();
87
+ await Ve({ variables: { id: e.id } }), P?.id === e.id && I(!1), await Q();
83
88
  } catch (e) {
84
- B(e instanceof Error ? e.message : "Failed to delete post.");
89
+ U(e instanceof Error ? e.message : "Failed to delete post.");
85
90
  }
86
91
  }
87
- }, Ye = async (e) => {
88
- B(null);
92
+ }, Qe = async (e) => {
93
+ U(null);
89
94
  try {
90
- let { data: t } = await ze({ variables: { id: e.id } }), n = S(t?.publishHeadshotmarketingSocialPost);
91
- n && B(n), j?.id === e.id && N(!1), await Q();
95
+ let { data: t } = await He({ variables: { id: e.id } }), n = w(t?.publishHeadshotmarketingSocialPost);
96
+ n && U(n), P?.id === e.id && I(!1), await Q();
92
97
  } catch (e) {
93
- B(e instanceof Error ? e.message : "Failed to publish post.");
98
+ U(e instanceof Error ? e.message : "Failed to publish post.");
94
99
  }
95
- }, Xe = async (e) => {
96
- B(null);
100
+ }, $e = async (e) => {
101
+ U(null);
97
102
  try {
98
- let { data: t } = await Be({ variables: { id: e.id } }), n = S(t?.retryHeadshotmarketingSocialPost);
99
- n && B(n), j?.id === e.id && N(!1), await Q();
103
+ let { data: t } = await Ue({ variables: { id: e.id } }), n = w(t?.retryHeadshotmarketingSocialPost);
104
+ n && U(n), P?.id === e.id && I(!1), await Q();
100
105
  } catch (e) {
101
- B(e instanceof Error ? e.message : "Failed to retry post.");
106
+ U(e instanceof Error ? e.message : "Failed to retry post.");
102
107
  }
103
- }, Ze = (e) => {
104
- Ne(e), L(e.content), R(null), N(!1), P(!0);
105
- }, Qe = async () => {
106
- if (!F) return;
107
- let e = I.trim();
108
- if (!e) R("Post content is required.");
108
+ }, et = (e) => {
109
+ Ne(e), z(e.content), V(null), I(!1), L(!0);
110
+ }, tt = async () => {
111
+ if (!R) return;
112
+ let e = Pe.trim();
113
+ if (!e) V("Post content is required.");
109
114
  else {
110
- R(null);
115
+ V(null);
111
116
  try {
112
- await Ve({ variables: {
113
- id: F.id,
117
+ await We({ variables: {
118
+ id: R.id,
114
119
  input: {
115
120
  content: e,
116
121
  tags: Te(e)
117
122
  }
118
- } }), P(!1), await Q();
123
+ } }), L(!1), await Q();
119
124
  } catch (e) {
120
- R(e instanceof Error ? e.message : "Failed to save post.");
125
+ V(e instanceof Error ? e.message : "Failed to save post.");
121
126
  }
122
127
  }
123
- }, $e = (e) => [
128
+ }, nt = (e) => [
124
129
  {
125
130
  key: "edit",
126
131
  label: "Edit",
127
- icon: /* @__PURE__ */ y(h, { className: "h-4 w-4" }),
128
- onClick: () => Ze(e)
132
+ icon: /* @__PURE__ */ b(ve, { className: "h-4 w-4" }),
133
+ onClick: () => et(e)
129
134
  },
130
135
  ...e.status === "draft" || e.status === "scheduled" ? [{
131
136
  key: "publish",
132
137
  label: "Publish now",
133
- icon: /* @__PURE__ */ y(g, { className: "h-4 w-4" }),
134
- onClick: () => void Ye(e)
138
+ icon: /* @__PURE__ */ b(_, { className: "h-4 w-4" }),
139
+ onClick: () => void Qe(e)
135
140
  }] : [],
136
141
  ...e.status === "failed" ? [{
137
142
  key: "retry",
138
143
  label: "Retry publish",
139
- icon: /* @__PURE__ */ y(be, { className: "h-4 w-4" }),
140
- onClick: () => void Xe(e)
144
+ icon: /* @__PURE__ */ b(g, { className: "h-4 w-4" }),
145
+ onClick: () => void $e(e)
141
146
  }] : [],
142
147
  ...e.postUrl ? [{
143
148
  key: "view",
144
149
  label: "View on platform",
145
- icon: /* @__PURE__ */ y(p, { className: "h-4 w-4" }),
150
+ icon: /* @__PURE__ */ b(h, { className: "h-4 w-4" }),
146
151
  onClick: () => {
147
152
  window.open(e.postUrl ?? "", "_blank", "noopener,noreferrer");
148
153
  }
@@ -150,394 +155,394 @@ var C = () => {
150
155
  {
151
156
  key: "delete",
152
157
  label: "Delete",
153
- icon: /* @__PURE__ */ y(_, { className: "h-4 w-4" }),
158
+ icon: /* @__PURE__ */ b(v, { className: "h-4 w-4" }),
154
159
  danger: !0,
155
- onClick: () => void Je(e)
160
+ onClick: () => void Ze(e)
156
161
  }
157
- ], $ = Ue > 0;
158
- return /* @__PURE__ */ b(ie, {
162
+ ], $ = Ke > 0;
163
+ return /* @__PURE__ */ x(re, {
159
164
  title: "Posts",
160
165
  description: "Manage all your social media posts",
161
- actions: /* @__PURE__ */ b("button", {
162
- onClick: () => r(C + "/social/compose"),
166
+ actions: /* @__PURE__ */ x("button", {
167
+ onClick: () => T(E + "/social/compose"),
163
168
  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",
164
- children: [/* @__PURE__ */ y(ye, { className: "h-4 w-4" }), "Create Post"]
169
+ children: [/* @__PURE__ */ b(ye, { className: "h-4 w-4" }), "Create Post"]
165
170
  }),
166
171
  children: [
167
- /* @__PURE__ */ y(Ce, { children: "Every social post you've drafted, scheduled or published, in one feed. Filter by status or platform, switch between grid and list views, and open any post to see how it performed — so you can learn what resonates and post more of it." }),
168
- /* @__PURE__ */ y(Se, { children: /* @__PURE__ */ b("div", {
172
+ /* @__PURE__ */ b(Se, { children: "Every social post you've drafted, scheduled or published, in one feed. Filter by status or platform, switch between grid and list views, and open any post to see how it performed — so you can learn what resonates and post more of it." }),
173
+ /* @__PURE__ */ b(xe, { children: /* @__PURE__ */ x("div", {
169
174
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
170
175
  children: [
171
- /* @__PURE__ */ y(s, {
176
+ /* @__PURE__ */ b(c, {
172
177
  title: "Total Posts",
173
- value: Ue,
174
- icon: /* @__PURE__ */ y(m, { className: "h-4 w-4" })
178
+ value: Ke,
179
+ icon: /* @__PURE__ */ b(_e, { className: "h-4 w-4" })
175
180
  }),
176
- /* @__PURE__ */ y(s, {
181
+ /* @__PURE__ */ b(c, {
177
182
  title: "Published",
178
- value: We,
179
- icon: /* @__PURE__ */ y(he, { className: "h-4 w-4" })
183
+ value: qe,
184
+ icon: /* @__PURE__ */ b(pe, { className: "h-4 w-4" })
180
185
  }),
181
- /* @__PURE__ */ y(s, {
186
+ /* @__PURE__ */ b(c, {
182
187
  title: "Scheduled",
183
- value: Ge,
188
+ value: Je,
184
189
  change: 12
185
190
  }),
186
- /* @__PURE__ */ y(s, {
191
+ /* @__PURE__ */ b(c, {
187
192
  title: "Total Engagement",
188
- value: a(Ke),
193
+ value: o(Ye),
189
194
  change: 8.4
190
195
  }),
191
- /* @__PURE__ */ y(s, {
196
+ /* @__PURE__ */ b(c, {
192
197
  title: "Avg Engagement",
193
- value: re(qe),
198
+ value: ne(Xe),
194
199
  change: 1.2
195
200
  })
196
201
  ]
197
202
  }) }),
198
- z && /* @__PURE__ */ y("div", {
203
+ H && /* @__PURE__ */ b("div", {
199
204
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
200
- children: z
205
+ children: H
201
206
  }),
202
- /* @__PURE__ */ y(oe, {
203
- searchValue: T,
207
+ /* @__PURE__ */ b(ae, {
208
+ searchValue: O,
204
209
  onSearchChange: De,
205
210
  searchPlaceholder: "Search posts...",
206
- filters: /* @__PURE__ */ b(v, { children: [
207
- /* @__PURE__ */ b("select", {
208
- value: E,
211
+ filters: /* @__PURE__ */ x(y, { children: [
212
+ /* @__PURE__ */ x(S, {
213
+ value: k,
209
214
  onChange: (e) => Oe(e.target.value),
210
215
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
211
216
  children: [
212
- /* @__PURE__ */ y("option", {
217
+ /* @__PURE__ */ b("option", {
213
218
  value: "all",
214
219
  children: "All Status"
215
220
  }),
216
- /* @__PURE__ */ y("option", {
221
+ /* @__PURE__ */ b("option", {
217
222
  value: "published",
218
223
  children: "Published"
219
224
  }),
220
- /* @__PURE__ */ y("option", {
225
+ /* @__PURE__ */ b("option", {
221
226
  value: "scheduled",
222
227
  children: "Scheduled"
223
228
  }),
224
- /* @__PURE__ */ y("option", {
229
+ /* @__PURE__ */ b("option", {
225
230
  value: "draft",
226
231
  children: "Draft"
227
232
  }),
228
- /* @__PURE__ */ y("option", {
233
+ /* @__PURE__ */ b("option", {
229
234
  value: "failed",
230
235
  children: "Failed"
231
236
  })
232
237
  ]
233
238
  }),
234
- /* @__PURE__ */ b("select", {
235
- value: D,
239
+ /* @__PURE__ */ x(S, {
240
+ value: A,
236
241
  onChange: (e) => ke(e.target.value),
237
242
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
238
243
  children: [
239
- /* @__PURE__ */ y("option", {
244
+ /* @__PURE__ */ b("option", {
240
245
  value: "all",
241
246
  children: "All Platforms"
242
247
  }),
243
- /* @__PURE__ */ y("option", {
248
+ /* @__PURE__ */ b("option", {
244
249
  value: "instagram",
245
250
  children: "Instagram"
246
251
  }),
247
- /* @__PURE__ */ y("option", {
252
+ /* @__PURE__ */ b("option", {
248
253
  value: "facebook",
249
254
  children: "Facebook"
250
255
  }),
251
- /* @__PURE__ */ y("option", {
256
+ /* @__PURE__ */ b("option", {
252
257
  value: "twitter",
253
258
  children: "Twitter"
254
259
  }),
255
- /* @__PURE__ */ y("option", {
260
+ /* @__PURE__ */ b("option", {
256
261
  value: "linkedin",
257
262
  children: "LinkedIn"
258
263
  }),
259
- /* @__PURE__ */ y("option", {
264
+ /* @__PURE__ */ b("option", {
260
265
  value: "tiktok",
261
266
  children: "TikTok"
262
267
  })
263
268
  ]
264
269
  }),
265
- /* @__PURE__ */ b("select", {
266
- value: O,
270
+ /* @__PURE__ */ x(S, {
271
+ value: j,
267
272
  onChange: (e) => Ae(e.target.value),
268
273
  className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
269
274
  children: [
270
- /* @__PURE__ */ y("option", {
275
+ /* @__PURE__ */ b("option", {
271
276
  value: "newest",
272
277
  children: "Newest"
273
278
  }),
274
- /* @__PURE__ */ y("option", {
279
+ /* @__PURE__ */ b("option", {
275
280
  value: "oldest",
276
281
  children: "Oldest"
277
282
  }),
278
- /* @__PURE__ */ y("option", {
283
+ /* @__PURE__ */ b("option", {
279
284
  value: "engagement",
280
285
  children: "Engagement"
281
286
  })
282
287
  ]
283
288
  })
284
289
  ] }),
285
- actions: /* @__PURE__ */ b("div", {
290
+ actions: /* @__PURE__ */ x("div", {
286
291
  className: "flex rounded-md border border-border-subtle",
287
- children: [/* @__PURE__ */ y("button", {
288
- onClick: () => A("grid"),
289
- className: i("p-2", k === "grid" ? "bg-foreground text-background" : "text-text-secondary"),
292
+ children: [/* @__PURE__ */ b("button", {
293
+ onClick: () => N("grid"),
294
+ className: i("p-2", M === "grid" ? "bg-foreground text-background" : "text-text-secondary"),
290
295
  "aria-label": "Grid view",
291
- children: /* @__PURE__ */ y(ge, { className: "h-4 w-4" })
292
- }), /* @__PURE__ */ y("button", {
293
- onClick: () => A("list"),
294
- className: i("p-2", k === "list" ? "bg-foreground text-background" : "text-text-secondary"),
296
+ children: /* @__PURE__ */ b(me, { className: "h-4 w-4" })
297
+ }), /* @__PURE__ */ b("button", {
298
+ onClick: () => N("list"),
299
+ className: i("p-2", M === "list" ? "bg-foreground text-background" : "text-text-secondary"),
295
300
  "aria-label": "List view",
296
- children: /* @__PURE__ */ y(ve, { className: "h-4 w-4" })
301
+ children: /* @__PURE__ */ b(ge, { className: "h-4 w-4" })
297
302
  })]
298
303
  })
299
304
  }),
300
- /* @__PURE__ */ b(se, {
301
- loading: G,
302
- error: Le,
303
- onRetry: K,
304
- hasData: !!W,
305
- children: [X.length === 0 ? /* @__PURE__ */ y(ae, {
305
+ /* @__PURE__ */ x(oe, {
306
+ loading: Re,
307
+ error: ze,
308
+ onRetry: Be,
309
+ hasData: !!K,
310
+ children: [X.length === 0 ? /* @__PURE__ */ b(ie, {
306
311
  illustration: $ ? "empty-search" : "empty-notifications",
307
312
  title: $ ? "No posts match your filters" : "No posts yet",
308
313
  description: $ ? "Try a different search term, status or platform." : "Compose your first social post to start building your feed.",
309
- action: $ ? void 0 : /* @__PURE__ */ b("button", {
310
- onClick: () => r(C + "/social/compose"),
314
+ action: $ ? void 0 : /* @__PURE__ */ x("button", {
315
+ onClick: () => T(E + "/social/compose"),
311
316
  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",
312
- children: [/* @__PURE__ */ y(ye, { className: "h-4 w-4" }), "Create Post"]
317
+ children: [/* @__PURE__ */ b(ye, { className: "h-4 w-4" }), "Create Post"]
313
318
  })
314
- }) : k === "grid" ? /* @__PURE__ */ y("div", {
319
+ }) : M === "grid" ? /* @__PURE__ */ b("div", {
315
320
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
316
- children: X.map((e) => /* @__PURE__ */ b("div", {
321
+ children: X.map((e) => /* @__PURE__ */ x("div", {
317
322
  onClick: () => {
318
- M(e), N(!0);
323
+ F(e), I(!0);
319
324
  },
320
325
  className: "cursor-pointer rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 space-y-3 hover:border-foreground/30 transition-colors",
321
326
  children: [
322
- /* @__PURE__ */ b("div", {
327
+ /* @__PURE__ */ x("div", {
323
328
  className: "flex items-center justify-between",
324
- children: [/* @__PURE__ */ y("span", {
325
- className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", x[e.platform]),
329
+ children: [/* @__PURE__ */ b("span", {
330
+ className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", C[e.platform]),
326
331
  children: e.platform
327
- }), /* @__PURE__ */ b("div", {
332
+ }), /* @__PURE__ */ x("div", {
328
333
  className: "flex items-center gap-1",
329
- children: [/* @__PURE__ */ y(c, { status: e.status }), /* @__PURE__ */ y(u, {
334
+ children: [/* @__PURE__ */ b(l, { status: e.status }), /* @__PURE__ */ b(d, {
330
335
  id: `hm-post-grid-${e.id}`,
331
- items: $e(e),
336
+ items: nt(e),
332
337
  buttonLabel: "Post actions"
333
338
  })]
334
339
  })]
335
340
  }),
336
- /* @__PURE__ */ y("p", {
341
+ /* @__PURE__ */ b("p", {
337
342
  className: "text-sm text-text-primary line-clamp-3",
338
343
  children: e.content
339
344
  }),
340
- e.status === "failed" && e.errorMessage && /* @__PURE__ */ b("p", {
345
+ e.status === "failed" && e.errorMessage && /* @__PURE__ */ x("p", {
341
346
  className: "flex items-start gap-1.5 text-xs text-status-error-text",
342
347
  "data-testid": "hm-post-error",
343
- children: [/* @__PURE__ */ y(me, { className: "mt-0.5 h-3 w-3 shrink-0" }), /* @__PURE__ */ y("span", {
348
+ children: [/* @__PURE__ */ b(fe, { className: "mt-0.5 h-3 w-3 shrink-0" }), /* @__PURE__ */ b("span", {
344
349
  className: "line-clamp-2",
345
350
  children: e.errorMessage
346
351
  })]
347
352
  }),
348
- /* @__PURE__ */ b("div", {
353
+ /* @__PURE__ */ x("div", {
349
354
  className: "flex items-center justify-between text-xs text-text-secondary",
350
- children: [/* @__PURE__ */ y("span", { children: ne(e.createdAt) }), e.status === "published" && /* @__PURE__ */ b("div", {
355
+ children: [/* @__PURE__ */ b("span", { children: a(e.createdAt) }), e.status === "published" && /* @__PURE__ */ x("div", {
351
356
  className: "flex items-center gap-3",
352
357
  children: [
353
- /* @__PURE__ */ b("span", {
358
+ /* @__PURE__ */ x("span", {
354
359
  className: "flex items-center gap-1",
355
- children: [/* @__PURE__ */ y(_e, { className: "h-3 w-3" }), a(e.metrics.likes)]
360
+ children: [/* @__PURE__ */ b(he, { className: "h-3 w-3" }), o(e.metrics.likes)]
356
361
  }),
357
- /* @__PURE__ */ b("span", {
362
+ /* @__PURE__ */ x("span", {
358
363
  className: "flex items-center gap-1",
359
- children: [/* @__PURE__ */ y(m, { className: "h-3 w-3" }), a(e.metrics.comments)]
364
+ children: [/* @__PURE__ */ b(_e, { className: "h-3 w-3" }), o(e.metrics.comments)]
360
365
  }),
361
- /* @__PURE__ */ b("span", {
366
+ /* @__PURE__ */ x("span", {
362
367
  className: "flex items-center gap-1",
363
- children: [/* @__PURE__ */ y(xe, { className: "h-3 w-3" }), a(e.metrics.shares)]
368
+ children: [/* @__PURE__ */ b(be, { className: "h-3 w-3" }), o(e.metrics.shares)]
364
369
  })
365
370
  ]
366
371
  })]
367
372
  })
368
373
  ]
369
374
  }, e.id))
370
- }) : /* @__PURE__ */ y("div", {
375
+ }) : /* @__PURE__ */ b("div", {
371
376
  className: "space-y-2",
372
- children: X.map((e) => /* @__PURE__ */ b("div", {
377
+ children: X.map((e) => /* @__PURE__ */ x("div", {
373
378
  onClick: () => {
374
- M(e), N(!0);
379
+ F(e), I(!0);
375
380
  },
376
381
  className: "cursor-pointer flex flex-wrap items-center gap-4 rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 hover:border-foreground/30 transition-colors",
377
382
  children: [
378
- /* @__PURE__ */ y("span", {
379
- className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize whitespace-nowrap", x[e.platform]),
383
+ /* @__PURE__ */ b("span", {
384
+ className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize whitespace-nowrap", C[e.platform]),
380
385
  children: e.platform
381
386
  }),
382
- /* @__PURE__ */ y("p", {
387
+ /* @__PURE__ */ b("p", {
383
388
  className: "text-sm text-text-primary flex-1 min-w-[8rem] truncate",
384
389
  children: e.content
385
390
  }),
386
- /* @__PURE__ */ y(c, { status: e.status }),
387
- e.status === "published" && /* @__PURE__ */ b("div", {
391
+ /* @__PURE__ */ b(l, { status: e.status }),
392
+ e.status === "published" && /* @__PURE__ */ x("div", {
388
393
  className: "flex items-center gap-3 text-xs text-text-secondary",
389
- children: [/* @__PURE__ */ b("span", { children: [a(e.metrics.likes), " likes"] }), /* @__PURE__ */ b("span", { children: [a(e.metrics.reach), " reach"] })]
394
+ children: [/* @__PURE__ */ x("span", { children: [o(e.metrics.likes), " likes"] }), /* @__PURE__ */ x("span", { children: [o(e.metrics.reach), " reach"] })]
390
395
  }),
391
- /* @__PURE__ */ y("span", {
396
+ /* @__PURE__ */ b("span", {
392
397
  className: "text-xs text-text-secondary whitespace-nowrap",
393
- children: ne(e.createdAt)
398
+ children: a(e.createdAt)
394
399
  }),
395
- /* @__PURE__ */ y(u, {
400
+ /* @__PURE__ */ b(d, {
396
401
  id: `hm-post-list-${e.id}`,
397
- items: $e(e),
402
+ items: nt(e),
398
403
  buttonLabel: "Post actions"
399
404
  })
400
405
  ]
401
406
  }, e.id))
402
- }), $ && /* @__PURE__ */ y(ce, {
403
- page: V.page,
404
- pageSize: V.pageSize,
405
- total: V.total,
406
- onPageChange: V.setPage,
407
- onPageSizeChange: V.setPageSize,
408
- disabled: G
407
+ }), $ && /* @__PURE__ */ b(se, {
408
+ page: W.page,
409
+ pageSize: W.pageSize,
410
+ total: W.total,
411
+ onPageChange: W.setPage,
412
+ onPageSizeChange: W.setPageSize,
413
+ disabled: Re
409
414
  })]
410
415
  }),
411
- /* @__PURE__ */ y(l, {
416
+ /* @__PURE__ */ b(u, {
412
417
  open: je,
413
- onClose: () => N(!1),
418
+ onClose: () => I(!1),
414
419
  title: "Post Details",
415
420
  size: "lg",
416
- footer: j ? /* @__PURE__ */ b(v, { children: [
417
- /* @__PURE__ */ b("button", {
421
+ footer: P ? /* @__PURE__ */ x(y, { children: [
422
+ /* @__PURE__ */ x("button", {
418
423
  type: "button",
419
- onClick: () => Ze(j),
424
+ onClick: () => et(P),
420
425
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
421
- children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), "Edit"]
426
+ children: [/* @__PURE__ */ b(ve, { className: "h-4 w-4" }), "Edit"]
422
427
  }),
423
- j.status === "failed" && /* @__PURE__ */ b("button", {
428
+ P.status === "failed" && /* @__PURE__ */ x("button", {
424
429
  type: "button",
425
- onClick: () => void Xe(j),
430
+ onClick: () => void $e(P),
426
431
  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",
427
- children: [/* @__PURE__ */ y(be, { className: "h-4 w-4" }), "Retry publish"]
432
+ children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Retry publish"]
428
433
  }),
429
- (j.status === "draft" || j.status === "scheduled") && /* @__PURE__ */ b("button", {
434
+ (P.status === "draft" || P.status === "scheduled") && /* @__PURE__ */ x("button", {
430
435
  type: "button",
431
- onClick: () => void Ye(j),
436
+ onClick: () => void Qe(P),
432
437
  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",
433
- children: [/* @__PURE__ */ y(g, { className: "h-4 w-4" }), "Publish"]
438
+ children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Publish"]
434
439
  }),
435
- /* @__PURE__ */ b("button", {
440
+ /* @__PURE__ */ x("button", {
436
441
  type: "button",
437
- onClick: () => void Je(j),
442
+ onClick: () => void Ze(P),
438
443
  className: "inline-flex items-center gap-2 rounded-md border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/40",
439
- children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "Delete"]
444
+ children: [/* @__PURE__ */ b(v, { className: "h-4 w-4" }), "Delete"]
440
445
  })
441
446
  ] }) : void 0,
442
- children: j && /* @__PURE__ */ b("div", {
447
+ children: P && /* @__PURE__ */ x("div", {
443
448
  className: "space-y-4",
444
449
  children: [
445
- /* @__PURE__ */ b("div", {
450
+ /* @__PURE__ */ x("div", {
446
451
  className: "flex flex-wrap items-center gap-3",
447
452
  children: [
448
- /* @__PURE__ */ y("span", {
449
- className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", x[j.platform]),
450
- children: j.platform
451
- }),
452
- /* @__PURE__ */ y(c, { status: j.status }),
453
453
  /* @__PURE__ */ b("span", {
454
+ className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", C[P.platform]),
455
+ children: P.platform
456
+ }),
457
+ /* @__PURE__ */ b(l, { status: P.status }),
458
+ /* @__PURE__ */ x("span", {
454
459
  className: "text-xs text-text-secondary",
455
- children: ["by ", j.author]
460
+ children: ["by ", P.author]
456
461
  })
457
462
  ]
458
463
  }),
459
- /* @__PURE__ */ y("p", {
464
+ /* @__PURE__ */ b("p", {
460
465
  className: "text-sm text-text-primary whitespace-pre-wrap",
461
- children: j.content
466
+ children: P.content
462
467
  }),
463
- j.status === "scheduled" && j.scheduledAt && /* @__PURE__ */ b("p", {
468
+ P.status === "scheduled" && P.scheduledAt && /* @__PURE__ */ x("p", {
464
469
  className: "text-xs text-text-secondary",
465
470
  children: [
466
471
  "Publishes automatically at",
467
472
  " ",
468
- new Date(j.scheduledAt).toLocaleString()
473
+ new Date(P.scheduledAt).toLocaleString()
469
474
  ]
470
475
  }),
471
- j.status === "failed" && /* @__PURE__ */ b("div", {
476
+ P.status === "failed" && /* @__PURE__ */ x("div", {
472
477
  className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
473
478
  "data-testid": "hm-post-detail-error",
474
479
  children: [
475
- /* @__PURE__ */ y("p", {
480
+ /* @__PURE__ */ b("p", {
476
481
  className: "font-medium",
477
482
  children: "Publishing failed"
478
483
  }),
479
- /* @__PURE__ */ y("p", {
484
+ /* @__PURE__ */ b("p", {
480
485
  className: "mt-1 break-words",
481
- children: j.errorMessage ?? "The platform rejected the post."
486
+ children: P.errorMessage ?? "The platform rejected the post."
482
487
  }),
483
- (j.deliveryAttempts ?? 0) > 0 && /* @__PURE__ */ b("p", {
488
+ (P.deliveryAttempts ?? 0) > 0 && /* @__PURE__ */ x("p", {
484
489
  className: "mt-1 text-xs",
485
- children: ["Failed attempts: ", j.deliveryAttempts]
490
+ children: ["Failed attempts: ", P.deliveryAttempts]
486
491
  })
487
492
  ]
488
493
  }),
489
- j.postUrl && /* @__PURE__ */ b("a", {
490
- href: j.postUrl,
494
+ P.postUrl && /* @__PURE__ */ x("a", {
495
+ href: P.postUrl,
491
496
  target: "_blank",
492
497
  rel: "noopener noreferrer",
493
498
  className: "inline-flex items-center gap-1.5 text-sm font-medium text-text-primary underline underline-offset-2 hover:text-text-secondary",
494
- children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "View on platform"]
499
+ children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View on platform"]
495
500
  }),
496
- j.status === "published" && /* @__PURE__ */ b("div", {
501
+ P.status === "published" && /* @__PURE__ */ x("div", {
497
502
  className: "grid grid-cols-3 gap-4",
498
503
  children: [
499
- /* @__PURE__ */ b("div", {
504
+ /* @__PURE__ */ x("div", {
500
505
  className: "text-center p-3 rounded-md bg-bg-sunken/50",
501
- children: [/* @__PURE__ */ y("p", {
506
+ children: [/* @__PURE__ */ b("p", {
502
507
  className: "text-lg font-bold text-text-primary",
503
- children: a(j.metrics.likes)
504
- }), /* @__PURE__ */ y("p", {
508
+ children: o(P.metrics.likes)
509
+ }), /* @__PURE__ */ b("p", {
505
510
  className: "text-xs text-text-secondary",
506
511
  children: "Likes"
507
512
  })]
508
513
  }),
509
- /* @__PURE__ */ b("div", {
514
+ /* @__PURE__ */ x("div", {
510
515
  className: "text-center p-3 rounded-md bg-bg-sunken/50",
511
- children: [/* @__PURE__ */ y("p", {
516
+ children: [/* @__PURE__ */ b("p", {
512
517
  className: "text-lg font-bold text-text-primary",
513
- children: a(j.metrics.comments)
514
- }), /* @__PURE__ */ y("p", {
518
+ children: o(P.metrics.comments)
519
+ }), /* @__PURE__ */ b("p", {
515
520
  className: "text-xs text-text-secondary",
516
521
  children: "Comments"
517
522
  })]
518
523
  }),
519
- /* @__PURE__ */ b("div", {
524
+ /* @__PURE__ */ x("div", {
520
525
  className: "text-center p-3 rounded-md bg-bg-sunken/50",
521
- children: [/* @__PURE__ */ y("p", {
526
+ children: [/* @__PURE__ */ b("p", {
522
527
  className: "text-lg font-bold text-text-primary",
523
- children: a(j.metrics.reach)
524
- }), /* @__PURE__ */ y("p", {
528
+ children: o(P.metrics.reach)
529
+ }), /* @__PURE__ */ b("p", {
525
530
  className: "text-xs text-text-secondary",
526
531
  children: "Reach"
527
532
  })]
528
533
  })
529
534
  ]
530
535
  }),
531
- /* @__PURE__ */ y(le, {
536
+ /* @__PURE__ */ b(ce, {
532
537
  sourceType: "SOCIAL_POST",
533
- sourceId: j.id,
538
+ sourceId: P.id,
534
539
  title: "Tracked links",
535
540
  description: "Links in this post are replaced with tracked URLs when it is published through a connected account, so each click is counted and attributed as a SOCIAL_CLICK touchpoint.",
536
- emptyMessage: j.status === "published" ? "No tracked links for this post. Posts without links, or published before tracking was enabled, have none." : "Tracked links are created when this post is published."
537
- }, j.id),
538
- /* @__PURE__ */ y("div", {
541
+ emptyMessage: P.status === "published" ? "No tracked links for this post. Posts without links, or published before tracking was enabled, have none." : "Tracked links are created when this post is published."
542
+ }, P.id),
543
+ /* @__PURE__ */ b("div", {
539
544
  className: "flex flex-wrap gap-1",
540
- children: j.tags.map((e) => /* @__PURE__ */ y("span", {
545
+ children: P.tags.map((e) => /* @__PURE__ */ b("span", {
541
546
  className: "rounded-full border border-border-subtle px-2.5 py-0.5 text-xs text-text-secondary",
542
547
  children: e.startsWith("#") ? e : `#${e}`
543
548
  }, e))
@@ -545,32 +550,32 @@ var C = () => {
545
550
  ]
546
551
  })
547
552
  }),
548
- /* @__PURE__ */ y(l, {
553
+ /* @__PURE__ */ b(u, {
549
554
  open: Me,
550
- onClose: () => P(!1),
555
+ onClose: () => L(!1),
551
556
  title: "Edit Post",
552
557
  description: "Update the caption. Hashtags are re-detected automatically.",
553
558
  size: "lg",
554
- footer: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("button", {
559
+ footer: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("button", {
555
560
  type: "button",
556
- onClick: () => P(!1),
561
+ onClick: () => L(!1),
557
562
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
558
563
  children: "Cancel"
559
- }), /* @__PURE__ */ y("button", {
564
+ }), /* @__PURE__ */ b("button", {
560
565
  type: "button",
561
- onClick: Qe,
562
- disabled: He,
566
+ onClick: tt,
567
+ disabled: Ge,
563
568
  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 disabled:opacity-60",
564
- children: He ? "Saving..." : "Save changes"
569
+ children: Ge ? "Saving..." : "Save changes"
565
570
  })] }),
566
- children: /* @__PURE__ */ b("div", {
571
+ children: /* @__PURE__ */ x("div", {
567
572
  className: "space-y-3",
568
- children: [Pe && /* @__PURE__ */ y("div", {
573
+ children: [B && /* @__PURE__ */ b("div", {
569
574
  className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
570
- children: Pe
571
- }), /* @__PURE__ */ y("textarea", {
572
- value: I,
573
- onChange: (e) => L(e.target.value),
575
+ children: B
576
+ }), /* @__PURE__ */ b("textarea", {
577
+ value: Pe,
578
+ onChange: (e) => z(e.target.value),
574
579
  rows: 6,
575
580
  className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
576
581
  placeholder: "Write your post content..."
@@ -580,6 +585,6 @@ var C = () => {
580
585
  ]
581
586
  });
582
587
  };
583
- export { C as PostsPage };
588
+ export { T as PostsPage };
584
589
 
585
590
  //# sourceMappingURL=PostsPage.js.map