@burdenoff/microfe-billing 2026.1113.4 → 2026.1114.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 (46) hide show
  1. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +293 -291
  2. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  3. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +25 -24
  4. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  5. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +25 -24
  6. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  7. package/dist/billing/modules/billing/hooks/index.js +5 -5
  8. package/dist/billing/modules/billing/hooks/useInvoices.js +20 -39
  9. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  10. package/dist/billing/modules/billing/index.js +14 -14
  11. package/dist/billing/modules/billing/pages/InvoicesListPage.js +92 -89
  12. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  13. package/dist/billing/modules/billing/pages/TransactionsPage.js +2 -2
  14. package/dist/billing/modules/billing/pages/UserRefundsPage.js +140 -140
  15. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  16. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +16 -15
  17. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  18. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +1 -1
  19. package/dist/billing/modules/credits/pages/CreditsPage.js +164 -137
  20. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  21. package/dist/billing/modules/dashboard/pages/OverviewPage.js +444 -594
  22. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  23. package/dist/billing/modules/earnings/pages/EarningsPage.js +20 -20
  24. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  25. package/dist/billing/modules/earnings/pages/PayoutsPage.js +1 -1
  26. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +32 -32
  27. package/dist/billing/modules/settings/pages/SettingsPage.js +4 -4
  28. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +577 -640
  29. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  30. package/dist/billing/shared/components/HeaderActions.d.ts +10 -0
  31. package/dist/billing/shared/components/HeaderActions.js +33 -0
  32. package/dist/billing/shared/components/HeaderActions.js.map +1 -0
  33. package/dist/billing/shared/components/index.d.ts +1 -0
  34. package/dist/billing/shared/components/index.js +2 -1
  35. package/dist/billing/shared/utils/format.js +4 -16
  36. package/dist/billing/shared/utils/format.js.map +1 -1
  37. package/dist/billing/shared/utils/index.js +8 -8
  38. package/dist/generated/global-operations.js +286 -294
  39. package/dist/generated/global-operations.js.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +0 -46
  42. package/dist/billing/modules/dashboard/utils/overviewSummary.js +0 -37
  43. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +0 -1
  44. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +0 -30
  45. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +0 -20
  46. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +0 -1
@@ -1,67 +1,67 @@
1
1
  import { PageHeader as e } from "../../../shared/components/PageHeader.js";
2
2
  import { useBillingNavigate as t } from "../../../hooks/useBillingNavigate.js";
3
- import { formatCurrency as n, formatDateTime as r } from "../../../shared/utils/format.js";
4
- import { useBillingPermissions as ee } from "../../../hooks/useBillingPermissions.js";
5
- import { useIsFluidgridsVariant as te } from "../../../hooks/useBillingVariant.js";
3
+ import { useBillingPermissions as n } from "../../../hooks/useBillingPermissions.js";
4
+ import { formatCurrency as r, formatDateTime as i } from "../../../shared/utils/format.js";
5
+ import { useIsFluidgridsVariant as a } from "../../../hooks/useBillingVariant.js";
6
6
  import "../../../shared/utils/index.js";
7
7
  import "../../../shared/components/index.js";
8
- import { canShowRefundRequest as i } from "../../../shared/utils/accessRules.js";
9
- import { useCreateRefundRecordMutation as ne, useGetBillingAccountsCheckoutQuery as re, useGetRefundRecordsQuery as ie, useGetTransactionLazyQuery as ae } from "../../../../generated/global-operations.js";
10
- import { RefundRecordStatus as a } from "../../../../generated/global-types.js";
11
- import { useEffect as o, useMemo as oe, useRef as s, useState as c } from "react";
12
- import { IllustratedEmptyState as l, PagePurpose as u } from "@burdenoff/fe-libs/ui";
13
- import { CheckCircle as d, Clock as f, CreditCard as se, Loader2 as p, PlusCircle as ce, Search as le, X as m, XCircle as h } from "lucide-react";
14
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
15
- import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { canShowRefundRequest as o } from "../../../shared/utils/accessRules.js";
9
+ import { useCreateRefundRecordMutation as ee, useGetBillingAccountsCheckoutQuery as te, useGetRefundRecordsQuery as ne, useGetTransactionLazyQuery as s } from "../../../../generated/global-operations.js";
10
+ import { RefundRecordStatus as c } from "../../../../generated/global-types.js";
11
+ import { useEffect as l, useMemo as re, useRef as u, useState as d } from "react";
12
+ import { IllustratedEmptyState as ie, PagePurpose as ae } from "@burdenoff/fe-libs/ui";
13
+ import { CheckCircle as f, Clock as p, CreditCard as oe, Loader2 as m, PlusCircle as se, Search as h, X as g, XCircle as _ } from "lucide-react";
14
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
15
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
16
  // src/billing/modules/billing/pages/UserRefundsPage.tsx
17
- var y = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, b = {
18
- [a.Pending]: {
17
+ var b = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, x = {
18
+ [c.Pending]: {
19
19
  label: "In Review",
20
20
  className: "bg-status-warning-bg/20 text-status-warning-text border-status-warning-border",
21
- icon: ({ className: e }) => /* @__PURE__ */ g(f, { className: e })
21
+ icon: ({ className: e }) => /* @__PURE__ */ v(p, { className: e })
22
22
  },
23
- [a.Processing]: {
23
+ [c.Processing]: {
24
24
  label: "Processing",
25
25
  className: "bg-action-primary-bg/15 text-action-primary-bg border-action-primary-bg/30",
26
- icon: ({ className: e }) => /* @__PURE__ */ g(p, { className: `${e} animate-spin` })
26
+ icon: ({ className: e }) => /* @__PURE__ */ v(m, { className: `${e} animate-spin` })
27
27
  },
28
- [a.Completed]: {
28
+ [c.Completed]: {
29
29
  label: "Refunded",
30
30
  className: "bg-status-success-bg/20 text-status-success-text border-status-success-border",
31
- icon: ({ className: e }) => /* @__PURE__ */ g(d, { className: e })
31
+ icon: ({ className: e }) => /* @__PURE__ */ v(f, { className: e })
32
32
  },
33
- [a.Failed]: {
33
+ [c.Failed]: {
34
34
  label: "Failed",
35
35
  className: "bg-status-error-bg/20 text-status-error-text border-status-error-border",
36
- icon: ({ className: e }) => /* @__PURE__ */ g(h, { className: e })
36
+ icon: ({ className: e }) => /* @__PURE__ */ v(_, { className: e })
37
37
  },
38
- [a.Skipped]: {
38
+ [c.Skipped]: {
39
39
  label: "Closed",
40
40
  className: "bg-bg-sunken text-text-secondary border-border-subtle",
41
- icon: ({ className: e }) => /* @__PURE__ */ g(h, { className: e })
41
+ icon: ({ className: e }) => /* @__PURE__ */ v(_, { className: e })
42
42
  }
43
43
  };
44
- function x({ status: e }) {
45
- let t = b[e] ?? {
44
+ function le({ status: e }) {
45
+ let t = x[e] ?? {
46
46
  label: e,
47
47
  className: "bg-bg-sunken text-text-secondary border-border-subtle",
48
- icon: ({ className: e }) => /* @__PURE__ */ g(f, { className: e })
48
+ icon: ({ className: e }) => /* @__PURE__ */ v(p, { className: e })
49
49
  }, n = t.icon;
50
- return /* @__PURE__ */ _("span", {
50
+ return /* @__PURE__ */ y("span", {
51
51
  className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs font-medium ${t.className}`,
52
- children: [/* @__PURE__ */ g(n, { className: "size-3" }), t.label]
52
+ children: [/* @__PURE__ */ v(n, { className: "size-3" }), t.label]
53
53
  });
54
54
  }
55
55
  var S = () => {
56
- let { t: f } = v(), h = (e, t) => {
57
- let n = f(e);
56
+ let { t: p } = ce(), _ = (e, t) => {
57
+ let n = p(e);
58
58
  return n === e ? t : n;
59
- }, b = t(), S = ee(), C = i(te(), S.canProcessRefund), [w, T] = c(!1), [E, D] = c(""), [O, k] = c(null), [ue, A] = c(!1), [j, M] = c(""), [N, P] = c(""), [F, I] = c(null), [L, R] = c(!1), { data: z, loading: B } = re({ fetchPolicy: "cache-and-network" }), V = oe(() => z?.getBillingAccountsByOrg ?? [], [z]), [H, U] = c(void 0);
60
- o(() => {
59
+ }, x = t(), S = n(), C = o(a(), S.canProcessRefund), [w, T] = d(!1), [E, D] = d(""), [O, k] = d(null), [ue, A] = d(!1), [j, M] = d(""), [N, P] = d(""), [F, I] = d(null), [L, R] = d(!1), { data: z, loading: B } = te({ fetchPolicy: "cache-and-network" }), V = re(() => z?.getBillingAccountsByOrg ?? [], [z]), [H, U] = d(void 0);
60
+ l(() => {
61
61
  !H && V.length > 0 && U(V[0].id);
62
62
  }, [V, H]);
63
- let W = V.find((e) => e.id === H), [de, { data: G, loading: K, error: q }] = ae({ fetchPolicy: "network-only" }), fe = s("");
64
- o(() => {
63
+ let W = V.find((e) => e.id === H), [de, { data: G, loading: K, error: q }] = s({ fetchPolicy: "network-only" }), fe = u("");
64
+ l(() => {
65
65
  if (K) return;
66
66
  let e = G?.getTransaction;
67
67
  e ? (k(e), A(!1), P(String(e.amount))) : (G !== void 0 || q) && (k(null), A(!0), P(""));
@@ -77,10 +77,10 @@ var S = () => {
77
77
  billingAccountId: t
78
78
  } });
79
79
  }, pe = (e) => {
80
- D(e), k(null), A(!1), P(""), y.test(e.trim()) && H && J(e.trim(), H);
80
+ D(e), k(null), A(!1), P(""), b.test(e.trim()) && H && J(e.trim(), H);
81
81
  }, me = (e) => {
82
- U(e), k(null), A(!1), P(""), y.test(E.trim()) && J(E.trim(), e);
83
- }, { data: he, loading: ge, refetch: _e } = ie({
82
+ U(e), k(null), A(!1), P(""), b.test(E.trim()) && J(E.trim(), e);
83
+ }, { data: Y, loading: he, refetch: ge } = ne({
84
84
  variables: {
85
85
  billingAccountId: H,
86
86
  pageSize: 20,
@@ -88,7 +88,7 @@ var S = () => {
88
88
  },
89
89
  skip: !H,
90
90
  fetchPolicy: "cache-and-network"
91
- }), Y = he?.getRefundRecords.records ?? [], [ve, { loading: X }] = ne({ refetchQueries: ["GetRefundRecords"] }), Z = (e) => e ? e.stripePaymentId ? {
91
+ }), X = Y?.getRefundRecords.records ?? [], [_e, { loading: Z }] = ee({ refetchQueries: ["GetRefundRecords"] }), ve = (e) => e ? e.stripePaymentId ? {
92
92
  provider: "STRIPE",
93
93
  gatewayPaymentId: e.stripePaymentId
94
94
  } : e.razorpayPaymentId ? {
@@ -99,25 +99,25 @@ var S = () => {
99
99
  I("Enter a valid transaction ID, an amount, and a reason.");
100
100
  return;
101
101
  }
102
- let t = Z(O);
102
+ let t = ve(O);
103
103
  if (!t) {
104
104
  I("No payment gateway info found for this transaction. Please contact support.");
105
105
  return;
106
106
  }
107
- let r = parseFloat(N);
108
- if (isNaN(r) || r <= 0) I("Please enter a valid amount greater than 0.");
109
- else if (r > O.amount) I(`Cannot exceed the original payment amount (${n(O.amount, O.currency)}).`);
107
+ let n = parseFloat(N);
108
+ if (isNaN(n) || n <= 0) I("Please enter a valid amount greater than 0.");
109
+ else if (n > O.amount) I(`Cannot exceed the original payment amount (${r(O.amount, O.currency)}).`);
110
110
  else try {
111
- await ve({ variables: {
111
+ await _e({ variables: {
112
112
  billingAccountId: H,
113
113
  provider: t.provider,
114
114
  gatewayPaymentId: t.gatewayPaymentId,
115
- amount: r,
115
+ amount: n,
116
116
  currency: O.currency ?? W?.currency ?? "USD",
117
117
  transactionId: O.id,
118
118
  reason: j.trim(),
119
119
  notes: "Requested by user via billing portal"
120
- } }), R(!0), T(!1), Q(), await _e();
120
+ } }), R(!0), T(!1), Q(), await ge();
121
121
  } catch (e) {
122
122
  I(e instanceof Error ? e.message : "Failed to submit refund request.");
123
123
  }
@@ -126,37 +126,37 @@ var S = () => {
126
126
  }, $ = () => {
127
127
  T(!1), R(!1), Q();
128
128
  };
129
- return /* @__PURE__ */ _("div", {
129
+ return /* @__PURE__ */ y("div", {
130
130
  className: "space-y-6 p-6 max-w-3xl",
131
131
  children: [
132
- /* @__PURE__ */ g(e, {
133
- title: h("billing.refunds.title", "Refunds"),
134
- description: h("billing.refunds.description", "View your refund requests and submit new ones"),
135
- actions: !w && C ? /* @__PURE__ */ _("button", {
132
+ /* @__PURE__ */ v(e, {
133
+ title: _("billing.refunds.title", "Refunds"),
134
+ description: _("billing.refunds.description", "View your refund requests and submit new ones"),
135
+ actions: !w && C ? /* @__PURE__ */ y("button", {
136
136
  type: "button",
137
137
  onClick: () => {
138
138
  T(!0), R(!1);
139
139
  },
140
140
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
141
- children: [/* @__PURE__ */ g(ce, { className: "size-4" }), h("billing.refunds.requestRefund", "Request Refund")]
141
+ children: [/* @__PURE__ */ v(se, { className: "size-4" }), _("billing.refunds.requestRefund", "Request Refund")]
142
142
  }) : void 0
143
143
  }),
144
- /* @__PURE__ */ g(u, { children: h("billing.refunds.userPurpose", "Request money back for a payment and follow where each request stands. Paste the transaction ID of the charge you want refunded, tell us how much and why, and track every request here from \"In Review\" through to \"Refunded\".") }),
145
- !B && V.length > 1 && /* @__PURE__ */ _("div", {
144
+ /* @__PURE__ */ v(ae, { children: _("billing.refunds.userPurpose", "Request money back for a payment and follow where each request stands. Paste the transaction ID of the charge you want refunded, tell us how much and why, and track every request here from \"In Review\" through to \"Refunded\".") }),
145
+ !B && V.length > 1 && /* @__PURE__ */ y("div", {
146
146
  className: "flex items-center gap-3",
147
147
  children: [
148
- /* @__PURE__ */ g(se, { className: "size-4 text-text-secondary shrink-0" }),
149
- /* @__PURE__ */ g("label", {
148
+ /* @__PURE__ */ v(oe, { className: "size-4 text-text-secondary shrink-0" }),
149
+ /* @__PURE__ */ v("label", {
150
150
  htmlFor: "accountSwitch",
151
151
  className: "text-sm text-text-secondary shrink-0",
152
- children: h("billing.refunds.account", "Billing account")
152
+ children: _("billing.refunds.account", "Billing account")
153
153
  }),
154
- /* @__PURE__ */ g("select", {
154
+ /* @__PURE__ */ v("select", {
155
155
  id: "accountSwitch",
156
156
  value: H ?? "",
157
157
  onChange: (e) => me(e.target.value),
158
158
  className: "flex-1 px-3 py-1.5 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
159
- children: V.map((e) => /* @__PURE__ */ _("option", {
159
+ children: V.map((e) => /* @__PURE__ */ y("option", {
160
160
  value: e.id,
161
161
  children: [
162
162
  e.name,
@@ -169,114 +169,114 @@ var S = () => {
169
169
  })
170
170
  ]
171
171
  }),
172
- L && /* @__PURE__ */ _("div", {
172
+ L && /* @__PURE__ */ y("div", {
173
173
  className: "flex items-center justify-between p-4 rounded-lg border border-status-success-border bg-status-success-bg/10",
174
- children: [/* @__PURE__ */ _("div", {
174
+ children: [/* @__PURE__ */ y("div", {
175
175
  className: "flex items-center gap-2",
176
- children: [/* @__PURE__ */ g(d, { className: "size-4 text-status-success-text" }), /* @__PURE__ */ g("p", {
176
+ children: [/* @__PURE__ */ v(f, { className: "size-4 text-status-success-text" }), /* @__PURE__ */ v("p", {
177
177
  className: "text-sm text-status-success-text font-medium",
178
- children: h("billing.refunds.submitted", "Refund request submitted. Our team will review it shortly.")
178
+ children: _("billing.refunds.submitted", "Refund request submitted. Our team will review it shortly.")
179
179
  })]
180
- }), /* @__PURE__ */ g("button", {
180
+ }), /* @__PURE__ */ v("button", {
181
181
  type: "button",
182
182
  onClick: () => R(!1),
183
183
  className: "text-status-success-text hover:opacity-70",
184
- children: /* @__PURE__ */ g(m, { className: "size-4" })
184
+ children: /* @__PURE__ */ v(g, { className: "size-4" })
185
185
  })]
186
186
  }),
187
- w && /* @__PURE__ */ _("div", {
187
+ w && /* @__PURE__ */ y("div", {
188
188
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
189
- children: [/* @__PURE__ */ _("div", {
189
+ children: [/* @__PURE__ */ y("div", {
190
190
  className: "flex items-center justify-between p-4 border-b border-border-subtle bg-bg-sunken",
191
- children: [/* @__PURE__ */ g("h2", {
191
+ children: [/* @__PURE__ */ v("h2", {
192
192
  className: "font-semibold text-text-primary",
193
- children: h("billing.refunds.newRequest", "New Refund Request")
194
- }), /* @__PURE__ */ g("button", {
193
+ children: _("billing.refunds.newRequest", "New Refund Request")
194
+ }), /* @__PURE__ */ v("button", {
195
195
  type: "button",
196
196
  onClick: $,
197
197
  className: "p-1 rounded hover:bg-bg-sunken transition-colors",
198
- children: /* @__PURE__ */ g(m, { className: "size-4 text-text-secondary" })
198
+ children: /* @__PURE__ */ v(g, { className: "size-4 text-text-secondary" })
199
199
  })]
200
- }), /* @__PURE__ */ _("form", {
200
+ }), /* @__PURE__ */ y("form", {
201
201
  onSubmit: ye,
202
202
  className: "p-4 space-y-4",
203
203
  children: [
204
- F && /* @__PURE__ */ g("div", {
204
+ F && /* @__PURE__ */ v("div", {
205
205
  className: "p-3 rounded-lg border border-status-error-border bg-status-error-bg/10",
206
- children: /* @__PURE__ */ g("p", {
206
+ children: /* @__PURE__ */ v("p", {
207
207
  className: "text-sm text-status-error-text",
208
208
  children: F
209
209
  })
210
210
  }),
211
- /* @__PURE__ */ _("div", { children: [
212
- /* @__PURE__ */ _("label", {
211
+ /* @__PURE__ */ y("div", { children: [
212
+ /* @__PURE__ */ y("label", {
213
213
  htmlFor: "txnId",
214
214
  className: "block text-sm font-medium text-text-primary mb-1",
215
- children: [h("billing.refunds.transactionId", "Transaction ID"), " *"]
215
+ children: [_("billing.refunds.transactionId", "Transaction ID"), " *"]
216
216
  }),
217
- /* @__PURE__ */ _("div", {
217
+ /* @__PURE__ */ y("div", {
218
218
  className: "relative",
219
- children: [/* @__PURE__ */ g("input", {
219
+ children: [/* @__PURE__ */ v("input", {
220
220
  id: "txnId",
221
221
  type: "text",
222
222
  value: E,
223
223
  onChange: (e) => pe(e.target.value),
224
224
  placeholder: "Paste your transaction ID...",
225
225
  className: "w-full pl-3 pr-9 py-2 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm font-mono"
226
- }), /* @__PURE__ */ g("div", {
226
+ }), /* @__PURE__ */ v("div", {
227
227
  className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-text-secondary",
228
- children: K ? /* @__PURE__ */ g(p, { className: "size-4 animate-spin" }) : /* @__PURE__ */ g(le, { className: "size-4" })
228
+ children: K ? /* @__PURE__ */ v(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(h, { className: "size-4" })
229
229
  })]
230
230
  }),
231
- O && /* @__PURE__ */ _("div", {
231
+ O && /* @__PURE__ */ y("div", {
232
232
  className: "mt-2 p-3 rounded-button border border-status-success-border bg-status-success-bg/10 text-sm space-y-0.5",
233
- children: [/* @__PURE__ */ _("div", {
233
+ children: [/* @__PURE__ */ y("div", {
234
234
  className: "flex items-center gap-2",
235
235
  children: [
236
- /* @__PURE__ */ g(d, { className: "size-3.5 text-status-success-text shrink-0" }),
237
- /* @__PURE__ */ g("span", {
236
+ /* @__PURE__ */ v(f, { className: "size-3.5 text-status-success-text shrink-0" }),
237
+ /* @__PURE__ */ v("span", {
238
238
  className: "font-medium text-text-primary",
239
- children: n(O.amount, O.currency)
239
+ children: r(O.amount, O.currency)
240
240
  }),
241
- /* @__PURE__ */ g("span", {
241
+ /* @__PURE__ */ v("span", {
242
242
  className: "text-text-secondary",
243
243
  children: "·"
244
244
  }),
245
- /* @__PURE__ */ g("span", {
245
+ /* @__PURE__ */ v("span", {
246
246
  className: "text-text-secondary",
247
- children: r(O.createdAt)
247
+ children: i(O.createdAt)
248
248
  }),
249
- O.stripePaymentId && /* @__PURE__ */ g("span", {
249
+ O.stripePaymentId && /* @__PURE__ */ v("span", {
250
250
  className: "text-xs text-text-secondary",
251
251
  children: "Stripe"
252
252
  }),
253
- O.razorpayPaymentId && /* @__PURE__ */ g("span", {
253
+ O.razorpayPaymentId && /* @__PURE__ */ v("span", {
254
254
  className: "text-xs text-text-secondary",
255
255
  children: "Razorpay"
256
256
  })
257
257
  ]
258
- }), O.description && /* @__PURE__ */ g("p", {
258
+ }), O.description && /* @__PURE__ */ v("p", {
259
259
  className: "text-xs text-text-secondary pl-5",
260
260
  children: O.description
261
261
  })]
262
262
  }),
263
- ue && E.length > 0 && !K && /* @__PURE__ */ g("p", {
263
+ ue && E.length > 0 && !K && /* @__PURE__ */ v("p", {
264
264
  className: "mt-1 text-xs text-status-error-text",
265
- children: h("billing.refunds.txnNotFound", "Transaction not found in this billing account.")
265
+ children: _("billing.refunds.txnNotFound", "Transaction not found in this billing account.")
266
266
  }),
267
- !y.test(E.trim()) && E.length > 4 && /* @__PURE__ */ g("p", {
267
+ !b.test(E.trim()) && E.length > 4 && /* @__PURE__ */ v("p", {
268
268
  className: "mt-1 text-xs text-text-secondary",
269
- children: h("billing.refunds.txnIdHint", "Transaction IDs look like: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
269
+ children: _("billing.refunds.txnIdHint", "Transaction IDs look like: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
270
270
  })
271
271
  ] }),
272
- O && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
272
+ O && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
273
273
  htmlFor: "refundAmount",
274
274
  className: "block text-sm font-medium text-text-primary mb-1",
275
- children: [h("billing.refunds.amount", "Refund Amount"), " *"]
276
- }), /* @__PURE__ */ _("div", {
275
+ children: [_("billing.refunds.amount", "Refund Amount"), " *"]
276
+ }), /* @__PURE__ */ y("div", {
277
277
  className: "flex items-center gap-2",
278
278
  children: [
279
- /* @__PURE__ */ g("input", {
279
+ /* @__PURE__ */ v("input", {
280
280
  id: "refundAmount",
281
281
  type: "number",
282
282
  step: "0.01",
@@ -288,114 +288,114 @@ var S = () => {
288
288
  className: "w-40 px-3 py-2 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm",
289
289
  placeholder: "0.00"
290
290
  }),
291
- /* @__PURE__ */ g("span", {
291
+ /* @__PURE__ */ v("span", {
292
292
  className: "text-sm text-text-secondary",
293
293
  children: O.currency ?? W?.currency ?? "USD"
294
294
  }),
295
- /* @__PURE__ */ _("span", {
295
+ /* @__PURE__ */ y("span", {
296
296
  className: "text-xs text-text-secondary",
297
- children: ["max ", n(O.amount, O.currency)]
297
+ children: ["max ", r(O.amount, O.currency)]
298
298
  })
299
299
  ]
300
300
  })] }),
301
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
301
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
302
302
  htmlFor: "reason",
303
303
  className: "block text-sm font-medium text-text-primary mb-1",
304
- children: [h("billing.refunds.reason", "Reason for refund"), " *"]
305
- }), /* @__PURE__ */ g("textarea", {
304
+ children: [_("billing.refunds.reason", "Reason for refund"), " *"]
305
+ }), /* @__PURE__ */ v("textarea", {
306
306
  id: "reason",
307
307
  value: j,
308
308
  onChange: (e) => M(e.target.value),
309
309
  required: !0,
310
310
  rows: 3,
311
311
  className: "w-full px-3 py-2 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm resize-none",
312
- placeholder: h("billing.refunds.reasonPlaceholder", "Describe why you are requesting a refund...")
312
+ placeholder: _("billing.refunds.reasonPlaceholder", "Describe why you are requesting a refund...")
313
313
  })] }),
314
- /* @__PURE__ */ _("div", {
314
+ /* @__PURE__ */ y("div", {
315
315
  className: "flex items-center gap-3 pt-1",
316
- children: [/* @__PURE__ */ g("button", {
316
+ children: [/* @__PURE__ */ v("button", {
317
317
  type: "submit",
318
- disabled: X || !O || !j.trim() || !N,
318
+ disabled: Z || !O || !j.trim() || !N,
319
319
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
320
- children: X ? h("billing.refunds.submitting", "Submitting...") : h("billing.refunds.submitRequest", "Submit Request")
321
- }), /* @__PURE__ */ g("button", {
320
+ children: Z ? _("billing.refunds.submitting", "Submitting...") : _("billing.refunds.submitRequest", "Submit Request")
321
+ }), /* @__PURE__ */ v("button", {
322
322
  type: "button",
323
323
  onClick: $,
324
324
  className: "px-4 py-2 text-sm border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
325
- children: h("billing.common.cancel", "Cancel")
325
+ children: _("billing.common.cancel", "Cancel")
326
326
  })]
327
327
  })
328
328
  ]
329
329
  })]
330
330
  }),
331
- /* @__PURE__ */ _("div", {
331
+ /* @__PURE__ */ y("div", {
332
332
  className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
333
- children: [/* @__PURE__ */ g("div", {
333
+ children: [/* @__PURE__ */ v("div", {
334
334
  className: "p-4 border-b border-border-subtle bg-bg-sunken",
335
- children: /* @__PURE__ */ g("h2", {
335
+ children: /* @__PURE__ */ v("h2", {
336
336
  className: "font-semibold text-text-primary",
337
- children: h("billing.refunds.history", "Refund History")
337
+ children: _("billing.refunds.history", "Refund History")
338
338
  })
339
- }), B || ge ? /* @__PURE__ */ g("div", {
339
+ }), B || he ? /* @__PURE__ */ v("div", {
340
340
  className: "p-8 flex items-center justify-center",
341
- children: /* @__PURE__ */ g(p, { className: "size-5 animate-spin text-text-secondary" })
342
- }) : Y.length === 0 ? /* @__PURE__ */ g(l, {
341
+ children: /* @__PURE__ */ v(m, { className: "size-5 animate-spin text-text-secondary" })
342
+ }) : X.length === 0 ? /* @__PURE__ */ v(ie, {
343
343
  illustration: "empty-data",
344
- title: h("billing.refunds.noRefunds", "No refund requests yet"),
345
- description: h("billing.refunds.noRefundsHint", "If you have an issue with a payment, click \"Request Refund\" to get started.")
346
- }) : /* @__PURE__ */ g("ul", {
344
+ title: _("billing.refunds.noRefunds", "No refund requests yet"),
345
+ description: _("billing.refunds.noRefundsHint", "If you have an issue with a payment, click \"Request Refund\" to get started.")
346
+ }) : /* @__PURE__ */ v("ul", {
347
347
  className: "divide-y divide-border-subtle",
348
- children: Y.map((e) => /* @__PURE__ */ _("li", {
348
+ children: X.map((e) => /* @__PURE__ */ y("li", {
349
349
  className: "flex items-start gap-4 p-4 hover:bg-bg-sunken transition-colors",
350
- children: [/* @__PURE__ */ _("div", {
350
+ children: [/* @__PURE__ */ y("div", {
351
351
  className: "flex-1 min-w-0",
352
352
  children: [
353
- /* @__PURE__ */ _("div", {
353
+ /* @__PURE__ */ y("div", {
354
354
  className: "flex items-center gap-2 flex-wrap",
355
355
  children: [
356
- /* @__PURE__ */ g("span", {
356
+ /* @__PURE__ */ v("span", {
357
357
  className: "text-sm font-medium text-text-primary",
358
- children: n(e.amount, e.currency)
358
+ children: r(e.amount, e.currency)
359
359
  }),
360
- /* @__PURE__ */ g(x, { status: e.status }),
361
- e.purchaseDetail && /* @__PURE__ */ g("span", {
360
+ /* @__PURE__ */ v(le, { status: e.status }),
361
+ e.purchaseDetail && /* @__PURE__ */ v("span", {
362
362
  className: "text-xs text-text-secondary truncate",
363
363
  children: e.purchaseDetail
364
364
  })
365
365
  ]
366
366
  }),
367
- e.reason && /* @__PURE__ */ g("p", {
367
+ e.reason && /* @__PURE__ */ v("p", {
368
368
  className: "text-xs text-text-secondary mt-1 line-clamp-2",
369
369
  children: e.reason
370
370
  }),
371
- e.errorMessage && e.status === a.Failed && /* @__PURE__ */ g("p", {
371
+ e.errorMessage && e.status === c.Failed && /* @__PURE__ */ v("p", {
372
372
  className: "text-xs text-status-error-text mt-1",
373
373
  children: e.errorMessage
374
374
  })
375
375
  ]
376
- }), /* @__PURE__ */ _("div", {
376
+ }), /* @__PURE__ */ y("div", {
377
377
  className: "text-right shrink-0",
378
- children: [/* @__PURE__ */ g("p", {
378
+ children: [/* @__PURE__ */ v("p", {
379
379
  className: "text-xs text-text-secondary",
380
- children: r(e.createdAt)
381
- }), e.processedAt && /* @__PURE__ */ _("p", {
380
+ children: i(e.createdAt)
381
+ }), e.processedAt && /* @__PURE__ */ y("p", {
382
382
  className: "text-xs text-text-secondary mt-0.5",
383
- children: ["Processed ", r(e.processedAt)]
383
+ children: ["Processed ", i(e.processedAt)]
384
384
  })]
385
385
  })]
386
386
  }, e.id))
387
387
  })]
388
388
  }),
389
- /* @__PURE__ */ _("p", {
389
+ /* @__PURE__ */ y("p", {
390
390
  className: "text-xs text-text-secondary",
391
391
  children: [
392
- h("billing.refunds.footer", "Refund requests are reviewed by our team within 3–5 business days. For urgent issues, contact support."),
392
+ _("billing.refunds.footer", "Refund requests are reviewed by our team within 3–5 business days. For urgent issues, contact support."),
393
393
  " ",
394
- /* @__PURE__ */ g("button", {
394
+ /* @__PURE__ */ v("button", {
395
395
  type: "button",
396
- onClick: () => b("/transactions/" + H),
396
+ onClick: () => x("/transactions/" + H),
397
397
  className: "underline hover:no-underline",
398
- children: h("billing.refunds.viewTransactions", "View all transactions")
398
+ children: _("billing.refunds.viewTransactions", "View all transactions")
399
399
  })
400
400
  ]
401
401
  })