@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.4

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