@burdenoff/microfe-billing 2026.1114.6 → 2026.1114.8

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