@burdenoff/microfe-billing 2026.1115.2 → 2026.1119.1

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