@burdenoff/microfe-subscriberbot 2026.1030.7 → 2026.1102.1

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