@burdenoff/microfe-billing 2026.624.3 → 2026.625.2

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