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