@burdenoff/microfe-billing 2026.1114.6 → 2026.1114.7

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 (32) hide show
  1. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +1 -1
  2. package/dist/billing/modules/addons/pages/AddonDetailPage.js +1 -1
  3. package/dist/billing/modules/addons/pages/AddonEditPage.js +1 -1
  4. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +3 -3
  5. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  6. package/dist/billing/modules/billing/pages/InvoicesListPage.js +176 -168
  7. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  8. package/dist/billing/modules/billing/pages/TransactionsPage.js +117 -111
  9. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  10. package/dist/billing/modules/billing/pages/UserRefundsPage.js +143 -138
  11. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  12. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +132 -126
  13. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  14. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +13 -13
  15. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +24 -24
  16. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  17. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +1 -1
  18. package/dist/billing/modules/plans/pages/PlanEditPage.js +6 -6
  19. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  20. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +35 -35
  21. package/dist/billing/modules/plans/pages/PlansListPage.js +1 -1
  22. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +4 -4
  23. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +4 -4
  24. package/dist/billing/shared/components/BillingHistoryTabs.d.ts +9 -0
  25. package/dist/billing/shared/components/BillingHistoryTabs.js +30 -0
  26. package/dist/billing/shared/components/BillingHistoryTabs.js.map +1 -0
  27. package/dist/billing/shared/components/historyTabs.d.ts +19 -0
  28. package/dist/billing/shared/components/historyTabs.js +32 -0
  29. package/dist/billing/shared/components/historyTabs.js.map +1 -0
  30. package/dist/billing/shared/components/index.d.ts +1 -0
  31. package/dist/billing/shared/components/index.js +2 -1
  32. package/package.json +1 -1
@@ -3,30 +3,32 @@ import { PageHeader as t } from "../../../shared/components/PageHeader.js";
3
3
  import { EmptyState as n } from "../../../shared/components/EmptyState.js";
4
4
  import { ServerError as r } from "../../../shared/components/ServerError.js";
5
5
  import { useBillingPermissions as i } from "../../../hooks/useBillingPermissions.js";
6
- import { formatCurrency as a, formatDateTime as o } from "../../../shared/utils/format.js";
7
- import { useBillingNavigate as s } from "../../../hooks/useBillingNavigate.js";
8
- import { isServerError as c } from "../../../shared/utils/error.js";
6
+ import { useBillingNavigate as a } from "../../../hooks/useBillingNavigate.js";
7
+ import { BillingHistoryTabs as o } from "../../../shared/components/BillingHistoryTabs.js";
9
8
  import "../hooks/index.js";
9
+ import { formatCurrency as s, formatDateTime as c } from "../../../shared/utils/format.js";
10
10
  import { nativeImpact as l, nativeNotify as u, nativeOpenUrl as d } from "../../../../utils/nativeBridge.js";
11
+ import { isServerError as f } from "../../../shared/utils/error.js";
11
12
  import "../../../shared/components/index.js";
13
+ import { useIsFluidgridsVariant as p } from "../../../hooks/useBillingVariant.js";
12
14
  import "../../../shared/utils/index.js";
13
- import { useInvoiceMutations as f } from "../hooks/useInvoices.js";
14
- import { useTransactions as p } from "../hooks/useTransactions.js";
15
- import { getStatusBadgeClasses as m, getTransactionStatusColor as h } from "../../../shared/utils/status.js";
16
- import { useEffect as g, useRef as _, useState as v } from "react";
17
- import { Dialog as y, DialogContent as b, DialogFooter as x, DialogHeader as S, DialogTitle as C, EmphasisPanel as w, IllustratedEmptyState as T, PagePurpose as E, ResponsiveTable as D } from "@burdenoff/fe-libs/ui";
18
- import { ArrowLeft as O, Calendar as k, CheckCircle as A, ChevronLeft as j, ChevronRight as M, CreditCard as N, Eye as P, FileText as F, Mail as I, MoreHorizontal as L, Wallet as R, XCircle as z } from "lucide-react";
19
- import { useParams as B } from "react-router";
15
+ import { useInvoiceMutations as m } from "../hooks/useInvoices.js";
16
+ import { useTransactions as h } from "../hooks/useTransactions.js";
17
+ import { getStatusBadgeClasses as g, getTransactionStatusColor as _ } from "../../../shared/utils/status.js";
18
+ import { useEffect as v, useRef as y, useState as b } from "react";
19
+ import { Dialog as x, DialogContent as S, DialogFooter as C, DialogHeader as w, DialogTitle as T, EmphasisPanel as E, IllustratedEmptyState as D, PagePurpose as O, ResponsiveTable as k } from "@burdenoff/fe-libs/ui";
20
+ import { ArrowLeft as A, Calendar as j, CheckCircle as M, ChevronLeft as N, ChevronRight as P, CreditCard as F, Eye as I, FileText as L, Mail as R, MoreHorizontal as z, Wallet as B, XCircle as ee } from "lucide-react";
21
+ import { useParams as te } from "react-router";
20
22
  import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
21
- import { useI18n as ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
24
  // src/billing/modules/billing/pages/TransactionsPage.tsx
23
25
  var W = {
24
26
  payment: "Payment",
25
27
  refund: "Refund",
26
28
  adjustment: "Adjustment"
27
- }, G = (e) => W[e.toLowerCase()] ?? e, te = ({ transaction: e, onViewDetails: t, onViewInvoice: n, hasInvoiceUrl: r }) => {
28
- let [i, a] = v(!1), o = _(null);
29
- return g(() => {
29
+ }, G = (e) => W[e.toLowerCase()] ?? e, re = ({ transaction: e, onViewDetails: t, onViewInvoice: n, hasInvoiceUrl: r }) => {
30
+ let [i, a] = b(!1), o = y(null);
31
+ return v(() => {
30
32
  let e = (e) => {
31
33
  o.current && !o.current.contains(e.target) && a(!1);
32
34
  };
@@ -39,7 +41,7 @@ var W = {
39
41
  onClick: () => a(!i),
40
42
  className: "p-1.5 rounded-md hover:bg-bg-sunken/50 transition-colors",
41
43
  "aria-label": "Transaction actions",
42
- children: /* @__PURE__ */ H(L, { className: "size-4 text-text-secondary" })
44
+ children: /* @__PURE__ */ H(z, { className: "size-4 text-text-secondary" })
43
45
  }), i && /* @__PURE__ */ U("div", {
44
46
  className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-popover border border-border-subtle rounded-md shadow-lg py-1",
45
47
  children: [/* @__PURE__ */ U("button", {
@@ -48,29 +50,29 @@ var W = {
48
50
  t(), a(!1);
49
51
  },
50
52
  className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken/50 transition-colors whitespace-nowrap",
51
- children: [/* @__PURE__ */ H(P, { className: "size-4" }), "View Details"]
53
+ children: [/* @__PURE__ */ H(I, { className: "size-4" }), "View Details"]
52
54
  }), e.type === "payment" && r && /* @__PURE__ */ U("button", {
53
55
  type: "button",
54
56
  onClick: () => {
55
57
  n(), a(!1);
56
58
  },
57
59
  className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken/50 transition-colors whitespace-nowrap",
58
- children: [/* @__PURE__ */ H(F, { className: "size-4" }), "View Invoice"]
60
+ children: [/* @__PURE__ */ H(L, { className: "size-4" }), "View Invoice"]
59
61
  })]
60
62
  })]
61
63
  });
62
- }, ne = ({ transaction: e, onClose: t, onViewInvoice: n, onRetryInvoice: r, isRetryingInvoice: i, retryInvoiceError: s, invoiceUrl: c, invoiceProvider: u }) => {
64
+ }, ie = ({ transaction: e, onClose: t, onViewInvoice: n, onRetryInvoice: r, isRetryingInvoice: i, retryInvoiceError: a, invoiceUrl: o, invoiceProvider: u }) => {
63
65
  if (!e) return null;
64
- let f = e.metadata, p = f?.subtotal, g = f?.taxAmount, _ = f?.taxRate, v = f?.taxType, w = f?.total, T = f?.invoiceNumber, E = f?.invoiceStatus, D = f?.invoiceCreationError, O = !T && e.type === "payment" && e.status === "success", k = e.type === "refund", A = f?.refundRecordId, j = f?.originalTransactionId, M = f?.creditNoteId, N = f?.creditNoteNumber, P = f?.creditNotePdfUrl, I = f?.reason, L = f?.purchaseType, R = f?.purchaseDetail, z = w && g !== void 0 && g > 0;
65
- return /* @__PURE__ */ H(y, {
66
+ let f = e.metadata, p = f?.subtotal, m = f?.taxAmount, h = f?.taxRate, v = f?.taxType, y = f?.total, b = f?.invoiceNumber, E = f?.invoiceStatus, D = f?.invoiceCreationError, O = !b && e.type === "payment" && e.status === "success", k = e.type === "refund", A = f?.refundRecordId, j = f?.originalTransactionId, M = f?.creditNoteId, N = f?.creditNoteNumber, P = f?.creditNotePdfUrl, F = f?.reason, I = f?.purchaseType, R = f?.purchaseDetail, z = y && m !== void 0 && m > 0;
67
+ return /* @__PURE__ */ H(x, {
66
68
  open: !!e,
67
69
  onOpenChange: (e) => !e && t(),
68
- children: /* @__PURE__ */ U(b, {
70
+ children: /* @__PURE__ */ U(S, {
69
71
  className: "max-w-md max-h-[90vh] overflow-auto p-0",
70
72
  children: [
71
- /* @__PURE__ */ H(S, {
73
+ /* @__PURE__ */ H(w, {
72
74
  className: "p-4 border-b border-border-subtle",
73
- children: /* @__PURE__ */ H(C, {
75
+ children: /* @__PURE__ */ H(T, {
74
76
  className: "text-lg font-semibold",
75
77
  children: "Transaction Details"
76
78
  })
@@ -102,24 +104,24 @@ var W = {
102
104
  children: [/* @__PURE__ */ H("span", {
103
105
  className: "text-text-secondary",
104
106
  children: "Subtotal"
105
- }), /* @__PURE__ */ H("span", { children: a(p || e.amount, e.currency) })]
107
+ }), /* @__PURE__ */ H("span", { children: s(p || e.amount, e.currency) })]
106
108
  }),
107
- g > 0 && /* @__PURE__ */ U("div", {
109
+ m > 0 && /* @__PURE__ */ U("div", {
108
110
  className: "flex justify-between text-sm",
109
111
  children: [/* @__PURE__ */ U("span", {
110
112
  className: "text-text-secondary",
111
113
  children: [
112
114
  v || "Tax",
113
115
  " ",
114
- _ ? `(${(_ * 100).toFixed(0)}%)` : ""
116
+ h ? `(${(h * 100).toFixed(0)}%)` : ""
115
117
  ]
116
- }), /* @__PURE__ */ H("span", { children: a(g, e.currency) })]
118
+ }), /* @__PURE__ */ H("span", { children: s(m, e.currency) })]
117
119
  }),
118
120
  /* @__PURE__ */ U("div", {
119
121
  className: "flex justify-between text-sm font-semibold border-t border-border-subtle pt-2",
120
122
  children: [/* @__PURE__ */ H("span", { children: "Total" }), /* @__PURE__ */ U("span", {
121
123
  className: e.type === "refund" ? "text-status-error-text" : "",
122
- children: [e.type === "refund" ? "-" : "", a(w, e.currency)]
124
+ children: [e.type === "refund" ? "-" : "", s(y, e.currency)]
123
125
  })]
124
126
  })
125
127
  ] }) : /* @__PURE__ */ U("div", {
@@ -129,12 +131,12 @@ var W = {
129
131
  children: "Amount"
130
132
  }), /* @__PURE__ */ U("p", {
131
133
  className: `text-sm font-medium ${e.type === "refund" ? "text-status-error-text" : ""}`,
132
- children: [e.type === "refund" ? "-" : "", a(w || e.amount, e.currency)]
134
+ children: [e.type === "refund" ? "-" : "", s(y || e.amount, e.currency)]
133
135
  })] }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
134
136
  className: "text-xs text-text-secondary mb-1",
135
137
  children: "Status"
136
138
  }), /* @__PURE__ */ H("span", {
137
- className: `px-2 py-0.5 text-xs font-medium rounded ${m(h(e.status))}`,
139
+ className: `px-2 py-0.5 text-xs font-medium rounded ${g(_(e.status))}`,
138
140
  children: e.status
139
141
  })] })]
140
142
  })
@@ -143,7 +145,7 @@ var W = {
143
145
  className: "text-xs text-text-secondary mb-1",
144
146
  children: "Status"
145
147
  }), /* @__PURE__ */ H("span", {
146
- className: `px-2 py-0.5 text-xs font-medium rounded ${m(h(e.status))}`,
148
+ className: `px-2 py-0.5 text-xs font-medium rounded ${g(_(e.status))}`,
147
149
  children: e.status
148
150
  })] }),
149
151
  /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
@@ -151,7 +153,7 @@ var W = {
151
153
  children: "Date & Time"
152
154
  }), /* @__PURE__ */ H("p", {
153
155
  className: "text-sm",
154
- children: o(e.createdAt)
156
+ children: c(e.createdAt)
155
157
  })] }),
156
158
  e.description && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
157
159
  className: "text-xs text-text-secondary mb-1",
@@ -160,7 +162,7 @@ var W = {
160
162
  className: "text-sm",
161
163
  children: e.description
162
164
  })] }),
163
- T && /* @__PURE__ */ U("div", {
165
+ b && /* @__PURE__ */ U("div", {
164
166
  className: "p-3 bg-bg-sunken/50 rounded-lg space-y-2",
165
167
  children: [
166
168
  /* @__PURE__ */ U("div", {
@@ -170,7 +172,7 @@ var W = {
170
172
  children: "Invoice"
171
173
  }), /* @__PURE__ */ H("p", {
172
174
  className: "text-sm font-mono",
173
- children: T
175
+ children: b
174
176
  })] }), E && /* @__PURE__ */ H("span", {
175
177
  className: `px-2 py-0.5 text-xs font-medium rounded ${E === "PAID" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-warning-bg-subtle text-status-warning-text"}`,
176
178
  children: E
@@ -180,28 +182,28 @@ var W = {
180
182
  className: "text-xs text-text-secondary",
181
183
  children: ["Provider: ", u]
182
184
  }),
183
- c && n && /* @__PURE__ */ U("button", {
185
+ o && n && /* @__PURE__ */ U("button", {
184
186
  type: "button",
185
187
  onClick: () => n(e),
186
188
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
187
- children: [/* @__PURE__ */ H(F, { className: "size-4" }), "View Invoice"]
189
+ children: [/* @__PURE__ */ H(L, { className: "size-4" }), "View Invoice"]
188
190
  })
189
191
  ]
190
192
  }),
191
- !T && c && n && /* @__PURE__ */ H("div", {
193
+ !b && o && n && /* @__PURE__ */ H("div", {
192
194
  className: "p-3 bg-bg-sunken/50 rounded-lg",
193
195
  children: /* @__PURE__ */ U("button", {
194
196
  type: "button",
195
197
  onClick: () => n(e),
196
198
  className: "flex items-center gap-2 text-sm text-primary hover:underline",
197
199
  children: [
198
- /* @__PURE__ */ H(F, { className: "size-4" }),
200
+ /* @__PURE__ */ H(L, { className: "size-4" }),
199
201
  "View Invoice ",
200
202
  u && `(${u})`
201
203
  ]
202
204
  })
203
205
  }),
204
- O && !c && r && /* @__PURE__ */ U("div", {
206
+ O && !o && r && /* @__PURE__ */ U("div", {
205
207
  className: "p-3 bg-status-warning-bg-subtle border border-status-warning-border rounded-lg space-y-2",
206
208
  children: [
207
209
  /* @__PURE__ */ H("p", {
@@ -213,15 +215,15 @@ var W = {
213
215
  onClick: () => r(e),
214
216
  disabled: i,
215
217
  className: "flex items-center gap-2 text-sm font-medium text-primary hover:underline disabled:cursor-not-allowed disabled:opacity-50",
216
- children: [/* @__PURE__ */ H(F, { className: "size-4" }), i ? "Generating…" : "Generate Invoice"]
218
+ children: [/* @__PURE__ */ H(L, { className: "size-4" }), i ? "Generating…" : "Generate Invoice"]
217
219
  }),
218
- s && /* @__PURE__ */ H("p", {
220
+ a && /* @__PURE__ */ H("p", {
219
221
  className: "text-sm text-status-error-text",
220
- children: s
222
+ children: a
221
223
  })
222
224
  ]
223
225
  }),
224
- k && (M || I || L) && /* @__PURE__ */ U("div", {
226
+ k && (M || F || I) && /* @__PURE__ */ U("div", {
225
227
  className: "p-3 bg-status-error-bg-subtle/20 border border-border-subtle rounded-lg space-y-3",
226
228
  children: [
227
229
  /* @__PURE__ */ U("div", {
@@ -245,22 +247,22 @@ var W = {
245
247
  l("light"), d(P);
246
248
  },
247
249
  className: "flex items-center gap-2 text-sm text-status-error-text hover:underline",
248
- children: [/* @__PURE__ */ H(F, { className: "size-4" }), "Download Credit Note PDF"]
250
+ children: [/* @__PURE__ */ H(L, { className: "size-4" }), "Download Credit Note PDF"]
249
251
  })]
250
252
  }),
251
- L && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
253
+ I && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
252
254
  className: "text-xs text-status-error-text mb-1",
253
255
  children: "Purchase Type"
254
256
  }), /* @__PURE__ */ U("p", {
255
257
  className: "text-sm text-status-error-text",
256
- children: [L, R && ` - ${R}`]
258
+ children: [I, R && ` - ${R}`]
257
259
  })] }),
258
- I && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
260
+ F && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
259
261
  className: "text-xs text-status-error-text mb-1",
260
262
  children: "Reason"
261
263
  }), /* @__PURE__ */ H("p", {
262
264
  className: "text-sm text-status-error-text",
263
- children: I
265
+ children: F
264
266
  })] }),
265
267
  j && /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
266
268
  className: "text-xs text-status-error-text mb-1",
@@ -294,7 +296,7 @@ var W = {
294
296
  })] })
295
297
  ]
296
298
  }),
297
- /* @__PURE__ */ H(x, {
299
+ /* @__PURE__ */ H(C, {
298
300
  className: "p-4 border-t border-border-subtle",
299
301
  children: /* @__PURE__ */ H("button", {
300
302
  type: "button",
@@ -307,30 +309,30 @@ var W = {
307
309
  })
308
310
  });
309
311
  }, K = () => {
310
- let { t: g } = ee(), _ = (e, t) => {
311
- let n = g(e);
312
+ let { t: v } = ne(), y = (e, t) => {
313
+ let n = v(e);
312
314
  return n === e ? t : n;
313
- }, { billingAccountId: y } = B(), b = i(), x = s(), { billingAccount: S, transactions: C, pagination: P, isLoading: L, error: V, refetch: K, goToNextPage: re, goToPreviousPage: ie } = p(y), [q, ae] = v("all"), [oe, J] = v(null), Y = C.find((e) => e.id === oe) ?? null, { retryInvoiceGeneration: se, isRetrying: ce } = f(), [le, X] = v(null), ue = async (e) => {
314
- if (y) {
315
+ }, { billingAccountId: x } = te(), S = i(), C = a(), w = p(), { billingAccount: T, transactions: I, pagination: z, isLoading: V, error: K, refetch: ae, goToNextPage: oe, goToPreviousPage: se } = h(x), [q, ce] = b("all"), [le, J] = b(null), Y = I.find((e) => e.id === le) ?? null, { retryInvoiceGeneration: ue, isRetrying: de } = m(), [fe, X] = b(null), pe = async (e) => {
316
+ if (x) {
315
317
  X(null);
316
318
  try {
317
- await se(e.id, y), u("success");
319
+ await ue(e.id, x), u("success");
318
320
  } catch (e) {
319
321
  X(e instanceof Error ? e.message : "Failed to generate invoice"), u("error");
320
322
  }
321
323
  }
322
- }, Z = (e) => e.metadata?.invoiceUrl ?? null, de = (e) => {
324
+ }, Z = (e) => e.metadata?.invoiceUrl ?? null, me = (e) => {
323
325
  let t = e.metadata;
324
326
  return t?.total && typeof t.total == "number" ? t.total : e.amount;
325
- }, fe = (e) => {
327
+ }, he = (e) => {
326
328
  let t = e.metadata?.invoiceProvider;
327
329
  return t === "ZOHO_BOOKS" ? "Zoho Books" : t === "STRIPE" ? "Stripe" : null;
328
330
  }, Q = (e) => {
329
331
  let t = Z(e);
330
332
  t && (l("light"), d(t));
331
333
  };
332
- if (!b.canViewPayments) return /* @__PURE__ */ H(e, { message: _("billing.transactions.noPermission", "You don't have permission to view transaction history.") });
333
- if (!y) return /* @__PURE__ */ H("div", {
334
+ if (!S.canViewPayments) return /* @__PURE__ */ H(e, { message: y("billing.transactions.noPermission", "You don't have permission to view transaction history.") });
335
+ if (!x) return /* @__PURE__ */ H("div", {
334
336
  className: "p-6",
335
337
  children: /* @__PURE__ */ H(n, {
336
338
  icon: /* @__PURE__ */ H("svg", {
@@ -345,21 +347,21 @@ var W = {
345
347
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
346
348
  })
347
349
  }),
348
- title: _("billing.transactions.noAccountSelected", "No billing account selected"),
349
- description: _("billing.transactions.noAccountSelectedDesc", "Please select a billing account from the overview page to view transactions.")
350
+ title: y("billing.transactions.noAccountSelected", "No billing account selected"),
351
+ description: y("billing.transactions.noAccountSelectedDesc", "Please select a billing account from the overview page to view transactions.")
350
352
  })
351
353
  });
352
- if (V && c(V)) return /* @__PURE__ */ H("div", {
354
+ if (K && f(K)) return /* @__PURE__ */ H("div", {
353
355
  className: "p-6",
354
356
  children: /* @__PURE__ */ H(r, {
355
- title: _("billing.transactions.serverUnavailable", "Server Unavailable"),
356
- message: _("billing.transactions.serverUnavailableMessage", "Unable to load transactions. The server might be down or experiencing issues."),
357
- onRetry: () => K(),
357
+ title: y("billing.transactions.serverUnavailable", "Server Unavailable"),
358
+ message: y("billing.transactions.serverUnavailableMessage", "Unable to load transactions. The server might be down or experiencing issues."),
359
+ onRetry: () => ae(),
358
360
  showRetry: !0
359
361
  })
360
362
  });
361
- let $ = q === "all" ? C : C.filter((e) => e.type === q);
362
- return L ? /* @__PURE__ */ U("div", {
363
+ let $ = q === "all" ? I : I.filter((e) => e.type === q);
364
+ return V ? /* @__PURE__ */ U("div", {
363
365
  className: "space-y-6 p-6",
364
366
  children: [/* @__PURE__ */ H("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ H("div", {
365
367
  className: "space-y-2",
@@ -376,78 +378,82 @@ var W = {
376
378
  children: [
377
379
  /* @__PURE__ */ U("button", {
378
380
  type: "button",
379
- onClick: () => x("/overview"),
381
+ onClick: () => C("/overview"),
380
382
  className: "inline-flex items-center gap-2 text-sm text-text-secondary hover:text-text-primary transition-colors",
381
- children: [/* @__PURE__ */ H(O, { className: "size-4" }), "Back to Overview"]
383
+ children: [/* @__PURE__ */ H(A, { className: "size-4" }), "Back to Overview"]
382
384
  }),
383
385
  /* @__PURE__ */ H(t, {
384
- title: _("billing.transactions.title", "Transaction History"),
385
- description: S ? `Transactions for ${S.name}` : "View all your billing transactions"
386
+ title: y("billing.transactions.title", "Transaction History"),
387
+ description: T ? `Transactions for ${T.name}` : "View all your billing transactions"
388
+ }),
389
+ /* @__PURE__ */ H(O, { children: y("billing.transactions.purpose", "A complete, time-ordered ledger of money movements on this billing account — payments, refunds and adjustments. Use it to reconcile what you were charged, open the linked invoice or credit note, and see tax breakdowns for each transaction.") }),
390
+ w && /* @__PURE__ */ H(o, {
391
+ active: "payments",
392
+ billingAccountId: x
386
393
  }),
387
- /* @__PURE__ */ H(E, { children: _("billing.transactions.purpose", "A complete, time-ordered ledger of money movements on this billing account — payments, refunds and adjustments. Use it to reconcile what you were charged, open the linked invoice or credit note, and see tax breakdowns for each transaction.") }),
388
- S && /* @__PURE__ */ H(w, {
394
+ T && /* @__PURE__ */ H(E, {
389
395
  className: "p-4",
390
396
  children: /* @__PURE__ */ U("div", {
391
397
  className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",
392
398
  children: [
393
399
  /* @__PURE__ */ U("div", {
394
400
  className: "flex items-start gap-2",
395
- children: [/* @__PURE__ */ H(N, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [
401
+ children: [/* @__PURE__ */ H(F, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [
396
402
  /* @__PURE__ */ H("p", {
397
403
  className: "text-xs text-text-secondary mb-0.5",
398
404
  children: "Account"
399
405
  }),
400
406
  /* @__PURE__ */ H("p", {
401
407
  className: "text-sm font-medium",
402
- children: S.name
408
+ children: T.name
403
409
  }),
404
- S.isActive ? /* @__PURE__ */ U("span", {
410
+ T.isActive ? /* @__PURE__ */ U("span", {
405
411
  className: "inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 text-xs font-medium rounded bg-status-success-bg-subtle text-status-success-text",
406
- children: [/* @__PURE__ */ H(A, { className: "size-3" }), "Active"]
412
+ children: [/* @__PURE__ */ H(M, { className: "size-3" }), "Active"]
407
413
  }) : /* @__PURE__ */ U("span", {
408
414
  className: "inline-flex items-center gap-1 mt-1 px-1.5 py-0.5 text-xs font-medium rounded bg-status-error-bg-subtle text-status-error-text",
409
- children: [/* @__PURE__ */ H(z, { className: "size-3" }), "Inactive"]
415
+ children: [/* @__PURE__ */ H(ee, { className: "size-3" }), "Inactive"]
410
416
  })
411
417
  ] })]
412
418
  }),
413
419
  /* @__PURE__ */ U("div", {
414
420
  className: "flex items-start gap-2",
415
- children: [/* @__PURE__ */ H(I, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
421
+ children: [/* @__PURE__ */ H(R, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
416
422
  className: "text-xs text-text-secondary mb-0.5",
417
423
  children: "Email"
418
424
  }), /* @__PURE__ */ H("p", {
419
425
  className: "text-sm font-medium break-all",
420
- children: S.billingEmail || S.email
426
+ children: T.billingEmail || T.email
421
427
  })] })]
422
428
  }),
423
429
  /* @__PURE__ */ U("div", {
424
430
  className: "flex items-start gap-2",
425
- children: [/* @__PURE__ */ H(R, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
431
+ children: [/* @__PURE__ */ H(B, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
426
432
  className: "text-xs text-text-secondary mb-0.5",
427
433
  children: "Credits Balance"
428
434
  }), /* @__PURE__ */ U("p", {
429
435
  className: "text-sm font-semibold text-text-primary",
430
- children: [(S.creditAmount || 0).toLocaleString(), " Credits"]
436
+ children: [(T.creditAmount || 0).toLocaleString(), " Credits"]
431
437
  })] })]
432
438
  }),
433
439
  /* @__PURE__ */ U("div", {
434
440
  className: "flex items-start gap-2",
435
- children: [/* @__PURE__ */ H(F, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
441
+ children: [/* @__PURE__ */ H(L, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
436
442
  className: "text-xs text-text-secondary mb-0.5",
437
443
  children: "Tax ID"
438
444
  }), /* @__PURE__ */ H("p", {
439
445
  className: "text-sm font-medium",
440
- children: S.taxId || "-"
446
+ children: T.taxId || "-"
441
447
  })] })]
442
448
  }),
443
449
  /* @__PURE__ */ U("div", {
444
450
  className: "flex items-start gap-2",
445
- children: [/* @__PURE__ */ H(k, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
451
+ children: [/* @__PURE__ */ H(j, { className: "size-4 text-text-secondary mt-0.5" }), /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
446
452
  className: "text-xs text-text-secondary mb-0.5",
447
453
  children: "Member Since"
448
454
  }), /* @__PURE__ */ H("p", {
449
455
  className: "text-sm font-medium",
450
- children: S.createdAt ? o(S.createdAt) : "-"
456
+ children: T.createdAt ? c(T.createdAt) : "-"
451
457
  })] })]
452
458
  })
453
459
  ]
@@ -464,19 +470,19 @@ var W = {
464
470
  "adjustment"
465
471
  ].map((e) => /* @__PURE__ */ H("button", {
466
472
  type: "button",
467
- onClick: () => ae(e),
473
+ onClick: () => ce(e),
468
474
  className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${q === e ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
469
475
  children: e === "all" ? "All" : W[e]
470
476
  }, e))
471
477
  })
472
478
  }),
473
- $.length === 0 ? /* @__PURE__ */ H(T, {
479
+ $.length === 0 ? /* @__PURE__ */ H(D, {
474
480
  illustration: q === "all" ? "empty-data" : "empty-search",
475
- title: _("billing.transactions.noTransactionsFound", "No transactions found"),
476
- description: q === "all" ? _("billing.transactions.noTransactionsYet", "Your transaction history will appear here.") : _("billing.transactions.noTransactionsFiltered", "No transactions match your filter.")
481
+ title: y("billing.transactions.noTransactionsFound", "No transactions found"),
482
+ description: q === "all" ? y("billing.transactions.noTransactionsYet", "Your transaction history will appear here.") : y("billing.transactions.noTransactionsFiltered", "No transactions match your filter.")
477
483
  }) : /* @__PURE__ */ H("div", {
478
484
  className: "border border-border-subtle rounded-lg overflow-visible",
479
- children: /* @__PURE__ */ H(D, {
485
+ children: /* @__PURE__ */ H(k, {
480
486
  columns: [
481
487
  {
482
488
  key: "date",
@@ -485,7 +491,7 @@ var W = {
485
491
  cellClassName: "whitespace-nowrap",
486
492
  cell: (e) => /* @__PURE__ */ H("span", {
487
493
  className: "text-sm text-text-primary",
488
- children: o(e.createdAt)
494
+ children: c(e.createdAt)
489
495
  })
490
496
  },
491
497
  {
@@ -512,7 +518,7 @@ var W = {
512
518
  cellClassName: "text-right whitespace-nowrap",
513
519
  cell: (e) => /* @__PURE__ */ U("span", {
514
520
  className: `text-sm font-medium tabular-nums ${e.type === "refund" ? "text-status-error-text" : "text-text-primary"}`,
515
- children: [e.type === "refund" ? "-" : "", a(de(e), e.currency)]
521
+ children: [e.type === "refund" ? "-" : "", s(me(e), e.currency)]
516
522
  })
517
523
  },
518
524
  {
@@ -521,14 +527,14 @@ var W = {
521
527
  headerClassName: "text-center",
522
528
  cellClassName: "text-center whitespace-nowrap",
523
529
  cell: (e) => /* @__PURE__ */ H("span", {
524
- className: `px-1.5 py-0.5 text-xs font-medium rounded ${m(h(e.status))}`,
530
+ className: `px-1.5 py-0.5 text-xs font-medium rounded ${g(_(e.status))}`,
525
531
  children: e.status
526
532
  })
527
533
  }
528
534
  ],
529
535
  data: $,
530
536
  rowKey: (e) => e.id,
531
- rowActions: (e) => /* @__PURE__ */ H(te, {
537
+ rowActions: (e) => /* @__PURE__ */ H(re, {
532
538
  transaction: e,
533
539
  onViewDetails: () => J(e.id),
534
540
  onViewInvoice: () => Q(e),
@@ -536,19 +542,19 @@ var W = {
536
542
  })
537
543
  })
538
544
  }),
539
- P.totalCount > 0 && /* @__PURE__ */ U("div", {
545
+ z.totalCount > 0 && /* @__PURE__ */ U("div", {
540
546
  className: "flex items-center justify-between border-t border-border-subtle pt-4",
541
547
  children: [/* @__PURE__ */ U("p", {
542
548
  className: "text-sm text-text-secondary",
543
549
  children: [
544
550
  "Showing ",
545
- P.page * P.pageSize + 1,
551
+ z.page * z.pageSize + 1,
546
552
  " to",
547
553
  " ",
548
- Math.min((P.page + 1) * P.pageSize, P.totalCount),
554
+ Math.min((z.page + 1) * z.pageSize, z.totalCount),
549
555
  " of",
550
556
  " ",
551
- P.totalCount,
557
+ z.totalCount,
552
558
  " transactions"
553
559
  ]
554
560
  }), /* @__PURE__ */ U("div", {
@@ -556,41 +562,41 @@ var W = {
556
562
  children: [
557
563
  /* @__PURE__ */ U("button", {
558
564
  type: "button",
559
- onClick: ie,
560
- disabled: !P.hasPrevious,
565
+ onClick: se,
566
+ disabled: !z.hasPrevious,
561
567
  className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
562
- children: [/* @__PURE__ */ H(j, { className: "size-4" }), "Previous"]
568
+ children: [/* @__PURE__ */ H(N, { className: "size-4" }), "Previous"]
563
569
  }),
564
570
  /* @__PURE__ */ U("span", {
565
571
  className: "text-sm text-text-secondary px-2",
566
572
  children: [
567
573
  "Page ",
568
- P.page + 1,
574
+ z.page + 1,
569
575
  " of ",
570
- Math.ceil(P.totalCount / P.pageSize)
576
+ Math.ceil(z.totalCount / z.pageSize)
571
577
  ]
572
578
  }),
573
579
  /* @__PURE__ */ U("button", {
574
580
  type: "button",
575
- onClick: re,
576
- disabled: !P.hasMore,
581
+ onClick: oe,
582
+ disabled: !z.hasMore,
577
583
  className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-md border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
578
- children: ["Next", /* @__PURE__ */ H(M, { className: "size-4" })]
584
+ children: ["Next", /* @__PURE__ */ H(P, { className: "size-4" })]
579
585
  })
580
586
  ]
581
587
  })]
582
588
  }),
583
- /* @__PURE__ */ H(ne, {
589
+ /* @__PURE__ */ H(ie, {
584
590
  transaction: Y,
585
591
  onClose: () => {
586
592
  J(null), X(null);
587
593
  },
588
594
  onViewInvoice: Q,
589
- onRetryInvoice: ue,
590
- isRetryingInvoice: ce,
591
- retryInvoiceError: le,
595
+ onRetryInvoice: pe,
596
+ isRetryingInvoice: de,
597
+ retryInvoiceError: fe,
592
598
  invoiceUrl: Y ? Z(Y) : null,
593
- invoiceProvider: Y ? fe(Y) : null
599
+ invoiceProvider: Y ? he(Y) : null
594
600
  })
595
601
  ]
596
602
  });