@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.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 (206) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/stories/Accessibility.stories.d.ts +13 -0
  3. package/dist/stories/Accessibility.stories.d.ts.map +1 -0
  4. package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
  5. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
  6. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
  7. package/dist/stories/pages/DashboardPage.stories.d.ts.map +1 -1
  8. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
  9. package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
  10. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  11. package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
  12. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
  15. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
  17. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
  18. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  19. package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
  20. package/dist/subscriberbot/components/Modal.js +43 -33
  21. package/dist/subscriberbot/components/Modal.js.map +1 -1
  22. package/dist/subscriberbot/components/PageLayout.d.ts +6 -0
  23. package/dist/subscriberbot/components/PageLayout.d.ts.map +1 -1
  24. package/dist/subscriberbot/components/PageLayout.js +2 -1
  25. package/dist/subscriberbot/components/PageLayout.js.map +1 -1
  26. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
  27. package/dist/subscriberbot/components/PostureOptions.js +10 -10
  28. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  29. package/dist/subscriberbot/components/StateViews.d.ts +2 -0
  30. package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
  31. package/dist/subscriberbot/components/StateViews.js +46 -37
  32. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  33. package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
  34. package/dist/subscriberbot/components/StatusBadge.js +6 -6
  35. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  36. package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
  37. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
  38. package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
  39. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  40. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
  41. package/dist/subscriberbot/components/mobile/MobileDashboard.js +143 -135
  42. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  43. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
  44. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
  45. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  46. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts +3 -0
  47. package/dist/subscriberbot/components/mobile/MobileScreen.d.ts.map +1 -1
  48. package/dist/subscriberbot/components/mobile/MobileScreen.js +5 -3
  49. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  50. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
  51. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
  52. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
  53. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  54. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
  55. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
  56. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  57. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
  58. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
  59. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  60. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
  61. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
  62. package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
  63. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  64. package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
  65. package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
  66. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  67. package/dist/subscriberbot/components/viz.d.ts +1 -0
  68. package/dist/subscriberbot/components/viz.d.ts.map +1 -1
  69. package/dist/subscriberbot/components/viz.js +100 -101
  70. package/dist/subscriberbot/components/viz.js.map +1 -1
  71. package/dist/subscriberbot/hooks/index.js +1 -1
  72. package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
  73. package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
  74. package/dist/subscriberbot/hooks/useFormError.js +28 -0
  75. package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
  76. package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
  77. package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
  78. package/dist/subscriberbot/hooks/useFormatters.js +13 -0
  79. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
  80. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  81. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
  82. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  83. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
  84. package/dist/subscriberbot/hooks/useTr.js +1 -1
  85. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  86. package/dist/subscriberbot/index.js +1 -1
  87. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  88. package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
  89. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
  91. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  92. package/dist/subscriberbot/pages/DashboardPage.js +115 -98
  93. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  94. package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
  95. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  96. package/dist/subscriberbot/pages/InboxPage.js +421 -402
  97. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  98. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  99. package/dist/subscriberbot/pages/InsightsPage.js +130 -121
  100. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  101. package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
  102. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  103. package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
  104. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  105. package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
  106. package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
  107. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  108. package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
  109. package/dist/subscriberbot/pages/SavingsPage.js +57 -57
  110. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
  112. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  113. package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
  114. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
  116. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
  118. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
  120. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  121. package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
  122. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
  124. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  125. package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
  126. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
  128. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
  129. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +272 -260
  130. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
  132. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
  133. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
  134. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
  136. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
  137. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
  138. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
  140. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
  141. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
  142. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
  144. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
  145. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
  146. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  147. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
  148. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
  149. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
  150. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
  152. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
  153. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
  154. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
  156. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
  157. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
  158. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
  160. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
  161. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
  162. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  163. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
  164. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
  165. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
  166. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  167. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
  168. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  169. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
  170. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  171. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
  172. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  173. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
  174. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  175. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
  176. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  177. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
  178. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  179. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
  180. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  181. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
  182. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  183. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
  184. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  185. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +112 -91
  186. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  187. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
  188. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  189. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
  190. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  191. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
  192. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
  193. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  194. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
  195. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
  196. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
  197. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  198. package/dist/subscriberbot/utils/formatters.d.ts +16 -5
  199. package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
  200. package/dist/subscriberbot/utils/formatters.js +57 -25
  201. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  202. package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
  203. package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
  204. package/dist/subscriberbot/utils/plaidLink.js +21 -21
  205. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  206. package/package.json +1 -1
@@ -1,25 +1,26 @@
1
1
  import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatCurrency as n, formatDate as r, formatEnumLabel as i, formatIntervalSuffix as a } from "../../utils/formatters.js";
4
- import { StatusBadge as o } from "../../components/StatusBadge.js";
5
- import { EmptyState as s } from "../../components/EmptyState.js";
6
- import { Modal as c } from "../../components/Modal.js";
7
- import { useTr as l } from "../../hooks/useTr.js";
8
- import { ErrorView as u, LoadingView as d, Section as f } from "../../components/StateViews.js";
9
- import { Gauge as p, MiniProgress as m, Timeline as h } from "../../components/viz.js";
2
+ import { useTr as t } from "../../hooks/useTr.js";
3
+ import { useFormatters as n } from "../../hooks/useFormatters.js";
4
+ import { PageLayout as r } from "../../components/PageLayout.js";
5
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
6
+ import { EmptyState as a } from "../../components/EmptyState.js";
7
+ import { Modal as o } from "../../components/Modal.js";
8
+ import { ErrorView as s, LoadingView as c, Section as l } from "../../components/StateViews.js";
9
+ import { Gauge as u, MiniProgress as d, Timeline as f } from "../../components/viz.js";
10
10
  import "../../components/index.js";
11
- import { useCancelRelationship as g, useCreateAsset as _, useCreateEntitlement as v, useDecisions as y, useFileDownloadUrl as b, useInvoices as x, usePlans as S, useProviders as C, useRelationship as w, useTransitionRelationship as T, useUpdateRelationship as E, useUploadFile as D } from "../../hooks/useSubscriberBotApi.js";
12
- import { canTransition as O } from "../../utils/portfolio.js";
13
- import { DecisionCard as k } from "../../components/decisions/DecisionCard.js";
14
- import { AiDisclaimer as A } from "../../components/decisions/DecisionBanners.js";
11
+ import { useCancelRelationship as p, useCreateAsset as m, useCreateEntitlement as h, useDecisions as g, useFileDownloadUrl as _, useInvoices as v, usePlans as y, useProviders as b, useRelationship as x, useTransitionRelationship as S, useUpdateRelationship as C, useUploadFile as w } from "../../hooks/useSubscriberBotApi.js";
12
+ import { canTransition as T } from "../../utils/portfolio.js";
13
+ import { useFormError as E } from "../../hooks/useFormError.js";
14
+ import { DecisionCard as D } from "../../components/decisions/DecisionCard.js";
15
+ import { AiDisclaimer as O } from "../../components/decisions/DecisionBanners.js";
15
16
  import "../../components/decisions/index.js";
16
- import { useState as j } from "react";
17
- import { Activity as M, ArrowLeft as ee, Ban as N, Briefcase as P, CalendarClock as F, CreditCard as I, Download as L, Handshake as te, Paperclip as R, Pause as z, Pencil as ne, Play as B, Plus as re, ShieldCheck as ie, Tag as ae, Wallet as oe } from "lucide-react";
18
- import { useParams as se } from "react-router";
19
- import { Fragment as ce, jsx as V, jsxs as H } from "react/jsx-runtime";
20
- import { GlassCard as U } from "@burdenoff/fe-libs/ui";
17
+ import { useState as k } from "react";
18
+ import { Activity as A, ArrowLeft as j, Ban as M, Briefcase as N, CalendarClock as P, CreditCard as F, Download as I, Handshake as L, Paperclip as R, Pause as z, Pencil as ee, Play as B, Plus as V, ShieldCheck as te, Tag as ne, Wallet as re } from "lucide-react";
19
+ import { useParams as ie } from "react-router";
20
+ import { Fragment as ae, jsx as H, jsxs as U } from "react/jsx-runtime";
21
+ import { GlassCard as W } from "@burdenoff/fe-libs/ui";
21
22
  //#region src/subscriberbot/pages/relationships/RelationshipDetailPage.tsx
22
- var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", G = "mb-1 block text-xs font-medium text-text-secondary", K = [
23
+ var G = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", K = "mb-1 block text-xs font-medium text-text-secondary", q = [
23
24
  "MONTHLY",
24
25
  "YEARLY",
25
26
  "QUARTERLY",
@@ -28,14 +29,14 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
28
29
  "USAGE_BASED",
29
30
  "LIFETIME",
30
31
  "FREE"
31
- ], q = [
32
+ ], J = [
32
33
  "FEATURE_ACCESS",
33
34
  "SEAT",
34
35
  "USAGE_QUOTA",
35
36
  "CONTENT",
36
37
  "DISCOUNT",
37
38
  "SUPPORT_TIER"
38
- ], J = [
39
+ ], Y = [
39
40
  "RECEIPT",
40
41
  "INVOICE",
41
42
  "CONTRACT",
@@ -44,7 +45,7 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
44
45
  "CERTIFICATE",
45
46
  "WARRANTY",
46
47
  "DOMAIN"
47
- ], Y = {
48
+ ], oe = {
48
49
  SUBSCRIPTION: "relationships.kinds.subscription",
49
50
  MEMBERSHIP: "relationships.kinds.membership",
50
51
  LICENSE: "relationships.kinds.license",
@@ -53,7 +54,7 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
53
54
  RECURRING_PAYMENT: "relationships.kinds.recurringPayment",
54
55
  ENROLLMENT: "relationships.kinds.enrollment",
55
56
  TRIAL: "relationships.kinds.trial"
56
- }, le = [
57
+ }, se = [
57
58
  {
58
59
  status: "ACTIVE",
59
60
  labelKey: "relationships.detail.actions.activate",
@@ -70,892 +71,920 @@ var W = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
70
71
  status: "EXPIRED",
71
72
  labelKey: "relationships.detail.actions.markExpired",
72
73
  defaultLabel: "Mark expired",
73
- icon: N
74
+ icon: M
74
75
  }
75
76
  ];
76
77
  function X({ label: e, value: t }) {
77
- return /* @__PURE__ */ H("div", {
78
+ return /* @__PURE__ */ U("div", {
78
79
  className: "flex items-center justify-between gap-3 border-b border-border-subtle/60 py-2.5 last:border-0 last:pb-0",
79
- children: [/* @__PURE__ */ V("span", {
80
+ children: [/* @__PURE__ */ H("span", {
80
81
  className: "shrink-0 text-sm text-text-secondary",
81
82
  children: e
82
- }), /* @__PURE__ */ V("span", {
83
- className: "min-w-0 truncate text-right text-sm font-medium text-text-primary",
83
+ }), /* @__PURE__ */ H("span", {
84
+ className: "min-w-0 truncate text-end text-sm font-medium text-text-primary",
84
85
  children: t
85
86
  })]
86
87
  });
87
88
  }
88
- function ue(e) {
89
+ function ce(e) {
89
90
  return e == null ? "accent" : e >= 66 ? "positive" : e >= 33 ? "warning" : "negative";
90
91
  }
91
- function de(e) {
92
+ function Z(e) {
92
93
  if (!e) return "";
93
94
  let t = new Date(e);
94
95
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
95
96
  }
96
- function fe({ relationship: e, onClose: t }) {
97
- let n = l(), r = E(), i = C({ pagination: {
97
+ function le({ relationship: e, onClose: n }) {
98
+ let r = t(), i = C(), a = b({ pagination: {
98
99
  limit: 100,
99
100
  offset: 0
100
- } }), [a, o] = j(e.label), [s, u] = j(e.providerId ?? ""), [d, f] = j(e.planId ?? ""), [p, m] = j(String(e.amount ?? "")), [h, g] = j(e.currency), [_, v] = j(e.interval), [y, b] = j(de(e.renewsAt)), [x, w] = j(e.autoRenew), [T, D] = j(e.notes ?? ""), [O, k] = j(e.department ?? ""), [A, M] = j(null), ee = S(s || void 0), N = (() => {
101
- let t = i.data?.items ?? [];
101
+ } }), [s, c] = k(e.label), [l, u] = k(e.providerId ?? ""), [d, f] = k(e.planId ?? ""), [p, m] = k(String(e.amount ?? "")), [h, g] = k(e.currency), [_, v] = k(e.interval), [x, S] = k(Z(e.renewsAt)), [w, T] = k(e.autoRenew), [D, O] = k(e.notes ?? ""), [A, j] = k(e.department ?? ""), [M, N, P, F] = E(), I = y(l || void 0), L = (() => {
102
+ let t = a.data?.items ?? [];
102
103
  return e.provider && !t.some((t) => t.id === e.provider?.id) ? [e.provider, ...t] : t;
103
- })(), P = ee.data ?? [];
104
- return /* @__PURE__ */ V(c, {
105
- title: n("relationships.detail.editModal.title", "Edit relationship"),
106
- onClose: t,
104
+ })(), R = I.data ?? [];
105
+ return /* @__PURE__ */ H(o, {
106
+ title: r("relationships.detail.editModal.title", "Edit relationship"),
107
+ onClose: n,
107
108
  maxWidthClassName: "max-w-2xl",
108
- children: /* @__PURE__ */ H("form", {
109
- onSubmit: (i) => {
110
- if (i.preventDefault(), M(null), !a.trim()) {
111
- M(n("relationships.detail.editModal.labelRequired", "A label is required."));
109
+ children: /* @__PURE__ */ U("form", {
110
+ onSubmit: (t) => {
111
+ if (t.preventDefault(), N(null), !s.trim()) {
112
+ N(r("relationships.detail.editModal.labelRequired", "A label is required."), "edit-label");
112
113
  return;
113
114
  }
114
- let o = {
115
- label: a.trim(),
115
+ let a = {
116
+ label: s.trim(),
116
117
  interval: _,
117
- autoRenew: x,
118
+ autoRenew: w,
118
119
  currency: h.trim() || "USD",
119
- notes: T.trim(),
120
- department: O.trim(),
121
- ...s ? { providerId: s } : {},
120
+ notes: D.trim(),
121
+ department: A.trim(),
122
+ ...l ? { providerId: l } : {},
122
123
  ...d ? { planId: d } : {},
123
124
  ...p.trim() ? { amount: Number(p) } : {},
124
- ...y ? { renewsAt: new Date(y).toISOString() } : {}
125
+ ...x ? { renewsAt: new Date(x).toISOString() } : {}
125
126
  };
126
- r.mutate({
127
+ i.mutate({
127
128
  id: e.id,
128
- input: o
129
+ input: a
129
130
  }, {
130
- onSuccess: () => t(),
131
- onError: (e) => M(e instanceof Error ? e.message : n("relationships.detail.editModal.error", "Could not update relationship."))
131
+ onSuccess: () => n(),
132
+ onError: (e) => N(e instanceof Error ? e.message : r("relationships.detail.editModal.error", "Could not update relationship."))
132
133
  });
133
134
  },
134
135
  className: "space-y-4",
135
136
  children: [
136
- A && /* @__PURE__ */ V("div", {
137
+ M && /* @__PURE__ */ H("div", {
138
+ id: F,
139
+ tabIndex: -1,
140
+ role: "alert",
137
141
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
138
- children: A
142
+ children: M
139
143
  }),
140
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ H("label", {
144
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("label", {
141
145
  htmlFor: "edit-label",
142
- className: G,
146
+ className: K,
143
147
  children: [
144
- n("relationships.detail.editModal.labelLabel", "Label"),
148
+ r("relationships.detail.editModal.labelLabel", "Label"),
145
149
  " ",
146
- /* @__PURE__ */ V("span", {
150
+ /* @__PURE__ */ H("span", {
147
151
  className: "text-status-error-text",
148
152
  children: "*"
149
153
  })
150
154
  ]
151
- }), /* @__PURE__ */ V("input", {
155
+ }), /* @__PURE__ */ H("input", {
156
+ ...P("edit-label"),
152
157
  id: "edit-label",
153
158
  type: "text",
154
- value: a,
155
- onChange: (e) => o(e.target.value),
156
- className: W,
159
+ value: s,
160
+ onChange: (e) => c(e.target.value),
161
+ className: G,
157
162
  required: !0
158
163
  })] }),
159
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
164
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
160
165
  htmlFor: "edit-department",
161
- className: G,
162
- children: n("relationships.detail.editModal.departmentLabel", "Department or team")
163
- }), /* @__PURE__ */ V("input", {
166
+ className: K,
167
+ children: r("relationships.detail.editModal.departmentLabel", "Department or team")
168
+ }), /* @__PURE__ */ H("input", {
169
+ ...P("edit-department"),
164
170
  id: "edit-department",
165
171
  type: "text",
166
172
  maxLength: 120,
167
- value: O,
168
- onChange: (e) => k(e.target.value),
169
- placeholder: n("relationships.detail.editModal.departmentPlaceholder", "e.g. Engineering, Marketing"),
170
- className: W
173
+ value: A,
174
+ onChange: (e) => j(e.target.value),
175
+ placeholder: r("relationships.detail.editModal.departmentPlaceholder", "e.g. Engineering, Marketing"),
176
+ className: G
171
177
  })] }),
172
- /* @__PURE__ */ H("div", {
178
+ /* @__PURE__ */ U("div", {
173
179
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
174
- children: [/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
180
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
175
181
  htmlFor: "edit-provider",
176
- className: G,
177
- children: n("relationships.detail.editModal.providerLabel", "Provider")
178
- }), /* @__PURE__ */ H("select", {
182
+ className: K,
183
+ children: r("relationships.detail.editModal.providerLabel", "Provider")
184
+ }), /* @__PURE__ */ U("select", {
185
+ ...P("edit-provider"),
179
186
  id: "edit-provider",
180
- value: s,
187
+ value: l,
181
188
  onChange: (e) => {
182
189
  u(e.target.value), f("");
183
190
  },
184
- className: W,
185
- children: [/* @__PURE__ */ V("option", {
191
+ className: G,
192
+ children: [/* @__PURE__ */ H("option", {
186
193
  value: "",
187
- children: n("relationships.detail.editModal.providerNone", "— None —")
188
- }), N.map((e) => /* @__PURE__ */ V("option", {
194
+ children: r("relationships.detail.editModal.providerNone", "— None —")
195
+ }), L.map((e) => /* @__PURE__ */ H("option", {
189
196
  value: e.id,
190
197
  children: e.name
191
198
  }, e.id))]
192
- })] }), /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
199
+ })] }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
193
200
  htmlFor: "edit-plan",
194
- className: G,
195
- children: n("relationships.detail.editModal.planLabel", "Plan")
196
- }), /* @__PURE__ */ H("select", {
201
+ className: K,
202
+ children: r("relationships.detail.editModal.planLabel", "Plan")
203
+ }), /* @__PURE__ */ U("select", {
204
+ ...P("edit-plan"),
197
205
  id: "edit-plan",
198
206
  value: d,
199
207
  onChange: (e) => f(e.target.value),
200
- className: W,
201
- disabled: !s || P.length === 0,
202
- children: [/* @__PURE__ */ V("option", {
208
+ className: G,
209
+ disabled: !l || R.length === 0,
210
+ children: [/* @__PURE__ */ H("option", {
203
211
  value: "",
204
- children: n("relationships.detail.editModal.planNone", "— None —")
205
- }), P.map((e) => /* @__PURE__ */ V("option", {
212
+ children: r("relationships.detail.editModal.planNone", "— None —")
213
+ }), R.map((e) => /* @__PURE__ */ H("option", {
206
214
  value: e.id,
207
215
  children: e.name
208
216
  }, e.id))]
209
217
  })] })]
210
218
  }),
211
- /* @__PURE__ */ H("div", {
219
+ /* @__PURE__ */ U("div", {
212
220
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
213
221
  children: [
214
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
222
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
215
223
  htmlFor: "edit-amount",
216
- className: G,
217
- children: n("relationships.detail.editModal.amountLabel", "Amount")
218
- }), /* @__PURE__ */ V("input", {
224
+ className: K,
225
+ children: r("relationships.detail.editModal.amountLabel", "Amount")
226
+ }), /* @__PURE__ */ H("input", {
227
+ ...P("edit-amount"),
219
228
  id: "edit-amount",
220
229
  type: "number",
221
230
  min: "0",
222
231
  step: "0.01",
223
232
  value: p,
224
233
  onChange: (e) => m(e.target.value),
225
- className: W
234
+ className: G
226
235
  })] }),
227
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
236
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
228
237
  htmlFor: "edit-currency",
229
- className: G,
230
- children: n("relationships.detail.editModal.currencyLabel", "Currency")
231
- }), /* @__PURE__ */ V("input", {
238
+ className: K,
239
+ children: r("relationships.detail.editModal.currencyLabel", "Currency")
240
+ }), /* @__PURE__ */ H("input", {
241
+ ...P("edit-currency"),
232
242
  id: "edit-currency",
233
243
  type: "text",
234
244
  value: h,
235
245
  onChange: (e) => g(e.target.value.toUpperCase()),
236
246
  maxLength: 3,
237
- className: W
247
+ className: G
238
248
  })] }),
239
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
249
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
240
250
  htmlFor: "edit-interval",
241
- className: G,
242
- children: n("relationships.detail.editModal.intervalLabel", "Billing interval")
243
- }), /* @__PURE__ */ V("select", {
251
+ className: K,
252
+ children: r("relationships.detail.editModal.intervalLabel", "Billing interval")
253
+ }), /* @__PURE__ */ H("select", {
254
+ ...P("edit-interval"),
244
255
  id: "edit-interval",
245
256
  value: _,
246
257
  onChange: (e) => v(e.target.value),
247
- className: W,
248
- children: K.map((e) => /* @__PURE__ */ V("option", {
258
+ className: G,
259
+ children: q.map((e) => /* @__PURE__ */ H("option", {
249
260
  value: e,
250
261
  children: e.replace(/_/g, " ")
251
262
  }, e))
252
263
  })] })
253
264
  ]
254
265
  }),
255
- /* @__PURE__ */ H("div", {
266
+ /* @__PURE__ */ U("div", {
256
267
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
257
- children: [/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
268
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
258
269
  htmlFor: "edit-renews",
259
- className: G,
260
- children: n("relationships.detail.editModal.renewsOnLabel", "Renews on")
261
- }), /* @__PURE__ */ V("input", {
270
+ className: K,
271
+ children: r("relationships.detail.editModal.renewsOnLabel", "Renews on")
272
+ }), /* @__PURE__ */ H("input", {
273
+ ...P("edit-renews"),
262
274
  id: "edit-renews",
263
275
  type: "date",
264
- value: y,
265
- onChange: (e) => b(e.target.value),
266
- className: W
267
- })] }), /* @__PURE__ */ V("div", {
276
+ value: x,
277
+ onChange: (e) => S(e.target.value),
278
+ className: G
279
+ })] }), /* @__PURE__ */ H("div", {
268
280
  className: "flex items-end",
269
- children: /* @__PURE__ */ H("label", {
281
+ children: /* @__PURE__ */ U("label", {
270
282
  className: "flex items-center gap-2 text-sm text-text-primary",
271
- children: [/* @__PURE__ */ V("input", {
283
+ children: [/* @__PURE__ */ H("input", {
272
284
  type: "checkbox",
273
- checked: x,
274
- onChange: (e) => w(e.target.checked),
285
+ checked: w,
286
+ onChange: (e) => T(e.target.checked),
275
287
  className: "size-4 rounded border-border-subtle"
276
- }), n("relationships.detail.editModal.autoRenews", "Auto-renews")]
288
+ }), r("relationships.detail.editModal.autoRenews", "Auto-renews")]
277
289
  })
278
290
  })]
279
291
  }),
280
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
292
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
281
293
  htmlFor: "edit-notes",
282
- className: G,
283
- children: n("relationships.detail.editModal.notesLabel", "Notes")
284
- }), /* @__PURE__ */ V("textarea", {
294
+ className: K,
295
+ children: r("relationships.detail.editModal.notesLabel", "Notes")
296
+ }), /* @__PURE__ */ H("textarea", {
297
+ ...P("edit-notes"),
285
298
  id: "edit-notes",
286
- value: T,
287
- onChange: (e) => D(e.target.value),
299
+ value: D,
300
+ onChange: (e) => O(e.target.value),
288
301
  rows: 3,
289
- className: W
302
+ className: G
290
303
  })] }),
291
- /* @__PURE__ */ H("div", {
304
+ /* @__PURE__ */ U("div", {
292
305
  className: "flex justify-end gap-3",
293
- children: [/* @__PURE__ */ V("button", {
306
+ children: [/* @__PURE__ */ H("button", {
294
307
  type: "button",
295
- onClick: t,
308
+ onClick: n,
296
309
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
297
- children: n("relationships.detail.editModal.cancel", "Cancel")
298
- }), /* @__PURE__ */ V("button", {
310
+ children: r("relationships.detail.editModal.cancel", "Cancel")
311
+ }), /* @__PURE__ */ H("button", {
299
312
  type: "submit",
300
- disabled: r.isPending,
313
+ disabled: i.isPending,
301
314
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
302
- children: r.isPending ? n("relationships.detail.editModal.saving", "Saving…") : n("relationships.detail.editModal.submit", "Save changes")
315
+ children: i.isPending ? r("relationships.detail.editModal.saving", "Saving…") : r("relationships.detail.editModal.submit", "Save changes")
303
316
  })]
304
317
  })
305
318
  ]
306
319
  })
307
320
  });
308
321
  }
309
- function pe({ relationshipId: e, onClose: t }) {
310
- let n = l(), r = v(), [i, a] = j(""), [o, s] = j("FEATURE_ACCESS"), [u, d] = j(""), [f, p] = j(""), [m, h] = j(""), [g, _] = j(null);
311
- return /* @__PURE__ */ V(c, {
312
- title: n("relationships.detail.addEntitlementModal.title", "Add entitlement"),
313
- onClose: t,
314
- children: /* @__PURE__ */ H("form", {
315
- onSubmit: (a) => {
316
- if (a.preventDefault(), _(null), !i.trim()) {
317
- _(n("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."));
322
+ function ue({ relationshipId: e, onClose: n }) {
323
+ let r = t(), i = h(), [a, s] = k(""), [c, l] = k("FEATURE_ACCESS"), [u, d] = k(""), [f, p] = k(""), [m, g] = k(""), [_, v, y, b] = E();
324
+ return /* @__PURE__ */ H(o, {
325
+ title: r("relationships.detail.addEntitlementModal.title", "Add entitlement"),
326
+ onClose: n,
327
+ children: /* @__PURE__ */ U("form", {
328
+ onSubmit: (t) => {
329
+ if (t.preventDefault(), v(null), !a.trim()) {
330
+ v(r("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."), "ent-name");
318
331
  return;
319
332
  }
320
- r.mutate({
333
+ i.mutate({
321
334
  relationshipId: e,
322
- name: i.trim(),
323
- type: o,
335
+ name: a.trim(),
336
+ type: c,
324
337
  ...u.trim() ? { quota: Number(u) } : {},
325
338
  ...f.trim() ? { unit: f.trim() } : {},
326
339
  ...m.trim() ? { description: m.trim() } : {}
327
340
  }, {
328
- onSuccess: () => t(),
329
- onError: (e) => _(e instanceof Error ? e.message : n("relationships.detail.addEntitlementModal.error", "Could not add entitlement."))
341
+ onSuccess: () => n(),
342
+ onError: (e) => v(e instanceof Error ? e.message : r("relationships.detail.addEntitlementModal.error", "Could not add entitlement."))
330
343
  });
331
344
  },
332
345
  className: "space-y-4",
333
346
  children: [
334
- g && /* @__PURE__ */ V("div", {
347
+ _ && /* @__PURE__ */ H("div", {
348
+ id: b,
349
+ tabIndex: -1,
350
+ role: "alert",
335
351
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
336
- children: g
352
+ children: _
337
353
  }),
338
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ H("label", {
354
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ U("label", {
339
355
  htmlFor: "ent-name",
340
- className: G,
356
+ className: K,
341
357
  children: [
342
- n("relationships.detail.addEntitlementModal.nameLabel", "Name"),
358
+ r("relationships.detail.addEntitlementModal.nameLabel", "Name"),
343
359
  " ",
344
- /* @__PURE__ */ V("span", {
360
+ /* @__PURE__ */ H("span", {
345
361
  className: "text-status-error-text",
346
362
  children: "*"
347
363
  })
348
364
  ]
349
- }), /* @__PURE__ */ V("input", {
365
+ }), /* @__PURE__ */ H("input", {
366
+ ...y("ent-name"),
350
367
  id: "ent-name",
351
368
  type: "text",
352
- value: i,
353
- onChange: (e) => a(e.target.value),
354
- placeholder: n("relationships.detail.addEntitlementModal.namePlaceholder", "e.g. Seats, API calls, Priority support"),
355
- className: W,
369
+ value: a,
370
+ onChange: (e) => s(e.target.value),
371
+ placeholder: r("relationships.detail.addEntitlementModal.namePlaceholder", "e.g. Seats, API calls, Priority support"),
372
+ className: G,
356
373
  required: !0
357
374
  })] }),
358
- /* @__PURE__ */ H("div", {
375
+ /* @__PURE__ */ U("div", {
359
376
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
360
377
  children: [
361
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
378
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
362
379
  htmlFor: "ent-type",
363
- className: G,
364
- children: n("relationships.detail.addEntitlementModal.typeLabel", "Type")
365
- }), /* @__PURE__ */ V("select", {
380
+ className: K,
381
+ children: r("relationships.detail.addEntitlementModal.typeLabel", "Type")
382
+ }), /* @__PURE__ */ H("select", {
383
+ ...y("ent-type"),
366
384
  id: "ent-type",
367
- value: o,
368
- onChange: (e) => s(e.target.value),
369
- className: W,
370
- children: q.map((e) => /* @__PURE__ */ V("option", {
385
+ value: c,
386
+ onChange: (e) => l(e.target.value),
387
+ className: G,
388
+ children: J.map((e) => /* @__PURE__ */ H("option", {
371
389
  value: e,
372
390
  children: e.replace(/_/g, " ")
373
391
  }, e))
374
392
  })] }),
375
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
393
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
376
394
  htmlFor: "ent-quota",
377
- className: G,
378
- children: n("relationships.detail.addEntitlementModal.quotaLabel", "Quota")
379
- }), /* @__PURE__ */ V("input", {
395
+ className: K,
396
+ children: r("relationships.detail.addEntitlementModal.quotaLabel", "Quota")
397
+ }), /* @__PURE__ */ H("input", {
398
+ ...y("ent-quota"),
380
399
  id: "ent-quota",
381
400
  type: "number",
382
401
  min: "0",
383
402
  value: u,
384
403
  onChange: (e) => d(e.target.value),
385
- placeholder: n("relationships.detail.addEntitlementModal.quotaPlaceholder", "e.g. 5"),
386
- className: W
404
+ placeholder: r("relationships.detail.addEntitlementModal.quotaPlaceholder", "e.g. 5"),
405
+ className: G
387
406
  })] }),
388
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
407
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
389
408
  htmlFor: "ent-unit",
390
- className: G,
391
- children: n("relationships.detail.addEntitlementModal.unitLabel", "Unit")
392
- }), /* @__PURE__ */ V("input", {
409
+ className: K,
410
+ children: r("relationships.detail.addEntitlementModal.unitLabel", "Unit")
411
+ }), /* @__PURE__ */ H("input", {
412
+ ...y("ent-unit"),
393
413
  id: "ent-unit",
394
414
  type: "text",
395
415
  value: f,
396
416
  onChange: (e) => p(e.target.value),
397
- placeholder: n("relationships.detail.addEntitlementModal.unitPlaceholder", "e.g. seats, GB"),
398
- className: W
417
+ placeholder: r("relationships.detail.addEntitlementModal.unitPlaceholder", "e.g. seats, GB"),
418
+ className: G
399
419
  })] })
400
420
  ]
401
421
  }),
402
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
422
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
403
423
  htmlFor: "ent-desc",
404
- className: G,
405
- children: n("relationships.detail.addEntitlementModal.descriptionLabel", "Description")
406
- }), /* @__PURE__ */ V("textarea", {
424
+ className: K,
425
+ children: r("relationships.detail.addEntitlementModal.descriptionLabel", "Description")
426
+ }), /* @__PURE__ */ H("textarea", {
427
+ ...y("ent-desc"),
407
428
  id: "ent-desc",
408
429
  value: m,
409
- onChange: (e) => h(e.target.value),
430
+ onChange: (e) => g(e.target.value),
410
431
  rows: 2,
411
- className: W
432
+ className: G
412
433
  })] }),
413
- /* @__PURE__ */ H("div", {
434
+ /* @__PURE__ */ U("div", {
414
435
  className: "flex justify-end gap-3",
415
- children: [/* @__PURE__ */ V("button", {
436
+ children: [/* @__PURE__ */ H("button", {
416
437
  type: "button",
417
- onClick: t,
438
+ onClick: n,
418
439
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
419
- children: n("relationships.detail.addEntitlementModal.cancel", "Cancel")
420
- }), /* @__PURE__ */ V("button", {
440
+ children: r("relationships.detail.addEntitlementModal.cancel", "Cancel")
441
+ }), /* @__PURE__ */ H("button", {
421
442
  type: "submit",
422
- disabled: r.isPending,
443
+ disabled: i.isPending,
423
444
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
424
- children: r.isPending ? n("relationships.detail.addEntitlementModal.adding", "Adding…") : n("relationships.detail.addEntitlementModal.submit", "Add entitlement")
445
+ children: i.isPending ? r("relationships.detail.addEntitlementModal.adding", "Adding…") : r("relationships.detail.addEntitlementModal.submit", "Add entitlement")
425
446
  })]
426
447
  })
427
448
  ]
428
449
  })
429
450
  });
430
451
  }
431
- function me({ relationshipId: e, onClose: t }) {
432
- let n = l(), r = _(), { uploadFile: i, progress: a, isUploading: o } = D(), [s, u] = j(""), [d, f] = j("RECEIPT"), [p, m] = j(null), [h, g] = j(""), [v, y] = j(null), b = o || r.isPending;
433
- return /* @__PURE__ */ V(c, {
434
- title: n("relationships.detail.attachAssetModal.title", "Attach asset"),
435
- onClose: t,
436
- children: /* @__PURE__ */ H("form", {
437
- onSubmit: async (a) => {
438
- if (a.preventDefault(), y(null), !p) {
439
- y(n("relationships.detail.attachAssetModal.chooseFile", "Choose a file to attach."));
452
+ function de({ relationshipId: e, onClose: n }) {
453
+ let r = t(), i = m(), { uploadFile: a, progress: s, isUploading: c } = w(), [l, u] = k(""), [d, f] = k("RECEIPT"), [p, h] = k(null), [g, _] = k(""), [v, y, b, x] = E(), S = c || i.isPending;
454
+ return /* @__PURE__ */ H(o, {
455
+ title: r("relationships.detail.attachAssetModal.title", "Attach asset"),
456
+ onClose: n,
457
+ children: /* @__PURE__ */ U("form", {
458
+ onSubmit: async (t) => {
459
+ if (t.preventDefault(), y(null), !p) {
460
+ y(r("relationships.detail.attachAssetModal.chooseFile", "Choose a file to attach."), "asset-file");
440
461
  return;
441
462
  }
442
463
  try {
443
- let { fileId: n, fileName: a } = await i(p);
444
- await r.mutateAsync({
464
+ let { fileId: t, fileName: r } = await a(p);
465
+ await i.mutateAsync({
445
466
  relationshipId: e,
446
- name: s.trim() || a,
467
+ name: l.trim() || r,
447
468
  type: d,
448
- fileId: n,
449
- ...h ? { expiresAt: new Date(h).toISOString() } : {}
450
- }), t();
469
+ fileId: t,
470
+ ...g ? { expiresAt: new Date(g).toISOString() } : {}
471
+ }), n();
451
472
  } catch (e) {
452
- y(e instanceof Error ? e.message : n("relationships.detail.attachAssetModal.error", "Could not attach the asset."));
473
+ y(e instanceof Error ? e.message : r("relationships.detail.attachAssetModal.error", "Could not attach the asset."));
453
474
  }
454
475
  },
455
476
  className: "space-y-4",
456
477
  children: [
457
- v && /* @__PURE__ */ V("div", {
478
+ v && /* @__PURE__ */ H("div", {
479
+ id: x,
480
+ tabIndex: -1,
481
+ role: "alert",
458
482
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
459
483
  children: v
460
484
  }),
461
- /* @__PURE__ */ H("div", { children: [
462
- /* @__PURE__ */ H("label", {
485
+ /* @__PURE__ */ U("div", { children: [
486
+ /* @__PURE__ */ U("label", {
463
487
  htmlFor: "asset-file",
464
- className: G,
488
+ className: K,
465
489
  children: [
466
- n("relationships.detail.attachAssetModal.fileLabel", "File"),
490
+ r("relationships.detail.attachAssetModal.fileLabel", "File"),
467
491
  " ",
468
- /* @__PURE__ */ V("span", {
492
+ /* @__PURE__ */ H("span", {
469
493
  className: "text-status-error-text",
470
494
  children: "*"
471
495
  })
472
496
  ]
473
497
  }),
474
- /* @__PURE__ */ V("input", {
498
+ /* @__PURE__ */ H("input", {
499
+ ...b("asset-file"),
475
500
  id: "asset-file",
476
501
  type: "file",
477
502
  onChange: (e) => {
478
503
  let t = e.target.files?.[0] ?? null;
479
- m(t), t && !s.trim() && u(t.name);
504
+ h(t), t && !l.trim() && u(t.name);
480
505
  },
481
- className: "w-full text-sm text-text-secondary file:mr-3 file:rounded-lg file:border file:border-border-subtle file:bg-bg-surface file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-text-primary hover:file:bg-bg-sunken"
506
+ className: "w-full text-sm text-text-secondary file:me-3 file:rounded-lg file:border file:border-border-subtle file:bg-bg-surface file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-text-primary hover:file:bg-bg-sunken"
482
507
  }),
483
- /* @__PURE__ */ V("p", {
508
+ /* @__PURE__ */ H("p", {
484
509
  className: "mt-1 text-xs text-text-secondary",
485
- children: n("relationships.detail.attachAssetModal.fileHint", "Stored securely in files — only a reference is kept here.")
510
+ children: r("relationships.detail.attachAssetModal.fileHint", "Stored securely in files — only a reference is kept here.")
486
511
  })
487
512
  ] }),
488
- /* @__PURE__ */ H("div", {
513
+ /* @__PURE__ */ U("div", {
489
514
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
490
- children: [/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
515
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
491
516
  htmlFor: "asset-name",
492
- className: G,
493
- children: n("relationships.detail.attachAssetModal.nameLabel", "Name")
494
- }), /* @__PURE__ */ V("input", {
517
+ className: K,
518
+ children: r("relationships.detail.attachAssetModal.nameLabel", "Name")
519
+ }), /* @__PURE__ */ H("input", {
520
+ ...b("asset-name"),
495
521
  id: "asset-name",
496
522
  type: "text",
497
- value: s,
523
+ value: l,
498
524
  onChange: (e) => u(e.target.value),
499
- placeholder: n("relationships.detail.attachAssetModal.namePlaceholder", "Defaults to the file name"),
500
- className: W
501
- })] }), /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
525
+ placeholder: r("relationships.detail.attachAssetModal.namePlaceholder", "Defaults to the file name"),
526
+ className: G
527
+ })] }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
502
528
  htmlFor: "asset-type",
503
- className: G,
504
- children: n("relationships.detail.attachAssetModal.typeLabel", "Type")
505
- }), /* @__PURE__ */ V("select", {
529
+ className: K,
530
+ children: r("relationships.detail.attachAssetModal.typeLabel", "Type")
531
+ }), /* @__PURE__ */ H("select", {
532
+ ...b("asset-type"),
506
533
  id: "asset-type",
507
534
  value: d,
508
535
  onChange: (e) => f(e.target.value),
509
- className: W,
510
- children: J.map((e) => /* @__PURE__ */ V("option", {
536
+ className: G,
537
+ children: Y.map((e) => /* @__PURE__ */ H("option", {
511
538
  value: e,
512
539
  children: e.replace(/_/g, " ")
513
540
  }, e))
514
541
  })] })]
515
542
  }),
516
- /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
543
+ /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("label", {
517
544
  htmlFor: "asset-expires",
518
- className: G,
519
- children: n("relationships.detail.attachAssetModal.expiresOnLabel", "Expires on")
520
- }), /* @__PURE__ */ V("input", {
545
+ className: K,
546
+ children: r("relationships.detail.attachAssetModal.expiresOnLabel", "Expires on")
547
+ }), /* @__PURE__ */ H("input", {
548
+ ...b("asset-expires"),
521
549
  id: "asset-expires",
522
550
  type: "date",
523
- value: h,
524
- onChange: (e) => g(e.target.value),
525
- className: W
551
+ value: g,
552
+ onChange: (e) => _(e.target.value),
553
+ className: G
526
554
  })] }),
527
- o && /* @__PURE__ */ V("p", {
555
+ c && /* @__PURE__ */ H("p", {
528
556
  className: "text-xs text-text-secondary",
529
- children: n("relationships.detail.attachAssetModal.uploading", "Uploading… {{progress}}%", { progress: a })
557
+ children: r("relationships.detail.attachAssetModal.uploading", "Uploading… {{progress}}%", { progress: s })
530
558
  }),
531
- /* @__PURE__ */ H("div", {
559
+ /* @__PURE__ */ U("div", {
532
560
  className: "flex justify-end gap-3",
533
- children: [/* @__PURE__ */ V("button", {
561
+ children: [/* @__PURE__ */ H("button", {
534
562
  type: "button",
535
- onClick: t,
563
+ onClick: n,
536
564
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
537
- children: n("relationships.detail.attachAssetModal.cancel", "Cancel")
538
- }), /* @__PURE__ */ V("button", {
565
+ children: r("relationships.detail.attachAssetModal.cancel", "Cancel")
566
+ }), /* @__PURE__ */ H("button", {
539
567
  type: "submit",
540
- disabled: b,
568
+ disabled: S,
541
569
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
542
- children: b ? n("relationships.detail.attachAssetModal.attaching", "Attaching…") : n("relationships.detail.attachAssetModal.submit", "Attach asset")
570
+ children: S ? r("relationships.detail.attachAssetModal.attaching", "Attaching…") : r("relationships.detail.attachAssetModal.submit", "Attach asset")
543
571
  })]
544
572
  })
545
573
  ]
546
574
  })
547
575
  });
548
576
  }
549
- function he({ asset: e }) {
550
- let t = l(), n = b(), [a, o] = j(!1);
551
- return /* @__PURE__ */ H("div", {
577
+ function fe({ asset: e }) {
578
+ let { formatDate: r, formatEnumLabel: i } = n(), a = t(), o = _(), [s, c] = k(!1);
579
+ return /* @__PURE__ */ U("div", {
552
580
  className: "flex items-center justify-between gap-3 p-3",
553
- children: [/* @__PURE__ */ H("div", {
581
+ children: [/* @__PURE__ */ U("div", {
554
582
  className: "flex min-w-0 items-center gap-2",
555
- children: [/* @__PURE__ */ V(R, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ H("div", {
583
+ children: [/* @__PURE__ */ H(R, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ U("div", {
556
584
  className: "min-w-0",
557
- children: [/* @__PURE__ */ V("p", {
585
+ children: [/* @__PURE__ */ H("p", {
558
586
  className: "truncate text-sm font-medium text-text-primary",
559
587
  children: e.name
560
- }), /* @__PURE__ */ V("p", {
588
+ }), /* @__PURE__ */ H("p", {
561
589
  className: "text-xs text-text-secondary",
562
590
  children: i(e.type)
563
591
  })]
564
592
  })]
565
- }), /* @__PURE__ */ H("div", {
593
+ }), /* @__PURE__ */ U("div", {
566
594
  className: "flex shrink-0 items-center gap-3",
567
- children: [e.expiresAt && /* @__PURE__ */ V("span", {
595
+ children: [e.expiresAt && /* @__PURE__ */ H("span", {
568
596
  className: "text-xs text-text-secondary",
569
- children: t("relationships.detail.assetRow.expires", "Expires {{date}}", { date: r(e.expiresAt) })
570
- }), e.file?.id && /* @__PURE__ */ H("button", {
597
+ children: a("relationships.detail.assetRow.expires", "Expires {{date}}", { date: r(e.expiresAt) })
598
+ }), e.file?.id && /* @__PURE__ */ U("button", {
571
599
  type: "button",
572
600
  onClick: async () => {
573
601
  if (e.file?.id) {
574
- o(!0);
602
+ c(!0);
575
603
  try {
576
- let t = await n(e.file.id);
604
+ let t = await o(e.file.id);
577
605
  window.open(t, "_blank", "noopener,noreferrer");
578
606
  } catch {} finally {
579
- o(!1);
607
+ c(!1);
580
608
  }
581
609
  }
582
610
  },
583
- disabled: a,
611
+ disabled: s,
584
612
  className: "inline-flex items-center gap-1 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
585
613
  children: [
586
- /* @__PURE__ */ V(L, { className: "h-3.5 w-3.5" }),
614
+ /* @__PURE__ */ H(I, { className: "h-3.5 w-3.5" }),
587
615
  " ",
588
- a ? t("relationships.detail.assetRow.opening", "Opening…") : t("relationships.detail.assetRow.download", "Download")
616
+ s ? a("relationships.detail.assetRow.opening", "Opening…") : a("relationships.detail.assetRow.download", "Download")
589
617
  ]
590
618
  })]
591
619
  })]
592
620
  });
593
621
  }
594
- function ge({ invoice: e }) {
595
- let t = l(), a = e.number ?? t("relationships.detail.invoiceRow.unnumbered", "Unnumbered invoice");
596
- return /* @__PURE__ */ H("div", {
622
+ function pe({ invoice: e }) {
623
+ let { formatCurrency: r, formatDate: i, formatEnumLabel: a } = n(), o = t(), s = e.number ?? o("relationships.detail.invoiceRow.unnumbered", "Unnumbered invoice");
624
+ return /* @__PURE__ */ U("div", {
597
625
  className: "flex items-center justify-between gap-3 p-3",
598
- children: [/* @__PURE__ */ H("div", {
626
+ children: [/* @__PURE__ */ U("div", {
599
627
  className: "flex min-w-0 items-center gap-2",
600
- children: [/* @__PURE__ */ V(I, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ H("div", {
628
+ children: [/* @__PURE__ */ H(F, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ U("div", {
601
629
  className: "min-w-0",
602
- children: [/* @__PURE__ */ V("p", {
630
+ children: [/* @__PURE__ */ H("p", {
603
631
  className: "truncate text-sm font-medium text-text-primary",
604
- children: a
605
- }), /* @__PURE__ */ H("p", {
632
+ children: s
633
+ }), /* @__PURE__ */ U("p", {
606
634
  className: "text-xs text-text-secondary",
607
- children: [i(e.status), e.dueDate ? ` · ${t("relationships.detail.invoiceRow.due", "due {{date}}", { date: r(e.dueDate) })}` : e.issueDate ? ` · ${r(e.issueDate)}` : ""]
635
+ children: [a(e.status), e.dueDate ? ` · ${o("relationships.detail.invoiceRow.due", "due {{date}}", { date: i(e.dueDate) })}` : e.issueDate ? ` · ${i(e.issueDate)}` : ""]
608
636
  })]
609
637
  })]
610
- }), /* @__PURE__ */ V("span", {
638
+ }), /* @__PURE__ */ H("span", {
611
639
  className: "shrink-0 text-sm font-medium tabular-nums text-text-primary",
612
- children: n(e.total, e.currency)
640
+ children: r(e.total, e.currency)
613
641
  })]
614
642
  });
615
643
  }
616
- function Z() {
617
- let c = l(), { id: _ } = se(), { navigateTo: v } = e(), { data: b, isLoading: S, isError: C, refetch: E } = w(_), D = T(), L = g(), [R, z] = j(null), [B, W] = j(!1), [G, K] = j(!1), [q, J] = j(!1), de = x({
618
- relationshipId: _,
644
+ function me() {
645
+ let { formatCurrency: o, formatDate: m, formatEnumLabel: h, formatIntervalSuffix: _ } = n(), y = t(), { id: b } = ie(), { navigateTo: C } = e(), { data: w, isLoading: E, isError: I, refetch: R } = x(b), z = S(), B = p(), [G, K] = k(null), [q, J] = k(!1), [Y, Z] = k(!1), [me, Q] = k(!1), he = v({
646
+ relationshipId: b,
619
647
  pagination: {
620
648
  limit: 50,
621
649
  offset: 0
622
650
  }
623
- }, { enabled: !!_ }), Z = y({
624
- relationshipId: _,
651
+ }, { enabled: !!b }), ge = g({
652
+ relationshipId: b,
625
653
  status: "PROPOSED"
626
- }, { enabled: !!_ });
627
- if (S) return /* @__PURE__ */ V(t, {
628
- title: c("relationships.title", "Relationship"),
629
- children: /* @__PURE__ */ V(d, { label: c("relationships.detail.loading", "Loading relationship…") })
654
+ }, { enabled: !!b });
655
+ if (E) return /* @__PURE__ */ H(r, {
656
+ title: y("relationships.title", "Relationship"),
657
+ children: /* @__PURE__ */ H(c, { label: y("relationships.detail.loading", "Loading relationship…") })
630
658
  });
631
- if (C) return /* @__PURE__ */ V(t, {
632
- title: c("relationships.title", "Relationship"),
633
- children: /* @__PURE__ */ V(u, {
634
- message: c("relationships.detail.error", "Could not load this relationship."),
635
- onRetry: () => void E()
659
+ if (I) return /* @__PURE__ */ H(r, {
660
+ title: y("relationships.title", "Relationship"),
661
+ children: /* @__PURE__ */ H(s, {
662
+ message: y("relationships.detail.error", "Could not load this relationship."),
663
+ onRetry: () => void R()
636
664
  })
637
665
  });
638
- if (!b) return /* @__PURE__ */ V(t, {
639
- title: c("relationships.title", "Relationship"),
640
- children: /* @__PURE__ */ V(s, {
666
+ if (!w) return /* @__PURE__ */ H(r, {
667
+ title: y("relationships.title", "Relationship"),
668
+ children: /* @__PURE__ */ H(a, {
641
669
  illustration: "empty-data",
642
- title: c("relationships.detail.notFoundTitle", "Relationship not found"),
643
- description: c("relationships.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
644
- action: /* @__PURE__ */ V("button", {
670
+ title: y("relationships.detail.notFoundTitle", "Relationship not found"),
671
+ description: y("relationships.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
672
+ action: /* @__PURE__ */ H("button", {
645
673
  type: "button",
646
- onClick: () => v("/relationships"),
674
+ onClick: () => C("/relationships"),
647
675
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
648
- children: c("relationships.detail.backToRelationships", "Back to relationships")
676
+ children: y("relationships.detail.backToRelationships", "Back to relationships")
649
677
  })
650
678
  })
651
679
  });
652
- let Q = b, _e = D.isPending || L.isPending, ve = (e) => {
653
- z(null), D.mutate({
654
- id: Q.id,
680
+ let $ = w, _e = z.isPending || B.isPending, ve = (e) => {
681
+ K(null), z.mutate({
682
+ id: $.id,
655
683
  status: e
656
- }, { onError: (e) => z(e instanceof Error ? e.message : c("relationships.detail.transitionError", "Transition failed")) });
684
+ }, { onError: (e) => K(e instanceof Error ? e.message : y("relationships.detail.transitionError", "Transition failed")) });
657
685
  }, ye = () => {
658
- z(null), L.mutate(Q.id, { onError: (e) => z(e instanceof Error ? e.message : c("relationships.detail.cancelError", "Cancel failed")) });
659
- }, be = [...Q.renewalEvents ?? []].sort((e, t) => new Date(e.occursAt).getTime() - new Date(t.occursAt).getTime()).map((e) => {
660
- let t = new Date(e.occursAt).getTime(), a = !Number.isNaN(t) && t > Date.now();
686
+ K(null), B.mutate($.id, { onError: (e) => K(e instanceof Error ? e.message : y("relationships.detail.cancelError", "Cancel failed")) });
687
+ }, be = [...$.renewalEvents ?? []].sort((e, t) => new Date(e.occursAt).getTime() - new Date(t.occursAt).getTime()).map((e) => {
688
+ let t = new Date(e.occursAt).getTime(), n = !Number.isNaN(t) && t > Date.now();
661
689
  return {
662
- title: i(e.eventType),
663
- sub: `${r(e.occursAt)}${e.detail ? ` · ${e.detail}` : ""}`,
664
- meta: e.amount == null ? void 0 : n(e.amount, e.currency ?? Q.currency),
665
- tone: a ? "warning" : "muted"
690
+ title: h(e.eventType),
691
+ sub: `${m(e.occursAt)}${e.detail ? ` · ${e.detail}` : ""}`,
692
+ meta: e.amount == null ? void 0 : o(e.amount, e.currency ?? $.currency),
693
+ tone: n ? "warning" : "muted"
666
694
  };
667
- }), xe = Q.autoRenew ? /* @__PURE__ */ V("span", {
695
+ }), xe = $.autoRenew ? /* @__PURE__ */ H("span", {
668
696
  className: "inline-flex items-center rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-xs font-medium text-status-success-text",
669
- children: c("relationships.detail.autoRenewOn", "On")
670
- }) : /* @__PURE__ */ V("span", {
697
+ children: y("relationships.detail.autoRenewOn", "On")
698
+ }) : /* @__PURE__ */ H("span", {
671
699
  className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
672
- children: c("relationships.detail.autoRenewOff", "Off")
673
- }), Se = le.filter((e) => O(Q.status, e.status)), $ = Q.plan?.features ?? [];
674
- return /* @__PURE__ */ H(t, {
675
- title: Q.label,
676
- description: Q.provider?.name ?? c(Y[Q.kind], i(Q.kind)),
677
- actions: /* @__PURE__ */ H("div", {
700
+ children: y("relationships.detail.autoRenewOff", "Off")
701
+ }), Se = se.filter((e) => T($.status, e.status)), Ce = $.plan?.features ?? [];
702
+ return /* @__PURE__ */ U(r, {
703
+ title: $.label,
704
+ description: $.provider?.name ?? y(oe[$.kind], h($.kind)),
705
+ actions: /* @__PURE__ */ U("div", {
678
706
  className: "flex items-center gap-2",
679
707
  children: [
680
- /* @__PURE__ */ H("button", {
708
+ /* @__PURE__ */ U("button", {
681
709
  type: "button",
682
- onClick: () => W(!0),
710
+ onClick: () => J(!0),
683
711
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
684
712
  children: [
685
- /* @__PURE__ */ V(ne, { className: "h-4 w-4" }),
713
+ /* @__PURE__ */ H(ee, { className: "h-4 w-4" }),
686
714
  " ",
687
- c("relationships.detail.edit", "Edit")
715
+ y("relationships.detail.edit", "Edit")
688
716
  ]
689
717
  }),
690
- /* @__PURE__ */ H("button", {
718
+ /* @__PURE__ */ U("button", {
691
719
  type: "button",
692
720
  "data-testid": "negotiate-bill",
693
- onClick: () => v(`/negotiations/new?relationshipId=${encodeURIComponent(Q.id)}`),
721
+ onClick: () => C(`/negotiations/new?relationshipId=${encodeURIComponent($.id)}`),
694
722
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
695
723
  children: [
696
- /* @__PURE__ */ V(te, { className: "h-4 w-4" }),
724
+ /* @__PURE__ */ H(L, { className: "h-4 w-4" }),
697
725
  " ",
698
- c("relationships.detail.negotiate", "Negotiate this bill")
726
+ y("relationships.detail.negotiate", "Negotiate this bill")
699
727
  ]
700
728
  }),
701
- /* @__PURE__ */ H("button", {
729
+ /* @__PURE__ */ U("button", {
702
730
  type: "button",
703
731
  "data-testid": "request-procurement",
704
- onClick: () => v(`/procurement/new?relationshipId=${encodeURIComponent(Q.id)}`),
732
+ onClick: () => C(`/procurement/new?relationshipId=${encodeURIComponent($.id)}`),
705
733
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
706
734
  children: [
707
- /* @__PURE__ */ V(P, { className: "h-4 w-4" }),
735
+ /* @__PURE__ */ H(N, { className: "h-4 w-4" }),
708
736
  " ",
709
- c("relationships.detail.procurement", "Ask an expert to negotiate")
737
+ y("relationships.detail.procurement", "Ask an expert to negotiate")
710
738
  ]
711
739
  }),
712
- /* @__PURE__ */ H("button", {
740
+ /* @__PURE__ */ U("button", {
713
741
  type: "button",
714
- onClick: () => v("/relationships"),
742
+ onClick: () => C("/relationships"),
715
743
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
716
744
  children: [
717
- /* @__PURE__ */ V(ee, { className: "h-4 w-4" }),
745
+ /* @__PURE__ */ H(j, { className: "rtl:rotate-180 h-4 w-4" }),
718
746
  " ",
719
- c("relationships.detail.back", "Back")
747
+ y("relationships.detail.back", "Back")
720
748
  ]
721
749
  })
722
750
  ]
723
751
  }),
724
752
  children: [
725
- /* @__PURE__ */ V(U, {
753
+ /* @__PURE__ */ H(W, {
726
754
  treatment: "glass",
727
755
  glow: !0,
728
756
  className: "p-5 sm:p-6",
729
- children: /* @__PURE__ */ H("div", {
757
+ children: /* @__PURE__ */ U("div", {
730
758
  className: "flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between",
731
- children: [/* @__PURE__ */ H("div", {
759
+ children: [/* @__PURE__ */ U("div", {
732
760
  className: "min-w-0",
733
761
  children: [
734
- /* @__PURE__ */ V("p", {
762
+ /* @__PURE__ */ H("p", {
735
763
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
736
- children: c(Y[Q.kind], i(Q.kind))
764
+ children: y(oe[$.kind], h($.kind))
737
765
  }),
738
- /* @__PURE__ */ H("div", {
766
+ /* @__PURE__ */ U("div", {
739
767
  className: "mt-2 flex flex-wrap items-center gap-3",
740
- children: [/* @__PURE__ */ H("span", {
768
+ children: [/* @__PURE__ */ U("span", {
741
769
  className: "text-3xl font-bold tabular-nums text-text-primary",
742
- children: [n(Q.amount, Q.currency), /* @__PURE__ */ V("span", {
770
+ children: [o($.amount, $.currency), /* @__PURE__ */ H("span", {
743
771
  className: "text-base font-normal text-text-secondary",
744
- children: a(Q.interval)
772
+ children: _($.interval)
745
773
  })]
746
- }), /* @__PURE__ */ V(o, { status: Q.status })]
774
+ }), /* @__PURE__ */ H(i, { status: $.status })]
747
775
  }),
748
- /* @__PURE__ */ H("div", {
776
+ /* @__PURE__ */ U("div", {
749
777
  className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-text-secondary",
750
778
  children: [
751
- /* @__PURE__ */ H("span", {
779
+ /* @__PURE__ */ U("span", {
752
780
  className: "inline-flex items-center gap-1.5",
753
- children: [/* @__PURE__ */ V(F, { className: "h-3.5 w-3.5" }), Q.renewsAt ? c("relationships.detail.renews", "Renews {{date}}", { date: r(Q.renewsAt) }) : c("relationships.detail.noRenewalScheduled", "No renewal scheduled")]
781
+ children: [/* @__PURE__ */ H(P, { className: "h-3.5 w-3.5" }), $.renewsAt ? y("relationships.detail.renews", "Renews {{date}}", { date: m($.renewsAt) }) : y("relationships.detail.noRenewalScheduled", "No renewal scheduled")]
754
782
  }),
755
- /* @__PURE__ */ H("span", {
783
+ /* @__PURE__ */ U("span", {
756
784
  className: "inline-flex items-center gap-1.5",
757
- children: [/* @__PURE__ */ V(ie, { className: "h-3.5 w-3.5" }), i(Q.discoverySource)]
785
+ children: [/* @__PURE__ */ H(te, { className: "h-3.5 w-3.5" }), h($.discoverySource)]
758
786
  }),
759
- /* @__PURE__ */ H("span", {
787
+ /* @__PURE__ */ U("span", {
760
788
  className: "inline-flex items-center gap-1.5",
761
789
  children: [
762
- c("relationships.detail.autoRenew", "Auto-renew"),
790
+ y("relationships.detail.autoRenew", "Auto-renew"),
763
791
  " ",
764
792
  xe
765
793
  ]
766
794
  })
767
795
  ]
768
796
  }),
769
- Q.tags.length > 0 && /* @__PURE__ */ H("div", {
797
+ $.tags.length > 0 && /* @__PURE__ */ U("div", {
770
798
  className: "mt-3 flex flex-wrap items-center gap-2",
771
- children: [/* @__PURE__ */ V(ae, { className: "h-3.5 w-3.5 text-text-secondary" }), Q.tags.map((e) => /* @__PURE__ */ V("span", {
799
+ children: [/* @__PURE__ */ H(ne, { className: "h-3.5 w-3.5 text-text-secondary" }), $.tags.map((e) => /* @__PURE__ */ H("span", {
772
800
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
773
801
  children: e
774
802
  }, e))]
775
803
  })
776
804
  ]
777
- }), /* @__PURE__ */ H("div", {
805
+ }), /* @__PURE__ */ U("div", {
778
806
  className: "grid shrink-0 grid-cols-2 gap-2 sm:flex sm:flex-wrap lg:flex-col lg:items-stretch",
779
807
  children: [Se.map((e) => {
780
808
  let t = e.icon;
781
- return /* @__PURE__ */ H("button", {
809
+ return /* @__PURE__ */ U("button", {
782
810
  type: "button",
783
811
  disabled: _e,
784
812
  onClick: () => ve(e.status),
785
813
  className: "inline-flex min-h-11 items-center justify-center gap-1.5 rounded-lg border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm sm:min-h-0 sm:text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
786
814
  children: [
787
- /* @__PURE__ */ V(t, { className: "h-3.5 w-3.5" }),
815
+ /* @__PURE__ */ H(t, { className: "h-3.5 w-3.5" }),
788
816
  " ",
789
- c(e.labelKey, e.defaultLabel)
817
+ y(e.labelKey, e.defaultLabel)
790
818
  ]
791
819
  }, e.status);
792
- }), O(Q.status, "CANCELLED") && /* @__PURE__ */ H("button", {
820
+ }), T($.status, "CANCELLED") && /* @__PURE__ */ U("button", {
793
821
  type: "button",
794
822
  disabled: _e,
795
823
  onClick: ye,
796
824
  className: "inline-flex min-h-11 items-center justify-center gap-1.5 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-3 py-1.5 text-sm sm:min-h-0 sm:text-xs font-medium text-status-error-text hover:opacity-90 disabled:opacity-50",
797
825
  children: [
798
- /* @__PURE__ */ V(N, { className: "h-3.5 w-3.5" }),
826
+ /* @__PURE__ */ H(M, { className: "h-3.5 w-3.5" }),
799
827
  " ",
800
- c("relationships.detail.actions.cancel", "Cancel")
828
+ y("relationships.detail.actions.cancel", "Cancel")
801
829
  ]
802
830
  })]
803
831
  })]
804
832
  })
805
833
  }),
806
- R && /* @__PURE__ */ V("div", {
834
+ G && /* @__PURE__ */ H("div", {
807
835
  className: "mt-4 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
808
- children: R
836
+ children: G
809
837
  }),
810
- /* @__PURE__ */ H("div", {
838
+ /* @__PURE__ */ U("div", {
811
839
  className: "mt-6 grid grid-cols-1 gap-4 lg:grid-cols-3",
812
- children: [/* @__PURE__ */ H("div", {
840
+ children: [/* @__PURE__ */ U("div", {
813
841
  className: "space-y-4 lg:col-span-2",
814
842
  children: [
815
- /* @__PURE__ */ H("div", {
843
+ /* @__PURE__ */ U("div", {
816
844
  className: "grid grid-cols-1 gap-4 md:grid-cols-2",
817
- children: [/* @__PURE__ */ H(U, {
845
+ children: [/* @__PURE__ */ U(W, {
818
846
  treatment: "metric",
819
847
  className: "p-5",
820
848
  children: [
821
- /* @__PURE__ */ H("div", {
849
+ /* @__PURE__ */ U("div", {
822
850
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
823
851
  children: [
824
- /* @__PURE__ */ V(I, { className: "h-4 w-4 text-text-secondary" }),
852
+ /* @__PURE__ */ H(F, { className: "h-4 w-4 text-text-secondary" }),
825
853
  " ",
826
- c("relationships.detail.sections.planPricing", "Plan & pricing")
854
+ y("relationships.detail.sections.planPricing", "Plan & pricing")
827
855
  ]
828
856
  }),
829
- /* @__PURE__ */ H("div", {
857
+ /* @__PURE__ */ U("div", {
830
858
  className: "mt-3",
831
859
  children: [
832
- /* @__PURE__ */ V(X, {
833
- label: c("relationships.detail.info.plan", "Plan"),
834
- value: Q.plan?.name ?? "—"
860
+ /* @__PURE__ */ H(X, {
861
+ label: y("relationships.detail.info.plan", "Plan"),
862
+ value: $.plan?.name ?? "—"
835
863
  }),
836
- /* @__PURE__ */ V(X, {
837
- label: c("relationships.detail.info.price", "Price"),
838
- value: /* @__PURE__ */ H(ce, { children: [n(Q.amount, Q.currency), /* @__PURE__ */ V("span", {
864
+ /* @__PURE__ */ H(X, {
865
+ label: y("relationships.detail.info.price", "Price"),
866
+ value: /* @__PURE__ */ U(ae, { children: [o($.amount, $.currency), /* @__PURE__ */ H("span", {
839
867
  className: "font-normal text-text-secondary",
840
- children: a(Q.interval)
868
+ children: _($.interval)
841
869
  })] })
842
870
  }),
843
- /* @__PURE__ */ V(X, {
844
- label: c("relationships.detail.info.billingInterval", "Billing interval"),
845
- value: i(Q.interval)
871
+ /* @__PURE__ */ H(X, {
872
+ label: y("relationships.detail.info.billingInterval", "Billing interval"),
873
+ value: h($.interval)
846
874
  }),
847
- /* @__PURE__ */ V(X, {
848
- label: c("relationships.detail.info.provider", "Provider"),
849
- value: Q.provider?.name ?? "—"
875
+ /* @__PURE__ */ H(X, {
876
+ label: y("relationships.detail.info.provider", "Provider"),
877
+ value: $.provider?.name ?? "—"
850
878
  })
851
879
  ]
852
880
  }),
853
- $.length > 0 && /* @__PURE__ */ V("div", {
881
+ Ce.length > 0 && /* @__PURE__ */ H("div", {
854
882
  className: "mt-3 flex flex-wrap gap-1.5",
855
- children: $.map((e) => /* @__PURE__ */ V("span", {
883
+ children: Ce.map((e) => /* @__PURE__ */ H("span", {
856
884
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
857
885
  children: e
858
886
  }, e))
859
887
  })
860
888
  ]
861
- }), /* @__PURE__ */ H(U, {
889
+ }), /* @__PURE__ */ U(W, {
862
890
  treatment: "metric",
863
891
  className: "p-5",
864
- children: [/* @__PURE__ */ H("div", {
892
+ children: [/* @__PURE__ */ U("div", {
865
893
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
866
894
  children: [
867
- /* @__PURE__ */ V(oe, { className: "h-4 w-4 text-text-secondary" }),
895
+ /* @__PURE__ */ H(re, { className: "h-4 w-4 text-text-secondary" }),
868
896
  " ",
869
- c("relationships.detail.sections.paymentBilling", "Payment & billing")
897
+ y("relationships.detail.sections.paymentBilling", "Payment & billing")
870
898
  ]
871
- }), /* @__PURE__ */ H("div", {
899
+ }), /* @__PURE__ */ U("div", {
872
900
  className: "mt-3",
873
901
  children: [
874
- /* @__PURE__ */ V(X, {
875
- label: c("relationships.detail.info.currency", "Currency"),
876
- value: Q.currency
902
+ /* @__PURE__ */ H(X, {
903
+ label: y("relationships.detail.info.currency", "Currency"),
904
+ value: $.currency
877
905
  }),
878
- /* @__PURE__ */ V(X, {
879
- label: c("relationships.detail.info.autoRenew", "Auto-renew"),
906
+ /* @__PURE__ */ H(X, {
907
+ label: y("relationships.detail.info.autoRenew", "Auto-renew"),
880
908
  value: xe
881
909
  }),
882
- /* @__PURE__ */ V(X, {
883
- label: c("relationships.detail.info.nextRenewal", "Next renewal"),
884
- value: Q.renewsAt ? r(Q.renewsAt) : "—"
910
+ /* @__PURE__ */ H(X, {
911
+ label: y("relationships.detail.info.nextRenewal", "Next renewal"),
912
+ value: $.renewsAt ? m($.renewsAt) : "—"
885
913
  }),
886
- /* @__PURE__ */ V(X, {
887
- label: c("relationships.detail.info.started", "Started"),
888
- value: Q.startedAt ? r(Q.startedAt) : "—"
914
+ /* @__PURE__ */ H(X, {
915
+ label: y("relationships.detail.info.started", "Started"),
916
+ value: $.startedAt ? m($.startedAt) : "—"
889
917
  }),
890
- Q.trialEndsAt && /* @__PURE__ */ V(X, {
891
- label: c("relationships.detail.info.trialEnds", "Trial ends"),
892
- value: r(Q.trialEndsAt)
918
+ $.trialEndsAt && /* @__PURE__ */ H(X, {
919
+ label: y("relationships.detail.info.trialEnds", "Trial ends"),
920
+ value: m($.trialEndsAt)
893
921
  })
894
922
  ]
895
923
  })]
896
924
  })]
897
925
  }),
898
- (Z.data?.items.length ?? 0) > 0 && /* @__PURE__ */ H(f, {
926
+ (ge.data?.items.length ?? 0) > 0 && /* @__PURE__ */ U(l, {
899
927
  className: "mt-0",
900
- title: c("relationships.detail.sections.aiRecommendations", "AI recommendations"),
901
- description: c("relationships.detail.sections.aiRecommendationsDescription", "Open recommendations about this subscription. You can also make any of these changes by hand above."),
902
- children: [/* @__PURE__ */ V(A, { className: "mb-3" }), /* @__PURE__ */ V("div", {
928
+ title: y("relationships.detail.sections.aiRecommendations", "AI recommendations"),
929
+ description: y("relationships.detail.sections.aiRecommendationsDescription", "Open recommendations about this subscription. You can also make any of these changes by hand above."),
930
+ children: [/* @__PURE__ */ H(O, { className: "mb-3" }), /* @__PURE__ */ H("div", {
903
931
  className: "grid grid-cols-1 gap-3",
904
932
  "data-testid": "relationship-decisions",
905
- children: Z.data?.items.map((e) => /* @__PURE__ */ V(k, { decision: e }, e.id))
933
+ children: ge.data?.items.map((e) => /* @__PURE__ */ H(D, { decision: e }, e.id))
906
934
  })]
907
935
  }),
908
- /* @__PURE__ */ V(f, {
936
+ /* @__PURE__ */ H(l, {
909
937
  className: "mt-0",
910
- title: c("relationships.detail.sections.entitlements", "Entitlements"),
911
- description: c("relationships.detail.sections.entitlementsDescription", "What this relationship grants you"),
912
- action: /* @__PURE__ */ H("button", {
938
+ title: y("relationships.detail.sections.entitlements", "Entitlements"),
939
+ description: y("relationships.detail.sections.entitlementsDescription", "What this relationship grants you"),
940
+ action: /* @__PURE__ */ U("button", {
913
941
  type: "button",
914
- onClick: () => K(!0),
942
+ onClick: () => Z(!0),
915
943
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
916
944
  children: [
917
- /* @__PURE__ */ V(re, { className: "h-3.5 w-3.5" }),
945
+ /* @__PURE__ */ H(V, { className: "h-3.5 w-3.5" }),
918
946
  " ",
919
- c("relationships.detail.sections.addEntitlement", "Add entitlement")
947
+ y("relationships.detail.sections.addEntitlement", "Add entitlement")
920
948
  ]
921
949
  }),
922
- children: !Q.entitlements || Q.entitlements.length === 0 ? /* @__PURE__ */ V(s, {
950
+ children: !$.entitlements || $.entitlements.length === 0 ? /* @__PURE__ */ H(a, {
923
951
  illustration: "empty-data",
924
- title: c("relationships.detail.empty.noEntitlementsTitle", "No entitlements"),
925
- description: c("relationships.detail.empty.noEntitlementsDescription", "Entitlements (seats, quotas, feature access) will appear here.")
926
- }) : /* @__PURE__ */ V("div", {
952
+ title: y("relationships.detail.empty.noEntitlementsTitle", "No entitlements"),
953
+ description: y("relationships.detail.empty.noEntitlementsDescription", "Entitlements (seats, quotas, feature access) will appear here.")
954
+ }) : /* @__PURE__ */ H("div", {
927
955
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
928
- children: Q.entitlements.map((e) => {
956
+ children: $.entitlements.map((e) => {
929
957
  let t = e.quota != null && e.quota > 0;
930
- return /* @__PURE__ */ H(U, {
958
+ return /* @__PURE__ */ U(W, {
931
959
  treatment: "plain",
932
960
  className: "p-4",
933
961
  children: [
934
- /* @__PURE__ */ H("div", {
962
+ /* @__PURE__ */ U("div", {
935
963
  className: "flex items-start justify-between gap-2",
936
- children: [/* @__PURE__ */ V("p", {
964
+ children: [/* @__PURE__ */ H("p", {
937
965
  className: "min-w-0 truncate text-sm font-medium text-text-primary",
938
966
  children: e.name
939
- }), /* @__PURE__ */ V(o, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
967
+ }), /* @__PURE__ */ H(i, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
940
968
  }),
941
- /* @__PURE__ */ V("p", {
969
+ /* @__PURE__ */ H("p", {
942
970
  className: "mt-1 text-xs text-text-secondary",
943
- children: i(e.type)
971
+ children: h(e.type)
944
972
  }),
945
- t && /* @__PURE__ */ H("div", {
973
+ t && /* @__PURE__ */ U("div", {
946
974
  className: "mt-3",
947
- children: [/* @__PURE__ */ H("div", {
975
+ children: [/* @__PURE__ */ U("div", {
948
976
  className: "flex items-center justify-between text-xs text-text-secondary",
949
- children: [/* @__PURE__ */ H("span", { children: [
977
+ children: [/* @__PURE__ */ U("span", { children: [
950
978
  e.used,
951
979
  " / ",
952
980
  e.quota,
953
981
  e.unit ? ` ${e.unit}` : ""
954
- ] }), /* @__PURE__ */ H("span", {
982
+ ] }), /* @__PURE__ */ U("span", {
955
983
  className: "tabular-nums",
956
984
  children: [Math.round(e.used / e.quota * 100), "%"]
957
985
  })]
958
- }), /* @__PURE__ */ V(m, {
986
+ }), /* @__PURE__ */ H(d, {
987
+ label: y("common.quotaUtilization", "Quota utilization"),
959
988
  value: e.used,
960
989
  max: e.quota,
961
990
  tone: e.used / e.quota >= .9 ? "negative" : e.used / e.quota >= .7 ? "warning" : "accent",
@@ -967,23 +996,23 @@ function Z() {
967
996
  })
968
997
  })
969
998
  }),
970
- /* @__PURE__ */ V(f, {
999
+ /* @__PURE__ */ H(l, {
971
1000
  className: "mt-0",
972
- title: c("relationships.detail.sections.assets", "Assets"),
973
- description: c("relationships.detail.sections.assetsDescription", "Invoices, contracts, licenses and credentials"),
974
- action: /* @__PURE__ */ H("button", {
1001
+ title: y("relationships.detail.sections.assets", "Assets"),
1002
+ description: y("relationships.detail.sections.assetsDescription", "Invoices, contracts, licenses and credentials"),
1003
+ action: /* @__PURE__ */ U("button", {
975
1004
  type: "button",
976
- onClick: () => J(!0),
1005
+ onClick: () => Q(!0),
977
1006
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
978
1007
  children: [
979
- /* @__PURE__ */ V(re, { className: "h-3.5 w-3.5" }),
1008
+ /* @__PURE__ */ H(V, { className: "h-3.5 w-3.5" }),
980
1009
  " ",
981
- c("relationships.detail.sections.attachAsset", "Attach asset")
1010
+ y("relationships.detail.sections.attachAsset", "Attach asset")
982
1011
  ]
983
1012
  }),
984
1013
  children: (() => {
985
- let e = Q.assets ?? [], t = de.data?.items ?? [];
986
- return e.length > 0 || t.length > 0 ? /* @__PURE__ */ V(U, {
1014
+ let e = $.assets ?? [], t = he.data?.items ?? [];
1015
+ return e.length > 0 || t.length > 0 ? /* @__PURE__ */ H(W, {
987
1016
  treatment: "plain",
988
1017
  className: "divide-y divide-border-subtle p-0",
989
1018
  children: [...e.map((e) => ({
@@ -994,89 +1023,90 @@ function Z() {
994
1023
  kind: "invoice",
995
1024
  sort: new Date(e.createdAt).getTime() || 0,
996
1025
  invoice: e
997
- }))].sort((e, t) => t.sort - e.sort).map((e) => e.kind === "asset" ? /* @__PURE__ */ V(he, { asset: e.asset }, `a-${e.asset.id}`) : /* @__PURE__ */ V(ge, { invoice: e.invoice }, `i-${e.invoice.id}`))
998
- }) : /* @__PURE__ */ V(s, {
1026
+ }))].sort((e, t) => t.sort - e.sort).map((e) => e.kind === "asset" ? /* @__PURE__ */ H(fe, { asset: e.asset }, `a-${e.asset.id}`) : /* @__PURE__ */ H(pe, { invoice: e.invoice }, `i-${e.invoice.id}`))
1027
+ }) : /* @__PURE__ */ H(a, {
999
1028
  illustration: "empty-data",
1000
- title: c("relationships.detail.empty.noAssetsTitle", "No assets attached"),
1001
- description: c("relationships.detail.empty.noAssetsDescription", "Attach invoices, contracts, licenses or receipts to this relationship.")
1029
+ title: y("relationships.detail.empty.noAssetsTitle", "No assets attached"),
1030
+ description: y("relationships.detail.empty.noAssetsDescription", "Attach invoices, contracts, licenses or receipts to this relationship.")
1002
1031
  });
1003
1032
  })()
1004
1033
  }),
1005
- Q.notes && /* @__PURE__ */ H(U, {
1034
+ $.notes && /* @__PURE__ */ U(W, {
1006
1035
  treatment: "plain",
1007
1036
  className: "p-4",
1008
- children: [/* @__PURE__ */ V("p", {
1037
+ children: [/* @__PURE__ */ H("p", {
1009
1038
  className: "text-xs font-medium text-text-secondary",
1010
- children: c("relationships.detail.sections.notes", "Notes")
1011
- }), /* @__PURE__ */ V("p", {
1039
+ children: y("relationships.detail.sections.notes", "Notes")
1040
+ }), /* @__PURE__ */ H("p", {
1012
1041
  className: "mt-1 whitespace-pre-wrap text-sm text-text-primary",
1013
- children: Q.notes
1042
+ children: $.notes
1014
1043
  })]
1015
1044
  })
1016
1045
  ]
1017
- }), /* @__PURE__ */ H("div", {
1046
+ }), /* @__PURE__ */ U("div", {
1018
1047
  className: "space-y-4",
1019
- children: [/* @__PURE__ */ H(U, {
1048
+ children: [/* @__PURE__ */ U(W, {
1020
1049
  treatment: "metric",
1021
1050
  className: "p-5",
1022
- children: [/* @__PURE__ */ H("div", {
1051
+ children: [/* @__PURE__ */ U("div", {
1023
1052
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
1024
1053
  children: [
1025
- /* @__PURE__ */ V(M, { className: "h-4 w-4 text-text-secondary" }),
1054
+ /* @__PURE__ */ H(A, { className: "h-4 w-4 text-text-secondary" }),
1026
1055
  " ",
1027
- c("relationships.detail.sections.healthScore", "Health score")
1056
+ y("relationships.detail.sections.healthScore", "Health score")
1028
1057
  ]
1029
- }), Q.healthScore == null ? /* @__PURE__ */ V("p", {
1058
+ }), $.healthScore == null ? /* @__PURE__ */ H("p", {
1030
1059
  className: "mt-4 text-sm text-text-secondary",
1031
- children: c("relationships.detail.empty.noHealthScore", "Not scored yet. A health score appears once Subscriber Bot has enough signal.")
1032
- }) : /* @__PURE__ */ H("div", {
1060
+ children: y("relationships.detail.empty.noHealthScore", "Not scored yet. A health score appears once Subscriber Bot has enough signal.")
1061
+ }) : /* @__PURE__ */ U("div", {
1033
1062
  className: "mt-4 flex flex-col items-center",
1034
1063
  children: [
1035
- /* @__PURE__ */ V(p, {
1036
- value: Q.healthScore,
1064
+ /* @__PURE__ */ H(u, {
1065
+ value: $.healthScore,
1037
1066
  max: 100,
1038
1067
  size: 160,
1039
- label: c("relationships.detail.outOf100", "of 100")
1068
+ label: y("relationships.detail.outOf100", "of 100")
1040
1069
  }),
1041
- /* @__PURE__ */ V("div", {
1070
+ /* @__PURE__ */ H("div", {
1042
1071
  className: "mt-2 w-full",
1043
- children: /* @__PURE__ */ V(m, {
1044
- value: Q.healthScore,
1072
+ children: /* @__PURE__ */ H(d, {
1073
+ label: y("common.healthScore", "Health score"),
1074
+ value: $.healthScore,
1045
1075
  max: 100,
1046
- tone: ue(Q.healthScore)
1076
+ tone: ce($.healthScore)
1047
1077
  })
1048
1078
  }),
1049
- /* @__PURE__ */ V("p", {
1079
+ /* @__PURE__ */ H("p", {
1050
1080
  className: "mt-3 text-center text-xs text-text-secondary",
1051
1081
  "data-testid": "health-score-basis",
1052
- children: c("relationships.detail.healthScoreBasis", "Computed from usage, payment history, price stability and overlap with your other subscriptions.")
1082
+ children: y("relationships.detail.healthScoreBasis", "Computed from usage, payment history, price stability and overlap with your other subscriptions.")
1053
1083
  })
1054
1084
  ]
1055
1085
  })]
1056
- }), /* @__PURE__ */ H(U, {
1086
+ }), /* @__PURE__ */ U(W, {
1057
1087
  treatment: "metric",
1058
1088
  className: "p-5",
1059
1089
  children: [
1060
- /* @__PURE__ */ H("div", {
1090
+ /* @__PURE__ */ U("div", {
1061
1091
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
1062
1092
  children: [
1063
- /* @__PURE__ */ V(F, { className: "h-4 w-4 text-text-secondary" }),
1093
+ /* @__PURE__ */ H(P, { className: "h-4 w-4 text-text-secondary" }),
1064
1094
  " ",
1065
- c("relationships.detail.sections.renewalTimeline", "Renewal timeline")
1095
+ y("relationships.detail.sections.renewalTimeline", "Renewal timeline")
1066
1096
  ]
1067
1097
  }),
1068
- /* @__PURE__ */ V("p", {
1098
+ /* @__PURE__ */ H("p", {
1069
1099
  className: "mt-0.5 text-xs text-text-secondary",
1070
- children: c("relationships.detail.sections.renewalTimelineDescription", "Detected renewals and price changes")
1100
+ children: y("relationships.detail.sections.renewalTimelineDescription", "Detected renewals and price changes")
1071
1101
  }),
1072
- be.length === 0 ? /* @__PURE__ */ V("div", {
1102
+ be.length === 0 ? /* @__PURE__ */ H("div", {
1073
1103
  className: "mt-4",
1074
- children: /* @__PURE__ */ V(s, {
1104
+ children: /* @__PURE__ */ H(a, {
1075
1105
  illustration: "empty-calendar",
1076
- title: c("relationships.detail.empty.noRenewalEventsTitle", "No renewal events"),
1077
- description: c("relationships.detail.empty.noRenewalEventsDescription", "Renewals and price changes will appear here as they're detected.")
1106
+ title: y("relationships.detail.empty.noRenewalEventsTitle", "No renewal events"),
1107
+ description: y("relationships.detail.empty.noRenewalEventsDescription", "Renewals and price changes will appear here as they're detected.")
1078
1108
  })
1079
- }) : /* @__PURE__ */ V(h, {
1109
+ }) : /* @__PURE__ */ H(f, {
1080
1110
  items: be,
1081
1111
  className: "mt-4"
1082
1112
  })
@@ -1084,22 +1114,22 @@ function Z() {
1084
1114
  })]
1085
1115
  })]
1086
1116
  }),
1087
- B && /* @__PURE__ */ V(fe, {
1088
- relationship: Q,
1089
- onClose: () => W(!1)
1117
+ q && /* @__PURE__ */ H(le, {
1118
+ relationship: $,
1119
+ onClose: () => J(!1)
1090
1120
  }),
1091
- G && /* @__PURE__ */ V(pe, {
1092
- relationshipId: Q.id,
1093
- onClose: () => K(!1)
1121
+ Y && /* @__PURE__ */ H(ue, {
1122
+ relationshipId: $.id,
1123
+ onClose: () => Z(!1)
1094
1124
  }),
1095
- q && /* @__PURE__ */ V(me, {
1096
- relationshipId: Q.id,
1097
- onClose: () => J(!1)
1125
+ me && /* @__PURE__ */ H(de, {
1126
+ relationshipId: $.id,
1127
+ onClose: () => Q(!1)
1098
1128
  })
1099
1129
  ]
1100
1130
  });
1101
1131
  }
1102
1132
  //#endregion
1103
- export { Z as RelationshipDetailPage };
1133
+ export { me as RelationshipDetailPage };
1104
1134
 
1105
1135
  //# sourceMappingURL=RelationshipDetailPage.js.map