@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
@@ -1,369 +1,368 @@
1
1
  import { AccessDenied as e } from "../../../shared/components/AccessDenied.js";
2
2
  import { PageHeader as t } from "../../../shared/components/PageHeader.js";
3
- import { EmptyState as n } from "../../../shared/components/EmptyState.js";
4
- import { statusTokens as r } from "../../../shared/utils/tokens.js";
5
- import { ServerError as i } from "../../../shared/components/ServerError.js";
3
+ import { statusTokens as n } from "../../../shared/utils/tokens.js";
4
+ import { ServerError as r } from "../../../shared/components/ServerError.js";
6
5
  import "../../../shared/components/index.js";
7
- import { formatCurrency as a, formatDateTime as o } from "../../../shared/utils/format.js";
8
- import { isServerError as s } from "../../../shared/utils/error.js";
6
+ import { formatCurrency as i, formatDateTime as a } from "../../../shared/utils/format.js";
7
+ import { isServerError as o } from "../../../shared/utils/error.js";
9
8
  import "../../../shared/utils/index.js";
10
- import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
11
- import { GetTransactionDocument as l } from "../../../../generated/global-operations.js";
12
- import { useRefunds as u } from "../hooks/useRefunds.js";
9
+ import { useBillingPermissions as s } from "../../../hooks/useBillingPermissions.js";
10
+ import { GetTransactionDocument as c } from "../../../../generated/global-operations.js";
11
+ import { useRefunds as l } from "../hooks/useRefunds.js";
13
12
  import "../hooks/index.js";
14
- import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
15
- import { AlertTriangle as g, Ban as _, CheckCircle as v, ChevronLeft as y, ChevronRight as b, Clock as x, Download as S, Eye as C, Filter as w, Loader2 as T, MoreHorizontal as E, Play as D, Plus as ee, RefreshCw as O, RotateCcw as k, Search as A, SkipForward as j, X as M, XCircle as N } from "lucide-react";
16
- import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
17
- import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { CTAOverflowMenu as ne, ResponsiveTable as re } from "@burdenoff/fe-libs/ui";
19
- import { useApolloClient as L } from "@apollo/client/react";
13
+ import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
14
+ import { AlertTriangle as h, Ban as g, CheckCircle as _, ChevronLeft as v, ChevronRight as y, Clock as b, Download as x, Eye as S, Filter as C, Loader2 as w, MoreHorizontal as T, Play as E, Plus as ee, RefreshCw as te, RotateCcw as D, Search as O, SkipForward as k, X as A, XCircle as j } from "lucide-react";
15
+ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
16
+ import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
+ import { CTAOverflowMenu as re, IllustratedEmptyState as ie, PagePurpose as ae, ResponsiveTable as oe } from "@burdenoff/fe-libs/ui";
18
+ import { useApolloClient as F } from "@apollo/client/react";
20
19
  //#region src/billing/modules/billing/pages/RefundsPage.tsx
21
- var R = {
20
+ var I = {
22
21
  PENDING: {
23
22
  label: "Pending",
24
23
  color: "yellow",
25
- icon: x
24
+ icon: b
26
25
  },
27
26
  PROCESSING: {
28
27
  label: "Processing",
29
28
  color: "blue",
30
- icon: T
29
+ icon: w
31
30
  },
32
31
  COMPLETED: {
33
32
  label: "Completed",
34
33
  color: "green",
35
- icon: v
34
+ icon: _
36
35
  },
37
36
  FAILED: {
38
37
  label: "Failed",
39
38
  color: "red",
40
- icon: N
39
+ icon: j
41
40
  },
42
41
  SKIPPED: {
43
42
  label: "Skipped",
44
43
  color: "gray",
45
- icon: _
44
+ icon: g
46
45
  }
47
- }, z = {
46
+ }, L = {
48
47
  MANUAL: "Manual",
49
48
  WEBHOOK_RECOVERY: "Webhook Recovery",
50
49
  SUBSCRIPTION_CANCEL: "Subscription Cancel",
51
50
  DUPLICATE_PAYMENT: "Duplicate Payment"
52
- }, ie = ["stripe", "razorpay"], B = (e) => {
51
+ }, se = ["stripe", "razorpay"], R = (e) => {
53
52
  let t = {
54
- yellow: `${r.warning.bg} ${r.warning.text}`,
55
- blue: `${r.info.bg} ${r.info.text}`,
56
- green: `${r.success.bg} ${r.success.text}`,
57
- red: `${r.error.bg} ${r.error.text}`,
58
- gray: `${r.neutral.bg} ${r.neutral.text}`
53
+ yellow: `${n.warning.bg} ${n.warning.text}`,
54
+ blue: `${n.info.bg} ${n.info.text}`,
55
+ green: `${n.success.bg} ${n.success.text}`,
56
+ red: `${n.error.bg} ${n.error.text}`,
57
+ gray: `${n.neutral.bg} ${n.neutral.text}`
59
58
  };
60
59
  return t[e] || t.gray;
61
- }, ae = ({ record: e, onViewDetails: t, onProcess: n, onSkip: i, onRetry: a, isProcessing: o }) => {
62
- let [s, c] = h(!1), l = m(null);
63
- f(() => {
60
+ }, ce = ({ record: e, onViewDetails: t, onProcess: r, onSkip: i, onRetry: a, isProcessing: o }) => {
61
+ let [s, c] = m(!1), l = p(null);
62
+ d(() => {
64
63
  let e = (e) => {
65
64
  l.current && !l.current.contains(e.target) && c(!1);
66
65
  };
67
66
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
68
67
  }, []);
69
- let u = e.status === "PENDING", d = e.status === "PENDING", p = e.status === "FAILED";
70
- return /* @__PURE__ */ I("div", {
68
+ let u = e.status === "PENDING", f = e.status === "PENDING", h = e.status === "FAILED";
69
+ return /* @__PURE__ */ P("div", {
71
70
  className: "relative",
72
71
  ref: l,
73
- children: [/* @__PURE__ */ F("button", {
72
+ children: [/* @__PURE__ */ N("button", {
74
73
  type: "button",
75
74
  onClick: () => c(!s),
76
75
  disabled: o,
77
76
  className: "p-1.5 rounded-md hover:bg-bg-sunken/50 transition-colors disabled:opacity-50",
78
77
  "aria-label": "Refund actions",
79
- children: o ? /* @__PURE__ */ F(T, { className: "size-4 animate-spin text-text-muted" }) : /* @__PURE__ */ F(E, { className: "size-4 text-text-muted" })
80
- }), s && /* @__PURE__ */ I("div", {
78
+ children: o ? /* @__PURE__ */ N(w, { className: "size-4 animate-spin text-text-muted" }) : /* @__PURE__ */ N(T, { className: "size-4 text-text-muted" })
79
+ }), s && /* @__PURE__ */ P("div", {
81
80
  className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] bg-bg-elevated border border-border-subtle rounded-input shadow-[var(--shadow-elevation-3)] py-1",
82
81
  children: [
83
- /* @__PURE__ */ I("button", {
82
+ /* @__PURE__ */ P("button", {
84
83
  type: "button",
85
84
  onClick: () => {
86
85
  t(), c(!1);
87
86
  },
88
87
  className: "w-full flex items-center gap-2 px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken/50 transition-colors",
89
- children: [/* @__PURE__ */ F(C, { className: "size-4" }), "View Details"]
88
+ children: [/* @__PURE__ */ N(S, { className: "size-4" }), "View Details"]
90
89
  }),
91
- u && /* @__PURE__ */ I("button", {
90
+ u && /* @__PURE__ */ P("button", {
92
91
  type: "button",
93
92
  onClick: () => {
94
- n(), c(!1);
93
+ r(), c(!1);
95
94
  },
96
- className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${r.success.text} hover:bg-bg-sunken/50 transition-colors`,
97
- children: [/* @__PURE__ */ F(D, { className: "size-4" }), "Process Refund"]
95
+ className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.success.text} hover:bg-bg-sunken/50 transition-colors`,
96
+ children: [/* @__PURE__ */ N(E, { className: "size-4" }), "Process Refund"]
98
97
  }),
99
- d && /* @__PURE__ */ I("button", {
98
+ f && /* @__PURE__ */ P("button", {
100
99
  type: "button",
101
100
  onClick: () => {
102
101
  i(), c(!1);
103
102
  },
104
- className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${r.warning.text} hover:bg-bg-sunken/50 transition-colors`,
105
- children: [/* @__PURE__ */ F(j, { className: "size-4" }), "Skip Refund"]
103
+ className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.warning.text} hover:bg-bg-sunken/50 transition-colors`,
104
+ children: [/* @__PURE__ */ N(k, { className: "size-4" }), "Skip Refund"]
106
105
  }),
107
- p && /* @__PURE__ */ I("button", {
106
+ h && /* @__PURE__ */ P("button", {
108
107
  type: "button",
109
108
  onClick: () => {
110
109
  a(), c(!1);
111
110
  },
112
- className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${r.info.text} hover:bg-bg-sunken/50 transition-colors`,
113
- children: [/* @__PURE__ */ F(k, { className: "size-4" }), "Retry Refund"]
111
+ className: `w-full flex items-center gap-2 px-3 py-2 text-sm ${n.info.text} hover:bg-bg-sunken/50 transition-colors`,
112
+ children: [/* @__PURE__ */ N(D, { className: "size-4" }), "Retry Refund"]
114
113
  })
115
114
  ]
116
115
  })]
117
116
  });
118
- }, V = {
117
+ }, z = {
119
118
  provider: "stripe",
120
119
  gatewayPaymentId: "",
121
120
  amount: 0,
122
121
  currency: "USD"
123
- }, oe = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
124
- let i = L(), [o, s] = h(""), [c, u] = h(null), [f, p] = h(null), [m, g] = h(!1), [_, y] = h(V), b = () => {
125
- s(""), u(null), p(null), y(V);
122
+ }, le = ({ isOpen: e, onClose: t, onSubmit: n, isSubmitting: r }) => {
123
+ let a = F(), [o, s] = m(""), [l, d] = m(null), [f, p] = m(null), [h, g] = m(!1), [v, y] = m(z), b = () => {
124
+ s(""), d(null), p(null), y(z);
126
125
  }, x = () => {
127
126
  b(), t();
128
- }, S = d(async (e) => {
127
+ }, S = u(async (e) => {
129
128
  let t = e.trim();
130
129
  if (t) {
131
- g(!0), p(null), u(null);
130
+ g(!0), p(null), d(null);
132
131
  try {
133
- let { data: e } = await i.query({
134
- query: l,
132
+ let { data: e } = await a.query({
133
+ query: c,
135
134
  variables: { id: t },
136
135
  fetchPolicy: "network-only"
137
136
  }), n = e?.getTransaction ?? null;
138
137
  if (!n) {
139
- p("Transaction not found. Check the ID and try again."), y(V);
138
+ p("Transaction not found. Check the ID and try again."), y(z);
140
139
  return;
141
140
  }
142
- let r = n.metadata, a = typeof r?.total == "number" ? r.total : n.amount;
143
- u({
141
+ let r = n.metadata, i = typeof r?.total == "number" ? r.total : n.amount;
142
+ d({
144
143
  id: n.id,
145
144
  billingAccountId: n.billingAccountId,
146
145
  amount: n.amount,
147
- totalAmount: a,
146
+ totalAmount: i,
148
147
  currency: n.currency,
149
148
  description: n.description ?? null,
150
149
  razorpayPaymentId: n.razorpayPaymentId ?? null,
151
150
  stripePaymentId: n.stripePaymentId ?? null,
152
151
  metadata: n.metadata ?? null
153
152
  });
154
- let o = n.razorpayPaymentId ? "razorpay" : "stripe", s = n.razorpayPaymentId ?? n.stripePaymentId ?? "", c = r?.purchaseType ?? "", d = n.description ?? "";
153
+ let o = n.razorpayPaymentId ? "razorpay" : "stripe", s = n.razorpayPaymentId ?? n.stripePaymentId ?? "", l = r?.purchaseType ?? "", u = n.description ?? "";
155
154
  y({
156
155
  transactionId: n.id,
157
156
  billingAccountId: n.billingAccountId,
158
157
  provider: o,
159
158
  gatewayPaymentId: s,
160
159
  currency: n.currency,
161
- amount: a,
162
- purchaseType: c,
163
- purchaseDetail: d,
160
+ amount: i,
161
+ purchaseType: l,
162
+ purchaseDetail: u,
164
163
  reason: "",
165
164
  notes: ""
166
165
  });
167
166
  } catch {
168
- p("Failed to look up transaction. Ensure the ID is correct."), y(V);
167
+ p("Failed to look up transaction. Ensure the ID is correct."), y(z);
169
168
  } finally {
170
169
  g(!1);
171
170
  }
172
171
  }
173
- }, [i]), C = async (e) => {
174
- e.preventDefault(), await n(_), b();
172
+ }, [a]), C = async (e) => {
173
+ e.preventDefault(), await n(v), b();
175
174
  };
176
175
  if (!e) return null;
177
- let w = c?.totalAmount ?? void 0, E = w !== void 0 && _.amount > w + .01;
178
- return /* @__PURE__ */ I("div", {
176
+ let T = l?.totalAmount ?? void 0, E = T !== void 0 && v.amount > T + .01;
177
+ return /* @__PURE__ */ P("div", {
179
178
  className: "fixed inset-0 z-50 flex items-center justify-center",
180
- children: [/* @__PURE__ */ F("div", {
179
+ children: [/* @__PURE__ */ N("div", {
181
180
  className: "absolute inset-0 bg-overlay-scrim",
182
181
  onClick: x
183
- }), /* @__PURE__ */ I("div", {
182
+ }), /* @__PURE__ */ P("div", {
184
183
  className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
185
- children: [/* @__PURE__ */ I("div", {
184
+ children: [/* @__PURE__ */ P("div", {
186
185
  className: "flex items-center justify-between p-4 border-b border-border-subtle",
187
- children: [/* @__PURE__ */ F("h2", {
186
+ children: [/* @__PURE__ */ N("h2", {
188
187
  className: "text-lg font-semibold",
189
188
  children: "Create Manual Refund"
190
- }), /* @__PURE__ */ F("button", {
189
+ }), /* @__PURE__ */ N("button", {
191
190
  type: "button",
192
191
  onClick: x,
193
192
  className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
194
- children: /* @__PURE__ */ F(M, { className: "size-5" })
193
+ children: /* @__PURE__ */ N(A, { className: "size-5" })
195
194
  })]
196
- }), /* @__PURE__ */ I("form", {
195
+ }), /* @__PURE__ */ P("form", {
197
196
  onSubmit: C,
198
197
  className: "p-4 space-y-4",
199
198
  children: [
200
- /* @__PURE__ */ I("div", { children: [
201
- /* @__PURE__ */ F("label", {
199
+ /* @__PURE__ */ P("div", { children: [
200
+ /* @__PURE__ */ N("label", {
202
201
  className: "block text-sm font-medium mb-1",
203
202
  children: "Transaction ID *"
204
203
  }),
205
- /* @__PURE__ */ I("div", {
204
+ /* @__PURE__ */ P("div", {
206
205
  className: "flex gap-2",
207
- children: [/* @__PURE__ */ F("input", {
206
+ children: [/* @__PURE__ */ N("input", {
208
207
  type: "text",
209
208
  value: o,
210
209
  onChange: (e) => {
211
- s(e.target.value), u(null), p(null);
210
+ s(e.target.value), d(null), p(null);
212
211
  },
213
212
  onBlur: () => S(o),
214
213
  className: "flex-1 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
215
214
  placeholder: "Paste transaction UUID...",
216
215
  required: !0
217
- }), /* @__PURE__ */ F("button", {
216
+ }), /* @__PURE__ */ N("button", {
218
217
  type: "button",
219
218
  onClick: () => S(o),
220
- disabled: !o.trim() || m,
219
+ disabled: !o.trim() || h,
221
220
  className: "px-3 py-2 border border-border-subtle rounded-md hover:bg-bg-sunken/50 transition-colors disabled:opacity-50 flex items-center gap-1 text-sm",
222
- children: m ? /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }) : /* @__PURE__ */ F(A, { className: "size-4" })
221
+ children: h ? /* @__PURE__ */ N(w, { className: "size-4 animate-spin" }) : /* @__PURE__ */ N(O, { className: "size-4" })
223
222
  })]
224
223
  }),
225
- f && /* @__PURE__ */ F("p", {
224
+ f && /* @__PURE__ */ N("p", {
226
225
  className: "text-xs text-status-error-text mt-1",
227
226
  children: f
228
227
  }),
229
- m && /* @__PURE__ */ F("p", {
228
+ h && /* @__PURE__ */ N("p", {
230
229
  className: "text-xs text-text-muted mt-1",
231
230
  children: "Looking up transaction…"
232
231
  })
233
232
  ] }),
234
- c && /* @__PURE__ */ I(P, { children: [
235
- /* @__PURE__ */ I("div", {
233
+ l && /* @__PURE__ */ P(M, { children: [
234
+ /* @__PURE__ */ P("div", {
236
235
  className: "p-3 bg-status-success-bg-subtle border border-border-subtle rounded-md text-sm space-y-1",
237
- children: [/* @__PURE__ */ I("div", {
236
+ children: [/* @__PURE__ */ P("div", {
238
237
  className: "flex items-center gap-2 text-status-success-text font-medium",
239
- children: [/* @__PURE__ */ F(v, { className: "size-4" }), "Transaction found"]
240
- }), /* @__PURE__ */ I("div", {
238
+ children: [/* @__PURE__ */ N(_, { className: "size-4" }), "Transaction found"]
239
+ }), /* @__PURE__ */ P("div", {
241
240
  className: "text-text-muted grid grid-cols-2 gap-x-4 gap-y-0.5 mt-1",
242
241
  children: [
243
- /* @__PURE__ */ I("span", { children: [
242
+ /* @__PURE__ */ P("span", { children: [
244
243
  "Account:",
245
244
  " ",
246
- /* @__PURE__ */ I("span", {
245
+ /* @__PURE__ */ P("span", {
247
246
  className: "text-text-primary font-mono text-xs",
248
- children: [c.billingAccountId.slice(0, 16), "…"]
247
+ children: [l.billingAccountId.slice(0, 16), "…"]
249
248
  })
250
249
  ] }),
251
- /* @__PURE__ */ I("span", { children: [
250
+ /* @__PURE__ */ P("span", { children: [
252
251
  "Paid:",
253
252
  " ",
254
- /* @__PURE__ */ F("span", {
253
+ /* @__PURE__ */ N("span", {
255
254
  className: "text-text-primary",
256
- children: a(c.totalAmount, c.currency)
255
+ children: i(l.totalAmount, l.currency)
257
256
  })
258
257
  ] }),
259
- /* @__PURE__ */ I("span", { children: [
258
+ /* @__PURE__ */ P("span", { children: [
260
259
  "Provider:",
261
260
  " ",
262
- /* @__PURE__ */ F("span", {
261
+ /* @__PURE__ */ N("span", {
263
262
  className: "text-text-primary capitalize",
264
- children: _.provider
263
+ children: v.provider
265
264
  })
266
265
  ] }),
267
- /* @__PURE__ */ I("span", { children: ["Currency: ", /* @__PURE__ */ F("span", {
266
+ /* @__PURE__ */ P("span", { children: ["Currency: ", /* @__PURE__ */ N("span", {
268
267
  className: "text-text-primary",
269
- children: c.currency
268
+ children: l.currency
270
269
  })] })
271
270
  ]
272
271
  })]
273
272
  }),
274
- /* @__PURE__ */ I("div", {
273
+ /* @__PURE__ */ P("div", {
275
274
  className: "grid grid-cols-2 gap-3",
276
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
275
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
277
276
  className: "block text-xs font-medium text-text-muted mb-1",
278
277
  children: "Provider"
279
- }), /* @__PURE__ */ F("div", {
278
+ }), /* @__PURE__ */ N("div", {
280
279
  className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm capitalize",
281
- children: _.provider
282
- })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
280
+ children: v.provider
281
+ })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
283
282
  className: "block text-xs font-medium text-text-muted mb-1",
284
283
  children: "Currency"
285
- }), /* @__PURE__ */ F("div", {
284
+ }), /* @__PURE__ */ N("div", {
286
285
  className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm",
287
- children: _.currency
286
+ children: v.currency
288
287
  })] })]
289
288
  }),
290
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
289
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
291
290
  className: "block text-xs font-medium text-text-muted mb-1",
292
291
  children: "Gateway Payment ID"
293
- }), /* @__PURE__ */ F("div", {
292
+ }), /* @__PURE__ */ N("div", {
294
293
  className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm font-mono truncate",
295
- children: _.gatewayPaymentId
294
+ children: v.gatewayPaymentId
296
295
  })] }),
297
- _.purchaseType && /* @__PURE__ */ I("div", {
296
+ v.purchaseType && /* @__PURE__ */ P("div", {
298
297
  className: "grid grid-cols-2 gap-3",
299
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
298
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
300
299
  className: "block text-xs font-medium text-text-muted mb-1",
301
300
  children: "Purchase Type"
302
- }), /* @__PURE__ */ F("div", {
301
+ }), /* @__PURE__ */ N("div", {
303
302
  className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm",
304
- children: _.purchaseType
305
- })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
303
+ children: v.purchaseType
304
+ })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
306
305
  className: "block text-xs font-medium text-text-muted mb-1",
307
306
  children: "Purchase Detail"
308
- }), /* @__PURE__ */ F("div", {
307
+ }), /* @__PURE__ */ N("div", {
309
308
  className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/30 text-sm truncate",
310
- children: _.purchaseDetail || "—"
309
+ children: v.purchaseDetail || "—"
311
310
  })] })]
312
311
  }),
313
- /* @__PURE__ */ I("div", { children: [
314
- /* @__PURE__ */ I("label", {
312
+ /* @__PURE__ */ P("div", { children: [
313
+ /* @__PURE__ */ P("label", {
315
314
  className: "block text-sm font-medium mb-1",
316
- children: ["Refund Amount *", /* @__PURE__ */ I("span", {
315
+ children: ["Refund Amount *", /* @__PURE__ */ P("span", {
317
316
  className: "text-xs text-text-muted ml-1",
318
317
  children: [
319
318
  "(max ",
320
- a(w, _.currency),
319
+ i(T, v.currency),
321
320
  ")"
322
321
  ]
323
322
  })]
324
323
  }),
325
- /* @__PURE__ */ F("input", {
324
+ /* @__PURE__ */ N("input", {
326
325
  type: "number",
327
326
  step: "0.01",
328
327
  min: "0.01",
329
- max: w,
330
- value: _.amount,
328
+ max: T,
329
+ value: v.amount,
331
330
  onChange: (e) => y({
332
- ..._,
331
+ ...v,
333
332
  amount: parseFloat(e.target.value) || 0
334
333
  }),
335
334
  className: `w-full px-3 py-2 border rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${E ? "border-status-error-text" : "border-border-subtle"}`,
336
335
  required: !0
337
336
  }),
338
- E && /* @__PURE__ */ I("p", {
337
+ E && /* @__PURE__ */ P("p", {
339
338
  className: "text-xs text-status-error-text mt-1",
340
339
  children: [
341
340
  "Amount cannot exceed the original payment of",
342
341
  " ",
343
- a(w, _.currency)
342
+ i(T, v.currency)
344
343
  ]
345
344
  })
346
345
  ] }),
347
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
346
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
348
347
  className: "block text-sm font-medium mb-1",
349
348
  children: "Reason"
350
- }), /* @__PURE__ */ F("input", {
349
+ }), /* @__PURE__ */ N("input", {
351
350
  type: "text",
352
- value: _.reason || "",
351
+ value: v.reason || "",
353
352
  onChange: (e) => y({
354
- ..._,
353
+ ...v,
355
354
  reason: e.target.value
356
355
  }),
357
356
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
358
357
  placeholder: "Reason for refund"
359
358
  })] }),
360
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
359
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
361
360
  className: "block text-sm font-medium mb-1",
362
361
  children: "Notes"
363
- }), /* @__PURE__ */ F("textarea", {
364
- value: _.notes || "",
362
+ }), /* @__PURE__ */ N("textarea", {
363
+ value: v.notes || "",
365
364
  onChange: (e) => y({
366
- ..._,
365
+ ...v,
367
366
  notes: e.target.value
368
367
  }),
369
368
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none",
@@ -371,67 +370,67 @@ var R = {
371
370
  placeholder: "Internal notes"
372
371
  })] })
373
372
  ] }),
374
- /* @__PURE__ */ I("div", {
373
+ /* @__PURE__ */ P("div", {
375
374
  className: "flex gap-2 pt-2",
376
- children: [/* @__PURE__ */ F("button", {
375
+ children: [/* @__PURE__ */ N("button", {
377
376
  type: "button",
378
377
  onClick: x,
379
378
  className: "flex-1 py-2 px-4 border border-border-subtle rounded-md hover:bg-bg-sunken/50 transition-colors",
380
379
  children: "Cancel"
381
- }), /* @__PURE__ */ I("button", {
380
+ }), /* @__PURE__ */ P("button", {
382
381
  type: "submit",
383
- disabled: r || !c || !_.gatewayPaymentId || _.amount <= 0 || E,
382
+ disabled: r || !l || !v.gatewayPaymentId || v.amount <= 0 || E,
384
383
  className: "flex-1 py-2 px-4 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bgHover transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",
385
- children: [r && /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }), "Create Refund"]
384
+ children: [r && /* @__PURE__ */ N(w, { className: "size-4 animate-spin" }), "Create Refund"]
386
385
  })]
387
386
  })
388
387
  ]
389
388
  })]
390
389
  })]
391
390
  });
392
- }, se = ({ isOpen: e, record: t, onClose: n, onSubmit: i, isSubmitting: o }) => {
393
- let [s, c] = h("");
394
- return !e || !t ? null : /* @__PURE__ */ I("div", {
391
+ }, ue = ({ isOpen: e, record: t, onClose: r, onSubmit: a, isSubmitting: o }) => {
392
+ let [s, c] = m("");
393
+ return !e || !t ? null : /* @__PURE__ */ P("div", {
395
394
  className: "fixed inset-0 z-50 flex items-center justify-center",
396
- children: [/* @__PURE__ */ F("div", {
395
+ children: [/* @__PURE__ */ N("div", {
397
396
  className: "absolute inset-0 bg-overlay-scrim",
398
- onClick: n
399
- }), /* @__PURE__ */ I("div", {
397
+ onClick: r
398
+ }), /* @__PURE__ */ P("div", {
400
399
  className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-md w-full mx-4",
401
- children: [/* @__PURE__ */ I("div", {
400
+ children: [/* @__PURE__ */ P("div", {
402
401
  className: "flex items-center justify-between p-4 border-b border-border-subtle",
403
- children: [/* @__PURE__ */ F("h2", {
402
+ children: [/* @__PURE__ */ N("h2", {
404
403
  className: "text-lg font-semibold",
405
404
  children: "Skip Refund"
406
- }), /* @__PURE__ */ F("button", {
405
+ }), /* @__PURE__ */ N("button", {
407
406
  type: "button",
408
- onClick: n,
407
+ onClick: r,
409
408
  className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
410
- children: /* @__PURE__ */ F(M, { className: "size-5" })
409
+ children: /* @__PURE__ */ N(A, { className: "size-5" })
411
410
  })]
412
- }), /* @__PURE__ */ I("form", {
411
+ }), /* @__PURE__ */ P("form", {
413
412
  onSubmit: async (e) => {
414
- e.preventDefault(), await i(s), c("");
413
+ e.preventDefault(), await a(s), c("");
415
414
  },
416
415
  className: "p-4 space-y-4",
417
416
  children: [
418
- /* @__PURE__ */ F("div", {
419
- className: `p-3 ${r.warning.bg} border ${r.warning.border} rounded-md`,
420
- children: /* @__PURE__ */ I("div", {
417
+ /* @__PURE__ */ N("div", {
418
+ className: `p-3 ${n.warning.bg} border ${n.warning.border} rounded-md`,
419
+ children: /* @__PURE__ */ P("div", {
421
420
  className: "flex items-start gap-2",
422
- children: [/* @__PURE__ */ F(g, { className: `size-5 ${r.warning.icon} mt-0.5` }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
423
- className: `text-sm font-medium ${r.warning.text}`,
421
+ children: [/* @__PURE__ */ N(h, { className: `size-5 ${n.warning.icon} mt-0.5` }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
422
+ className: `text-sm font-medium ${n.warning.text}`,
424
423
  children: "You are about to skip this refund"
425
- }), /* @__PURE__ */ I("p", {
426
- className: `text-sm ${r.warning.text} mt-1`,
427
- children: ["Amount: ", a(t.amount, t.currency)]
424
+ }), /* @__PURE__ */ P("p", {
425
+ className: `text-sm ${n.warning.text} mt-1`,
426
+ children: ["Amount: ", i(t.amount, t.currency)]
428
427
  })] })]
429
428
  })
430
429
  }),
431
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
430
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
432
431
  className: "block text-sm font-medium mb-1",
433
432
  children: "Reason for skipping *"
434
- }), /* @__PURE__ */ F("textarea", {
433
+ }), /* @__PURE__ */ N("textarea", {
435
434
  value: s,
436
435
  onChange: (e) => c(e.target.value),
437
436
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface resize-none",
@@ -439,180 +438,180 @@ var R = {
439
438
  placeholder: "Explain why this refund is being skipped...",
440
439
  required: !0
441
440
  })] }),
442
- /* @__PURE__ */ I("div", {
441
+ /* @__PURE__ */ P("div", {
443
442
  className: "flex gap-2",
444
- children: [/* @__PURE__ */ F("button", {
443
+ children: [/* @__PURE__ */ N("button", {
445
444
  type: "button",
446
- onClick: n,
445
+ onClick: r,
447
446
  className: "flex-1 py-2 px-4 border border-border-subtle rounded-md hover:bg-bg-sunken/50 transition-colors",
448
447
  children: "Cancel"
449
- }), /* @__PURE__ */ I("button", {
448
+ }), /* @__PURE__ */ P("button", {
450
449
  type: "submit",
451
450
  disabled: o || !s.trim(),
452
- className: `flex-1 py-2 px-4 ${r.warning.dot} text-action-primary-text rounded-md hover:opacity-90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2`,
453
- children: [o && /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }), "Skip Refund"]
451
+ className: `flex-1 py-2 px-4 ${n.warning.dot} text-action-primary-text rounded-md hover:opacity-90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2`,
452
+ children: [o && /* @__PURE__ */ N(w, { className: "size-4 animate-spin" }), "Skip Refund"]
454
453
  })]
455
454
  })
456
455
  ]
457
456
  })]
458
457
  })]
459
458
  });
460
- }, ce = ({ record: e, onClose: t }) => {
459
+ }, de = ({ record: e, onClose: t }) => {
461
460
  if (!e) return null;
462
- let n = R[e.status].icon;
463
- return /* @__PURE__ */ I("div", {
461
+ let r = I[e.status].icon;
462
+ return /* @__PURE__ */ P("div", {
464
463
  className: "fixed inset-0 z-50 flex items-center justify-center",
465
- children: [/* @__PURE__ */ F("div", {
464
+ children: [/* @__PURE__ */ N("div", {
466
465
  className: "absolute inset-0 bg-overlay-scrim",
467
466
  onClick: t
468
- }), /* @__PURE__ */ I("div", {
467
+ }), /* @__PURE__ */ P("div", {
469
468
  className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] max-w-lg w-full mx-4 max-h-[90vh] overflow-auto",
470
469
  children: [
471
- /* @__PURE__ */ I("div", {
470
+ /* @__PURE__ */ P("div", {
472
471
  className: "flex items-center justify-between p-4 border-b border-border-subtle",
473
- children: [/* @__PURE__ */ F("h2", {
472
+ children: [/* @__PURE__ */ N("h2", {
474
473
  className: "text-lg font-semibold",
475
474
  children: "Refund Details"
476
- }), /* @__PURE__ */ F("button", {
475
+ }), /* @__PURE__ */ N("button", {
477
476
  type: "button",
478
477
  onClick: t,
479
478
  className: "p-1 rounded-md hover:bg-bg-sunken/50 transition-colors",
480
- children: /* @__PURE__ */ F(M, { className: "size-5" })
479
+ children: /* @__PURE__ */ N(A, { className: "size-5" })
481
480
  })]
482
481
  }),
483
- /* @__PURE__ */ I("div", {
482
+ /* @__PURE__ */ P("div", {
484
483
  className: "p-4 space-y-4",
485
484
  children: [
486
- /* @__PURE__ */ I("div", {
487
- className: `flex items-center gap-2 p-3 rounded-md ${B(R[e.status].color)}`,
488
- children: [/* @__PURE__ */ F(n, { className: "size-5" }), /* @__PURE__ */ F("span", {
485
+ /* @__PURE__ */ P("div", {
486
+ className: `flex items-center gap-2 p-3 rounded-md ${R(I[e.status].color)}`,
487
+ children: [/* @__PURE__ */ N(r, { className: "size-5" }), /* @__PURE__ */ N("span", {
489
488
  className: "font-medium",
490
- children: R[e.status].label
489
+ children: I[e.status].label
491
490
  })]
492
491
  }),
493
- /* @__PURE__ */ I("div", {
492
+ /* @__PURE__ */ P("div", {
494
493
  className: "grid grid-cols-2 gap-4",
495
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
494
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
496
495
  className: "text-xs text-text-muted mb-1",
497
496
  children: "Refund ID"
498
- }), /* @__PURE__ */ F("p", {
497
+ }), /* @__PURE__ */ N("p", {
499
498
  className: "text-sm font-mono break-all",
500
499
  children: e.id
501
- })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
500
+ })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
502
501
  className: "text-xs text-text-muted mb-1",
503
502
  children: "Source"
504
- }), /* @__PURE__ */ F("p", {
503
+ }), /* @__PURE__ */ N("p", {
505
504
  className: "text-sm",
506
- children: z[e.source]
505
+ children: L[e.source]
507
506
  })] })]
508
507
  }),
509
- /* @__PURE__ */ I("div", {
508
+ /* @__PURE__ */ P("div", {
510
509
  className: "grid grid-cols-2 gap-4",
511
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
510
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
512
511
  className: "text-xs text-text-muted mb-1",
513
512
  children: "Amount"
514
- }), /* @__PURE__ */ F("p", {
513
+ }), /* @__PURE__ */ N("p", {
515
514
  className: "text-lg font-semibold",
516
- children: a(e.amount, e.currency)
517
- })] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
515
+ children: i(e.amount, e.currency)
516
+ })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
518
517
  className: "text-xs text-text-muted mb-1",
519
518
  children: "Provider"
520
- }), /* @__PURE__ */ F("p", {
519
+ }), /* @__PURE__ */ N("p", {
521
520
  className: "text-sm capitalize",
522
521
  children: e.provider
523
522
  })] })]
524
523
  }),
525
- /* @__PURE__ */ I("div", {
524
+ /* @__PURE__ */ P("div", {
526
525
  className: "grid grid-cols-2 gap-4",
527
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
526
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
528
527
  className: "text-xs text-text-muted mb-1",
529
528
  children: "Gateway Payment ID"
530
- }), /* @__PURE__ */ F("p", {
529
+ }), /* @__PURE__ */ N("p", {
531
530
  className: "text-sm font-mono break-all",
532
531
  children: e.gatewayPaymentId
533
- })] }), e.gatewayOrderId && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
532
+ })] }), e.gatewayOrderId && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
534
533
  className: "text-xs text-text-muted mb-1",
535
534
  children: "Gateway Order ID"
536
- }), /* @__PURE__ */ F("p", {
535
+ }), /* @__PURE__ */ N("p", {
537
536
  className: "text-sm font-mono break-all",
538
537
  children: e.gatewayOrderId
539
538
  })] })]
540
539
  }),
541
- e.gatewayRefundId && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
540
+ e.gatewayRefundId && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
542
541
  className: "text-xs text-text-muted mb-1",
543
542
  children: "Gateway Refund ID"
544
- }), /* @__PURE__ */ F("p", {
543
+ }), /* @__PURE__ */ N("p", {
545
544
  className: "text-sm font-mono break-all",
546
545
  children: e.gatewayRefundId
547
546
  })] }),
548
- (e.purchaseType || e.purchaseDetail) && /* @__PURE__ */ I("div", {
547
+ (e.purchaseType || e.purchaseDetail) && /* @__PURE__ */ P("div", {
549
548
  className: "grid grid-cols-2 gap-4",
550
- children: [e.purchaseType && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
549
+ children: [e.purchaseType && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
551
550
  className: "text-xs text-text-muted mb-1",
552
551
  children: "Purchase Type"
553
- }), /* @__PURE__ */ F("p", {
552
+ }), /* @__PURE__ */ N("p", {
554
553
  className: "text-sm",
555
554
  children: e.purchaseType
556
- })] }), e.purchaseDetail && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
555
+ })] }), e.purchaseDetail && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
557
556
  className: "text-xs text-text-muted mb-1",
558
557
  children: "Purchase Detail"
559
- }), /* @__PURE__ */ F("p", {
558
+ }), /* @__PURE__ */ N("p", {
560
559
  className: "text-sm",
561
560
  children: e.purchaseDetail
562
561
  })] })]
563
562
  }),
564
- e.reason && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
563
+ e.reason && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
565
564
  className: "text-xs text-text-muted mb-1",
566
565
  children: "Reason"
567
- }), /* @__PURE__ */ F("p", {
566
+ }), /* @__PURE__ */ N("p", {
568
567
  className: "text-sm",
569
568
  children: e.reason
570
569
  })] }),
571
- e.notes && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
570
+ e.notes && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
572
571
  className: "text-xs text-text-muted mb-1",
573
572
  children: "Notes"
574
- }), /* @__PURE__ */ F("p", {
573
+ }), /* @__PURE__ */ N("p", {
575
574
  className: "text-sm",
576
575
  children: e.notes
577
576
  })] }),
578
- e.errorMessage && /* @__PURE__ */ I("div", {
579
- className: `p-3 ${r.error.bg} border ${r.error.border} rounded-md`,
580
- children: [/* @__PURE__ */ F("p", {
581
- className: `text-xs ${r.error.text} mb-1`,
577
+ e.errorMessage && /* @__PURE__ */ P("div", {
578
+ className: `p-3 ${n.error.bg} border ${n.error.border} rounded-md`,
579
+ children: [/* @__PURE__ */ N("p", {
580
+ className: `text-xs ${n.error.text} mb-1`,
582
581
  children: "Error Message"
583
- }), /* @__PURE__ */ F("p", {
584
- className: `text-sm ${r.error.text}`,
582
+ }), /* @__PURE__ */ N("p", {
583
+ className: `text-sm ${n.error.text}`,
585
584
  children: e.errorMessage
586
585
  })]
587
586
  }),
588
- /* @__PURE__ */ I("div", {
587
+ /* @__PURE__ */ P("div", {
589
588
  className: "grid grid-cols-2 gap-4 pt-2 border-t border-border-subtle",
590
- children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
589
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
591
590
  className: "text-xs text-text-muted mb-1",
592
591
  children: "Created At"
593
- }), /* @__PURE__ */ F("p", {
592
+ }), /* @__PURE__ */ N("p", {
594
593
  className: "text-sm",
595
- children: o(e.createdAt)
596
- })] }), e.processedAt && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
594
+ children: a(e.createdAt)
595
+ })] }), e.processedAt && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
597
596
  className: "text-xs text-text-muted mb-1",
598
597
  children: "Processed At"
599
- }), /* @__PURE__ */ F("p", {
598
+ }), /* @__PURE__ */ N("p", {
600
599
  className: "text-sm",
601
- children: o(e.processedAt)
600
+ children: a(e.processedAt)
602
601
  })] })]
603
602
  }),
604
- e.retryCount > 0 && /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
603
+ e.retryCount > 0 && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
605
604
  className: "text-xs text-text-muted mb-1",
606
605
  children: "Retry Count"
607
- }), /* @__PURE__ */ F("p", {
606
+ }), /* @__PURE__ */ N("p", {
608
607
  className: "text-sm",
609
608
  children: e.retryCount
610
609
  })] })
611
610
  ]
612
611
  }),
613
- /* @__PURE__ */ F("div", {
612
+ /* @__PURE__ */ N("div", {
614
613
  className: "p-4 border-t border-border-subtle",
615
- children: /* @__PURE__ */ F("button", {
614
+ children: /* @__PURE__ */ N("button", {
616
615
  type: "button",
617
616
  onClick: t,
618
617
  className: "w-full py-2 px-4 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bgHover transition-colors",
@@ -622,7 +621,7 @@ var R = {
622
621
  ]
623
622
  })]
624
623
  });
625
- }, H = {
624
+ }, B = {
626
625
  PENDING: {
627
626
  label: "Pending",
628
627
  status: "PENDING"
@@ -639,95 +638,95 @@ var R = {
639
638
  label: "All",
640
639
  status: void 0
641
640
  }
642
- }, U = () => {
643
- let { t: r } = te(), l = (e, t) => {
644
- let n = r(e);
645
- return n === e ? t : n;
646
- }, d = c(), [f, m] = h("PENDING"), [g, _] = h(""), [v, x] = h({}), [C, E] = h(!1), [D, k] = h(null), [j, N] = h(!1), [P, L] = h(!1), [V, U] = h(null), [le, W] = h(null), { records: G, stats: K, pagination: q, isLoading: ue, recordsError: J, unprocessedWebhooks: Y, refetch: X, goToNextPage: de, goToPreviousPage: fe, setFilters: Z, createRefundRecord: pe, processRefund: me, skipRefund: he, retryRefund: ge, createRefundRecordsFromFailedWebhooks: _e, isCreating: ve, isProcessing: ye, isCreatingFromWebhooks: Q } = u({ filters: p(() => ({
647
- ...v,
648
- status: H[f].status
641
+ }, V = () => {
642
+ let { t: n } = ne(), c = (e, t) => {
643
+ let r = n(e);
644
+ return r === e ? t : r;
645
+ }, u = s(), [d, p] = m("PENDING"), [h, g] = m(""), [_, b] = m({}), [S, T] = m(!1), [E, D] = m(null), [k, j] = m(!1), [M, F] = m(!1), [z, V] = m(null), [fe, H] = m(null), { records: U, stats: W, pagination: G, isLoading: pe, recordsError: K, unprocessedWebhooks: q, refetch: J, goToNextPage: me, goToPreviousPage: he, setFilters: Y, createRefundRecord: ge, processRefund: _e, skipRefund: ve, retryRefund: ye, createRefundRecordsFromFailedWebhooks: be, isCreating: xe, isProcessing: Se, isCreatingFromWebhooks: X } = l({ filters: f(() => ({
646
+ ..._,
647
+ status: B[d].status
649
648
  }), [
650
- f,
651
- v.source,
652
- v.provider,
653
- v.billingAccountId,
654
- v.fromDate,
655
- v.toDate
649
+ d,
650
+ _.source,
651
+ _.provider,
652
+ _.billingAccountId,
653
+ _.fromDate,
654
+ _.toDate
656
655
  ]) });
657
- if (!d.canViewPayments) return /* @__PURE__ */ F(e, { message: "You don't have permission to view refunds." });
658
- if (J && s(J)) return /* @__PURE__ */ F("div", {
656
+ if (!u.canViewPayments) return /* @__PURE__ */ N(e, { message: "You don't have permission to view refunds." });
657
+ if (K && o(K)) return /* @__PURE__ */ N("div", {
659
658
  className: "p-6",
660
- children: /* @__PURE__ */ F(i, {
659
+ children: /* @__PURE__ */ N(r, {
661
660
  title: "Server Unavailable",
662
661
  message: "Unable to load refunds. The server might be down or experiencing issues.",
663
- onRetry: () => X(),
662
+ onRetry: () => J(),
664
663
  showRetry: !0
665
664
  })
666
665
  });
667
- let be = (e) => {
668
- m(e), x({}), _("");
669
- }, $ = (e, t) => {
666
+ let Z = (e) => {
667
+ p(e), b({}), g("");
668
+ }, Q = (e, t) => {
670
669
  if (e === "status") return;
671
670
  let n = {
672
- ...v,
671
+ ..._,
673
672
  [e]: t || void 0
674
673
  };
675
- x(n), Z({
674
+ b(n), Y({
676
675
  ...n,
677
- status: H[f].status
676
+ status: B[d].status
678
677
  });
679
- }, xe = async (e) => {
678
+ }, Ce = async (e) => {
680
679
  try {
681
- await pe(e), N(!1);
680
+ await ge(e), j(!1);
682
681
  } catch (e) {
683
682
  console.error("Failed to create refund:", e);
684
683
  }
685
- }, Se = async (e) => {
686
- W(e.id);
684
+ }, we = async (e) => {
685
+ H(e.id);
687
686
  try {
688
- let t = await me(e.id);
687
+ let t = await _e(e.id);
689
688
  !t.success && t.error && console.error("Refund processing failed:", t.error);
690
689
  } catch (e) {
691
690
  console.error("Failed to process refund:", e);
692
691
  } finally {
693
- W(null);
692
+ H(null);
694
693
  }
695
- }, Ce = async (e) => {
696
- if (V) try {
697
- await he(V.id, e), L(!1), U(null);
694
+ }, Te = async (e) => {
695
+ if (z) try {
696
+ await ve(z.id, e), F(!1), V(null);
698
697
  } catch (e) {
699
698
  console.error("Failed to skip refund:", e);
700
699
  }
701
- }, we = async (e) => {
702
- W(e.id);
700
+ }, Ee = async (e) => {
701
+ H(e.id);
703
702
  try {
704
- let t = await ge(e.id);
703
+ let t = await ye(e.id);
705
704
  !t.success && t.error && console.error("Refund retry failed:", t.error);
706
705
  } catch (e) {
707
706
  console.error("Failed to retry refund:", e);
708
707
  } finally {
709
- W(null);
708
+ H(null);
710
709
  }
711
- }, Te = async () => {
710
+ }, De = async () => {
712
711
  try {
713
- await _e();
712
+ await be();
714
713
  } catch (e) {
715
714
  console.error("Failed to create refunds from webhooks:", e);
716
715
  }
717
- }, Ee = g ? G.filter((e) => e.gatewayPaymentId.toLowerCase().includes(g.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(g.toLowerCase()) || e.reason?.toLowerCase().includes(g.toLowerCase())) : G, De = [
716
+ }, $ = h ? U.filter((e) => e.gatewayPaymentId.toLowerCase().includes(h.toLowerCase()) || e.gatewayOrderId?.toLowerCase().includes(h.toLowerCase()) || e.reason?.toLowerCase().includes(h.toLowerCase())) : U, Oe = [
718
717
  {
719
718
  key: "date",
720
719
  header: "Date",
721
720
  priority: "primary",
722
721
  cellClassName: "whitespace-nowrap",
723
- cell: (e) => /* @__PURE__ */ I("div", {
722
+ cell: (e) => /* @__PURE__ */ P("div", {
724
723
  className: "flex flex-col",
725
- children: [/* @__PURE__ */ F("span", {
724
+ children: [/* @__PURE__ */ N("span", {
726
725
  className: "text-sm text-text-primary",
727
- children: o(e.createdAt).split(" ")[0]
728
- }), /* @__PURE__ */ F("span", {
726
+ children: a(e.createdAt).split(" ")[0]
727
+ }), /* @__PURE__ */ N("span", {
729
728
  className: "text-xs text-text-muted",
730
- children: o(e.createdAt).split(" ")[1]
729
+ children: a(e.createdAt).split(" ")[1]
731
730
  })]
732
731
  })
733
732
  },
@@ -736,12 +735,12 @@ var R = {
736
735
  header: "Status",
737
736
  cellClassName: "whitespace-nowrap",
738
737
  cell: (e) => {
739
- let t = R[e.status].icon;
740
- return /* @__PURE__ */ I("span", {
741
- className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${B(R[e.status].color)}`,
742
- children: [/* @__PURE__ */ F(t, { className: "size-3" }), /* @__PURE__ */ F("span", {
738
+ let t = I[e.status].icon;
739
+ return /* @__PURE__ */ P("span", {
740
+ className: `inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded ${R(I[e.status].color)}`,
741
+ children: [/* @__PURE__ */ N(t, { className: "size-3" }), /* @__PURE__ */ N("span", {
743
742
  className: "hidden sm:inline",
744
- children: R[e.status].label
743
+ children: I[e.status].label
745
744
  })]
746
745
  });
747
746
  }
@@ -751,9 +750,9 @@ var R = {
751
750
  header: "Source",
752
751
  priority: "hidden-on-mobile",
753
752
  cellClassName: "whitespace-nowrap",
754
- cell: (e) => /* @__PURE__ */ F("span", {
753
+ cell: (e) => /* @__PURE__ */ N("span", {
755
754
  className: "text-sm text-text-muted",
756
- children: z[e.source]
755
+ children: L[e.source]
757
756
  })
758
757
  },
759
758
  {
@@ -761,7 +760,7 @@ var R = {
761
760
  header: "Provider",
762
761
  priority: "hidden-on-mobile",
763
762
  cellClassName: "whitespace-nowrap",
764
- cell: (e) => /* @__PURE__ */ F("span", {
763
+ cell: (e) => /* @__PURE__ */ N("span", {
765
764
  className: "text-sm text-text-primary capitalize",
766
765
  children: e.provider
767
766
  })
@@ -770,7 +769,7 @@ var R = {
770
769
  key: "paymentId",
771
770
  header: "Payment ID",
772
771
  cellClassName: "whitespace-nowrap max-w-[120px] sm:max-w-[200px] truncate",
773
- cell: (e) => /* @__PURE__ */ F("span", {
772
+ cell: (e) => /* @__PURE__ */ N("span", {
774
773
  className: "text-sm font-mono text-text-muted",
775
774
  children: e.gatewayPaymentId
776
775
  })
@@ -780,9 +779,9 @@ var R = {
780
779
  header: "Amount",
781
780
  headerClassName: "text-right",
782
781
  cellClassName: "text-right whitespace-nowrap",
783
- cell: (e) => /* @__PURE__ */ F("span", {
782
+ cell: (e) => /* @__PURE__ */ N("span", {
784
783
  className: "text-sm font-medium tabular-nums",
785
- children: a(e.amount, e.currency)
784
+ children: i(e.amount, e.currency)
786
785
  })
787
786
  },
788
787
  {
@@ -790,26 +789,26 @@ var R = {
790
789
  header: "Reason",
791
790
  priority: "hidden-on-mobile",
792
791
  cellClassName: "max-w-[200px] truncate",
793
- cell: (e) => /* @__PURE__ */ F("span", {
792
+ cell: (e) => /* @__PURE__ */ N("span", {
794
793
  className: "text-sm text-text-muted",
795
794
  children: e.reason || "-"
796
795
  })
797
796
  }
798
- ], Oe = (e) => /* @__PURE__ */ F(ae, {
797
+ ], ke = (e) => /* @__PURE__ */ N(ce, {
799
798
  record: e,
800
- onViewDetails: () => k(e),
801
- onProcess: () => Se(e),
799
+ onViewDetails: () => D(e),
800
+ onProcess: () => we(e),
802
801
  onSkip: () => {
803
- U(e), L(!0);
802
+ V(e), F(!0);
804
803
  },
805
- onRetry: () => we(e),
806
- isProcessing: le === e.id
804
+ onRetry: () => Ee(e),
805
+ isProcessing: fe === e.id
807
806
  });
808
- return ue ? /* @__PURE__ */ I("div", {
807
+ return pe ? /* @__PURE__ */ P("div", {
809
808
  className: "space-y-6 p-6",
810
809
  children: [
811
- /* @__PURE__ */ F("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
812
- /* @__PURE__ */ F("div", {
810
+ /* @__PURE__ */ N("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }),
811
+ /* @__PURE__ */ N("div", {
813
812
  className: "grid grid-cols-5 gap-4",
814
813
  children: [
815
814
  1,
@@ -817,9 +816,9 @@ var R = {
817
816
  3,
818
817
  4,
819
818
  5
820
- ].map((e) => /* @__PURE__ */ F("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-lg" }, e))
819
+ ].map((e) => /* @__PURE__ */ N("div", { className: "h-24 bg-bg-sunken animate-pulse rounded-lg" }, e))
821
820
  }),
822
- /* @__PURE__ */ F("div", {
821
+ /* @__PURE__ */ N("div", {
823
822
  className: "space-y-2",
824
823
  children: [
825
824
  1,
@@ -827,46 +826,47 @@ var R = {
827
826
  3,
828
827
  4,
829
828
  5
830
- ].map((e) => /* @__PURE__ */ F("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
829
+ ].map((e) => /* @__PURE__ */ N("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
831
830
  })
832
831
  ]
833
- }) : /* @__PURE__ */ I("div", {
832
+ }) : /* @__PURE__ */ P("div", {
834
833
  className: "space-y-6 p-6",
835
834
  children: [
836
- /* @__PURE__ */ F(t, {
837
- title: l("billing.refunds.title", "Refund Management"),
835
+ /* @__PURE__ */ N(t, {
836
+ title: c("billing.refunds.title", "Refund Management"),
838
837
  description: "View and manage refund records",
839
- actions: /* @__PURE__ */ F(ne, {
838
+ actions: /* @__PURE__ */ N(re, {
840
839
  primary: {
841
840
  label: "Create Manual Refund",
842
- onSelect: () => N(!0),
843
- icon: /* @__PURE__ */ F(ee, { className: "size-4" })
841
+ onSelect: () => j(!0),
842
+ icon: /* @__PURE__ */ N(ee, { className: "size-4" })
844
843
  },
845
- actions: [...Y.length > 0 ? [{
846
- label: `Import ${Y.length} Failed Webhooks`,
847
- onSelect: Te,
848
- disabled: Q,
849
- icon: Q ? /* @__PURE__ */ F(T, { className: "size-4 animate-spin" }) : /* @__PURE__ */ F(S, { className: "size-4" })
844
+ actions: [...q.length > 0 ? [{
845
+ label: `Import ${q.length} Failed Webhooks`,
846
+ onSelect: De,
847
+ disabled: X,
848
+ icon: X ? /* @__PURE__ */ N(w, { className: "size-4 animate-spin" }) : /* @__PURE__ */ N(x, { className: "size-4" })
850
849
  }] : [], {
851
850
  label: "Refresh",
852
851
  onSelect: () => {
853
- X();
852
+ J();
854
853
  },
855
- icon: /* @__PURE__ */ F(O, { className: "size-4" })
854
+ icon: /* @__PURE__ */ N(te, { className: "size-4" })
856
855
  }]
857
856
  })
858
857
  }),
859
- /* @__PURE__ */ F("div", {
858
+ /* @__PURE__ */ N(ae, { children: c("billing.refunds.purpose", "Track and act on every refund across all billing accounts — manual refunds, ones triggered by cancellations, and those recovered from failed payment-gateway webhooks. Use it to process pending refunds, retry failed ones, skip a refund with a reason, or create a manual refund for a specific transaction.") }),
859
+ /* @__PURE__ */ N("div", {
860
860
  className: "border-b border-border-subtle",
861
- children: /* @__PURE__ */ F("div", {
861
+ children: /* @__PURE__ */ N("div", {
862
862
  className: "flex flex-wrap gap-2 sm:gap-0",
863
- children: Object.keys(H).map((e) => {
864
- let t = f === e, n = K ? e === "PENDING" ? K.pending : e === "COMPLETED" ? K.completed : e === "FAILED" ? K.failed : K.pending + K.processing + K.completed + K.failed + K.skipped : 0;
865
- return /* @__PURE__ */ I("button", {
863
+ children: Object.keys(B).map((e) => {
864
+ let t = d === e, n = W ? e === "PENDING" ? W.pending : e === "COMPLETED" ? W.completed : e === "FAILED" ? W.failed : W.pending + W.processing + W.completed + W.failed + W.skipped : 0;
865
+ return /* @__PURE__ */ P("button", {
866
866
  type: "button",
867
- onClick: () => be(e),
867
+ onClick: () => Z(e),
868
868
  className: `flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors whitespace-nowrap ${t ? "border-action-primary-bg text-text-link" : "border-transparent text-text-muted hover:text-text-primary hover:border-border-subtle"}`,
869
- children: [H[e].label, K && /* @__PURE__ */ F("span", {
869
+ children: [B[e].label, W && /* @__PURE__ */ N("span", {
870
870
  className: `px-2 py-0.5 text-xs rounded-full ${t ? "bg-[var(--color-accent-soft)] text-text-link" : "bg-bg-sunken text-text-muted"}`,
871
871
  children: n
872
872
  })]
@@ -874,97 +874,97 @@ var R = {
874
874
  })
875
875
  })
876
876
  }),
877
- /* @__PURE__ */ I("div", {
877
+ /* @__PURE__ */ P("div", {
878
878
  className: "flex flex-col sm:flex-row gap-4",
879
879
  children: [
880
- /* @__PURE__ */ I("div", {
880
+ /* @__PURE__ */ P("div", {
881
881
  className: "relative flex-1",
882
- children: [/* @__PURE__ */ F(A, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }), /* @__PURE__ */ F("input", {
882
+ children: [/* @__PURE__ */ N(O, { className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-text-muted" }), /* @__PURE__ */ N("input", {
883
883
  type: "text",
884
884
  placeholder: "Search by payment ID, order ID, or reason...",
885
- value: g,
886
- onChange: (e) => _(e.target.value),
885
+ value: h,
886
+ onChange: (e) => g(e.target.value),
887
887
  className: "w-full pl-[3.25rem] pr-4 py-2 border border-border-subtle rounded-md bg-bg-surface"
888
888
  })]
889
889
  }),
890
- /* @__PURE__ */ I("button", {
890
+ /* @__PURE__ */ P("button", {
891
891
  type: "button",
892
- onClick: () => E(!C),
893
- className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${C ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-text-link" : "border-border-subtle bg-bg-surface hover:bg-bg-sunken/50"}`,
892
+ onClick: () => T(!S),
893
+ className: `inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md border transition-colors ${S ? "border-action-primary-bg bg-[var(--color-accent-soft)] text-text-link" : "border-border-subtle bg-bg-surface hover:bg-bg-sunken/50"}`,
894
894
  children: [
895
- /* @__PURE__ */ F(w, { className: "size-4" }),
895
+ /* @__PURE__ */ N(C, { className: "size-4" }),
896
896
  "Filters",
897
- Object.values(v).filter(Boolean).length > 0 && /* @__PURE__ */ F("span", {
897
+ Object.values(_).filter(Boolean).length > 0 && /* @__PURE__ */ N("span", {
898
898
  className: "px-1.5 py-0.5 text-xs rounded-full bg-action-primary-bg text-action-primary-text",
899
- children: Object.values(v).filter(Boolean).length
899
+ children: Object.values(_).filter(Boolean).length
900
900
  })
901
901
  ]
902
902
  }),
903
- Object.values(v).filter(Boolean).length > 0 && /* @__PURE__ */ I("button", {
903
+ Object.values(_).filter(Boolean).length > 0 && /* @__PURE__ */ P("button", {
904
904
  type: "button",
905
905
  onClick: () => {
906
- x({}), Z({});
906
+ b({}), Y({});
907
907
  },
908
908
  className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md text-text-muted hover:text-text-primary transition-colors",
909
- children: [/* @__PURE__ */ F(M, { className: "size-4" }), "Clear"]
909
+ children: [/* @__PURE__ */ N(A, { className: "size-4" }), "Clear"]
910
910
  })
911
911
  ]
912
912
  }),
913
- C && /* @__PURE__ */ I("div", {
913
+ S && /* @__PURE__ */ P("div", {
914
914
  className: "p-4 border border-border-subtle rounded-lg bg-bg-sunken/30 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
915
915
  children: [
916
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
916
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
917
917
  className: "block text-sm font-medium mb-1",
918
918
  children: "Source"
919
- }), /* @__PURE__ */ I("select", {
920
- value: v.source || "",
921
- onChange: (e) => $("source", e.target.value),
919
+ }), /* @__PURE__ */ P("select", {
920
+ value: _.source || "",
921
+ onChange: (e) => Q("source", e.target.value),
922
922
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
923
- children: [/* @__PURE__ */ F("option", {
923
+ children: [/* @__PURE__ */ N("option", {
924
924
  value: "",
925
925
  children: "All Sources"
926
- }), Object.entries(z).map(([e, t]) => /* @__PURE__ */ F("option", {
926
+ }), Object.entries(L).map(([e, t]) => /* @__PURE__ */ N("option", {
927
927
  value: e,
928
928
  children: t
929
929
  }, e))]
930
930
  })] }),
931
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("label", {
931
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
932
932
  className: "block text-sm font-medium mb-1",
933
933
  children: "Provider"
934
- }), /* @__PURE__ */ I("select", {
935
- value: v.provider || "",
936
- onChange: (e) => $("provider", e.target.value),
934
+ }), /* @__PURE__ */ P("select", {
935
+ value: _.provider || "",
936
+ onChange: (e) => Q("provider", e.target.value),
937
937
  className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
938
- children: [/* @__PURE__ */ F("option", {
938
+ children: [/* @__PURE__ */ N("option", {
939
939
  value: "",
940
940
  children: "All Providers"
941
- }), ie.map((e) => /* @__PURE__ */ F("option", {
941
+ }), se.map((e) => /* @__PURE__ */ N("option", {
942
942
  value: e,
943
943
  children: e.charAt(0).toUpperCase() + e.slice(1)
944
944
  }, e))]
945
945
  })] }),
946
- /* @__PURE__ */ I("div", {
946
+ /* @__PURE__ */ P("div", {
947
947
  className: "sm:col-span-2 lg:col-span-1",
948
- children: [/* @__PURE__ */ F("label", {
948
+ children: [/* @__PURE__ */ N("label", {
949
949
  className: "block text-sm font-medium mb-1",
950
950
  children: "Date Range"
951
- }), /* @__PURE__ */ I("div", {
951
+ }), /* @__PURE__ */ P("div", {
952
952
  className: "flex flex-col sm:flex-row items-start sm:items-center gap-2",
953
953
  children: [
954
- /* @__PURE__ */ F("input", {
954
+ /* @__PURE__ */ N("input", {
955
955
  type: "date",
956
- value: v.fromDate ? v.fromDate.split("T")[0] : "",
957
- onChange: (e) => $("fromDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
956
+ value: _.fromDate ? _.fromDate.split("T")[0] : "",
957
+ onChange: (e) => Q("fromDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
958
958
  className: "w-full sm:flex-1 p-2 border border-border-subtle rounded-md bg-bg-surface text-sm"
959
959
  }),
960
- /* @__PURE__ */ F("span", {
960
+ /* @__PURE__ */ N("span", {
961
961
  className: "text-text-muted hidden sm:inline",
962
962
  children: "-"
963
963
  }),
964
- /* @__PURE__ */ F("input", {
964
+ /* @__PURE__ */ N("input", {
965
965
  type: "date",
966
- value: v.toDate ? v.toDate.split("T")[0] : "",
967
- onChange: (e) => $("toDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
966
+ value: _.toDate ? _.toDate.split("T")[0] : "",
967
+ onChange: (e) => Q("toDate", e.target.value ? new Date(e.target.value).toISOString() : void 0),
968
968
  className: "w-full sm:flex-1 p-2 border border-border-subtle rounded-md bg-bg-surface text-sm"
969
969
  })
970
970
  ]
@@ -972,104 +972,104 @@ var R = {
972
972
  })
973
973
  ]
974
974
  }),
975
- Ee.length === 0 ? /* @__PURE__ */ F(n, {
976
- icon: /* @__PURE__ */ F(O, { className: "size-6 text-text-muted" }),
975
+ $.length === 0 ? /* @__PURE__ */ N(ie, {
976
+ illustration: Object.values(_).filter(Boolean).length > 0 ? "empty-search" : "empty-data",
977
977
  title: "No refund records found",
978
- description: Object.values(v).filter(Boolean).length > 0 ? "Try adjusting your filters." : f === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
979
- }) : /* @__PURE__ */ F("div", {
978
+ description: Object.values(_).filter(Boolean).length > 0 ? "Try adjusting your filters." : d === "PENDING" ? "No pending refunds to process." : "Refund records will appear here when created."
979
+ }) : /* @__PURE__ */ N("div", {
980
980
  className: "border border-border-subtle rounded-lg overflow-hidden",
981
- children: /* @__PURE__ */ F(re, {
982
- columns: De,
983
- data: Ee,
981
+ children: /* @__PURE__ */ N(oe, {
982
+ columns: Oe,
983
+ data: $,
984
984
  rowKey: (e) => e.id,
985
- rowActions: Oe
985
+ rowActions: ke
986
986
  })
987
987
  }),
988
- q.totalCount > 0 && /* @__PURE__ */ I("div", {
988
+ G.totalCount > 0 && /* @__PURE__ */ P("div", {
989
989
  className: "flex flex-col sm:flex-row items-center justify-between gap-4 border-t border-border-subtle pt-4",
990
- children: [/* @__PURE__ */ I("p", {
990
+ children: [/* @__PURE__ */ P("p", {
991
991
  className: "text-sm text-text-muted text-center sm:text-left",
992
992
  children: [
993
993
  "Showing ",
994
- q.page * q.pageSize + 1,
994
+ G.page * G.pageSize + 1,
995
995
  " to",
996
996
  " ",
997
- Math.min((q.page + 1) * q.pageSize, q.totalCount),
997
+ Math.min((G.page + 1) * G.pageSize, G.totalCount),
998
998
  " of",
999
999
  " ",
1000
- q.totalCount,
1000
+ G.totalCount,
1001
1001
  " refunds"
1002
1002
  ]
1003
- }), /* @__PURE__ */ I("div", {
1003
+ }), /* @__PURE__ */ P("div", {
1004
1004
  className: "flex items-center gap-2",
1005
1005
  children: [
1006
- /* @__PURE__ */ I("button", {
1006
+ /* @__PURE__ */ P("button", {
1007
1007
  type: "button",
1008
- onClick: fe,
1009
- disabled: !q.hasPrevious,
1008
+ onClick: he,
1009
+ disabled: !G.hasPrevious,
1010
1010
  className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
1011
- children: [/* @__PURE__ */ F(y, { className: "size-4" }), /* @__PURE__ */ F("span", {
1011
+ children: [/* @__PURE__ */ N(v, { className: "size-4" }), /* @__PURE__ */ N("span", {
1012
1012
  className: "hidden sm:inline",
1013
1013
  children: "Previous"
1014
1014
  })]
1015
1015
  }),
1016
- /* @__PURE__ */ I("span", {
1016
+ /* @__PURE__ */ P("span", {
1017
1017
  className: "text-sm text-text-muted px-2",
1018
1018
  children: [
1019
- /* @__PURE__ */ F("span", {
1019
+ /* @__PURE__ */ N("span", {
1020
1020
  className: "hidden sm:inline",
1021
1021
  children: "Page "
1022
1022
  }),
1023
- q.page + 1,
1023
+ G.page + 1,
1024
1024
  " ",
1025
- /* @__PURE__ */ F("span", {
1025
+ /* @__PURE__ */ N("span", {
1026
1026
  className: "hidden sm:inline",
1027
1027
  children: "of"
1028
1028
  }),
1029
- /* @__PURE__ */ F("span", {
1029
+ /* @__PURE__ */ N("span", {
1030
1030
  className: "sm:hidden",
1031
1031
  children: "/"
1032
1032
  }),
1033
1033
  " ",
1034
- Math.ceil(q.totalCount / q.pageSize)
1034
+ Math.ceil(G.totalCount / G.pageSize)
1035
1035
  ]
1036
1036
  }),
1037
- /* @__PURE__ */ I("button", {
1037
+ /* @__PURE__ */ P("button", {
1038
1038
  type: "button",
1039
- onClick: de,
1040
- disabled: !q.hasMore,
1039
+ onClick: me,
1040
+ disabled: !G.hasMore,
1041
1041
  className: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium rounded-button border border-border-subtle bg-bg-surface hover:bg-bg-sunken/50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
1042
- children: [/* @__PURE__ */ F("span", {
1042
+ children: [/* @__PURE__ */ N("span", {
1043
1043
  className: "hidden sm:inline",
1044
1044
  children: "Next"
1045
- }), /* @__PURE__ */ F(b, { className: "size-4" })]
1045
+ }), /* @__PURE__ */ N(y, { className: "size-4" })]
1046
1046
  })
1047
1047
  ]
1048
1048
  })]
1049
1049
  }),
1050
- /* @__PURE__ */ F(oe, {
1051
- isOpen: j,
1052
- onClose: () => N(!1),
1053
- onSubmit: xe,
1054
- isSubmitting: ve
1050
+ /* @__PURE__ */ N(le, {
1051
+ isOpen: k,
1052
+ onClose: () => j(!1),
1053
+ onSubmit: Ce,
1054
+ isSubmitting: xe
1055
1055
  }),
1056
- /* @__PURE__ */ F(se, {
1057
- isOpen: P,
1058
- record: V,
1056
+ /* @__PURE__ */ N(ue, {
1057
+ isOpen: M,
1058
+ record: z,
1059
1059
  onClose: () => {
1060
- L(!1), U(null);
1060
+ F(!1), V(null);
1061
1061
  },
1062
- onSubmit: Ce,
1063
- isSubmitting: ye
1062
+ onSubmit: Te,
1063
+ isSubmitting: Se
1064
1064
  }),
1065
- /* @__PURE__ */ F(ce, {
1066
- record: D,
1067
- onClose: () => k(null)
1065
+ /* @__PURE__ */ N(de, {
1066
+ record: E,
1067
+ onClose: () => D(null)
1068
1068
  })
1069
1069
  ]
1070
1070
  });
1071
1071
  };
1072
1072
  //#endregion
1073
- export { U as RefundsPage };
1073
+ export { V as RefundsPage };
1074
1074
 
1075
1075
  //# sourceMappingURL=RefundsPage.js.map