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