@burdenoff/microfe-billing 2026.913.1 → 2026.914.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/billing/BillingAdminRoutes.js +84 -71
  2. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  3. package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
  4. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +90 -87
  5. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  6. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +97 -58
  7. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
  8. package/dist/billing/modules/checkout/components/OrderSummary.js +22 -19
  9. package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
  10. package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
  11. package/dist/billing/modules/checkout/hooks/useCheckout.js +174 -157
  12. package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
  13. package/dist/billing/modules/checkout/pages/CheckoutPage.js +189 -182
  14. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  15. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +293 -274
  16. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  17. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +140 -250
  18. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  19. package/dist/billing/modules/earnings/api.js +79 -42
  20. package/dist/billing/modules/earnings/api.js.map +1 -1
  21. package/dist/billing/modules/earnings/index.js +4 -3
  22. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +103 -310
  23. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
  24. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +545 -0
  25. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -0
  26. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +246 -196
  27. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  28. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +44 -28
  29. package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
  30. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +317 -270
  31. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  32. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +153 -150
  33. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  34. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +1 -1
  35. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  36. package/dist/billing/modules/usage/hooks/useUsage.js +74 -48
  37. package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
  38. package/dist/generated/global-operations.js +220 -183
  39. package/dist/generated/global-operations.js.map +1 -1
  40. package/dist/generated/global-types.js.map +1 -1
  41. package/dist/node_modules/sonner/dist/index.js +163 -0
  42. package/dist/node_modules/sonner/dist/index.js.map +1 -0
  43. package/package.json +1 -1
@@ -8,13 +8,21 @@ import { formatCurrency as a, formatDateTime as o } from "../../../shared/utils/
8
8
  import { isServerError as s } from "../../../shared/utils/error.js";
9
9
  import "../../../shared/utils/index.js";
10
10
  import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
11
- import { approvePayoutRequest as l, fetchAdminPayoutRequests as u, fetchAdminPayoutSummary as d, markPayoutPaid as f, rejectPayoutRequest as p } from "../api.js";
12
- import { useCallback as m, useEffect as h, useMemo as ee, useState as g } from "react";
13
- import { AlertTriangle as _, Banknote as v, CheckCircle2 as y, ChevronDown as b, ChevronUp as x, Clock as S, CreditCard as C, ReceiptText as w, RefreshCw as T, XCircle as E } from "lucide-react";
14
- import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
15
- import { IllustratedEmptyState as A, PagePurpose as j, ResponsiveDialog as M, ResponsiveDialogContent as N, ResponsiveDialogDescription as P, ResponsiveDialogFooter as F, ResponsiveDialogHeader as I, ResponsiveDialogTitle as L } from "@burdenoff/fe-libs/ui";
11
+ import { approvePayoutRequest as l, fetchAdminPayoutRequests as u, fetchAdminPayoutSummary as d, markPayoutPaid as f, rejectPayoutRequest as ee } from "../api.js";
12
+ import { useCallback as te, useEffect as ne, useMemo as re, useState as p } from "react";
13
+ import { AlertTriangle as m, Banknote as h, CheckCircle2 as g, ChevronDown as _, ChevronUp as v, Clock as y, Coins as b, CreditCard as x, ReceiptText as S, RefreshCw as ie, XCircle as C } from "lucide-react";
14
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
15
+ import { IllustratedEmptyState as ae, PagePurpose as D, ResponsiveDialog as O, ResponsiveDialogContent as k, ResponsiveDialogDescription as A, ResponsiveDialogFooter as j, ResponsiveDialogHeader as M, ResponsiveDialogTitle as N } from "@burdenoff/fe-libs/ui";
16
16
  //#region src/billing/modules/earnings/pages/PayoutAdminPage.tsx
17
- var R = 50, z = {
17
+ var P = 50, F = [{
18
+ id: "CASH_PAYOUT",
19
+ label: "Cash Payouts",
20
+ description: "Real money leaves the platform — verify bank/UPI details, then mark as paid."
21
+ }, {
22
+ id: "CREDIT_CONVERSION",
23
+ label: "Revenue Share Credits",
24
+ description: "A developer requesting their revenue share as earned credits. Approving converts the amount straight into credits on their billing account — no bank transfer, nothing further to do."
25
+ }], I = {
18
26
  REQUESTED: "Requested",
19
27
  APPROVED: "Approved",
20
28
  REJECTED: "Rejected",
@@ -22,7 +30,7 @@ var R = 50, z = {
22
30
  PAID: "Paid",
23
31
  FAILED: "Failed",
24
32
  CANCELED: "Canceled"
25
- }, B = {
33
+ }, L = {
26
34
  REQUESTED: "bg-status-warning-bg-subtle text-status-warning-text",
27
35
  APPROVED: "bg-status-info-bg-subtle text-status-info-text",
28
36
  REJECTED: "bg-status-error-bg-subtle text-status-error-text",
@@ -31,24 +39,24 @@ var R = 50, z = {
31
39
  FAILED: "bg-status-error-bg-subtle text-status-error-text",
32
40
  CANCELED: "bg-bg-sunken text-text-muted"
33
41
  };
34
- function V({ status: e }) {
35
- return /* @__PURE__ */ O("span", {
36
- className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${B[e] ?? "bg-bg-sunken text-text-muted"}`,
37
- children: z[e] ?? e
42
+ function R({ status: e }) {
43
+ return /* @__PURE__ */ T("span", {
44
+ className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${L[e] ?? "bg-bg-sunken text-text-muted"}`,
45
+ children: I[e] ?? e
38
46
  });
39
47
  }
40
- function H({ account: e }) {
41
- let [t, n] = g(!1), r = e.accountDetails;
42
- return /* @__PURE__ */ k("div", {
48
+ function z({ account: e }) {
49
+ let [t, n] = p(!1), r = e.accountDetails;
50
+ return /* @__PURE__ */ E("div", {
43
51
  className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm",
44
- children: [/* @__PURE__ */ k("div", {
52
+ children: [/* @__PURE__ */ E("div", {
45
53
  className: "flex items-center justify-between",
46
- children: [/* @__PURE__ */ k("div", {
54
+ children: [/* @__PURE__ */ E("div", {
47
55
  className: "flex items-center gap-2 text-text-primary font-medium",
48
56
  children: [
49
- /* @__PURE__ */ O(C, { className: "size-4 text-text-muted" }),
57
+ /* @__PURE__ */ T(x, { className: "size-4 text-text-muted" }),
50
58
  e.displayName ?? e.label,
51
- /* @__PURE__ */ k("span", {
59
+ /* @__PURE__ */ E("span", {
52
60
  className: "text-xs text-text-muted font-normal",
53
61
  children: [
54
62
  "(",
@@ -62,81 +70,81 @@ function H({ account: e }) {
62
70
  ]
63
71
  })
64
72
  ]
65
- }), r && /* @__PURE__ */ O("button", {
73
+ }), r && /* @__PURE__ */ T("button", {
66
74
  type: "button",
67
75
  onClick: () => n((e) => !e),
68
76
  className: "text-text-muted hover:text-text-primary",
69
- children: O(t ? x : b, { className: "size-4" })
77
+ children: T(t ? v : _, { className: "size-4" })
70
78
  })]
71
- }), t && r && /* @__PURE__ */ k("div", {
79
+ }), t && r && /* @__PURE__ */ E("div", {
72
80
  className: "mt-2 grid gap-1 text-xs",
73
81
  children: [
74
- r.accountHolderName && /* @__PURE__ */ k("div", {
82
+ r.accountHolderName && /* @__PURE__ */ E("div", {
75
83
  className: "flex gap-2",
76
- children: [/* @__PURE__ */ O("span", {
84
+ children: [/* @__PURE__ */ T("span", {
77
85
  className: "text-text-muted w-32 shrink-0",
78
86
  children: "Account holder"
79
- }), /* @__PURE__ */ O("span", {
87
+ }), /* @__PURE__ */ T("span", {
80
88
  className: "text-text-primary",
81
89
  children: r.accountHolderName
82
90
  })]
83
91
  }),
84
- r.bankName && /* @__PURE__ */ k("div", {
92
+ r.bankName && /* @__PURE__ */ E("div", {
85
93
  className: "flex gap-2",
86
- children: [/* @__PURE__ */ O("span", {
94
+ children: [/* @__PURE__ */ T("span", {
87
95
  className: "text-text-muted w-32 shrink-0",
88
96
  children: "Bank"
89
- }), /* @__PURE__ */ O("span", {
97
+ }), /* @__PURE__ */ T("span", {
90
98
  className: "text-text-primary",
91
99
  children: r.bankName
92
100
  })]
93
101
  }),
94
- e.accountLast4 && /* @__PURE__ */ k("div", {
102
+ e.accountLast4 && /* @__PURE__ */ E("div", {
95
103
  className: "flex gap-2",
96
- children: [/* @__PURE__ */ O("span", {
104
+ children: [/* @__PURE__ */ T("span", {
97
105
  className: "text-text-muted w-32 shrink-0",
98
106
  children: "Account (last 4)"
99
- }), /* @__PURE__ */ k("span", {
107
+ }), /* @__PURE__ */ E("span", {
100
108
  className: "text-text-primary font-mono",
101
109
  children: ["••••", e.accountLast4]
102
110
  })]
103
111
  }),
104
- r.ifsc && /* @__PURE__ */ k("div", {
112
+ r.ifsc && /* @__PURE__ */ E("div", {
105
113
  className: "flex gap-2",
106
- children: [/* @__PURE__ */ O("span", {
114
+ children: [/* @__PURE__ */ T("span", {
107
115
  className: "text-text-muted w-32 shrink-0",
108
116
  children: "IFSC"
109
- }), /* @__PURE__ */ O("span", {
117
+ }), /* @__PURE__ */ T("span", {
110
118
  className: "text-text-primary font-mono",
111
119
  children: r.ifsc
112
120
  })]
113
121
  }),
114
- r.routingNumberLast4 && /* @__PURE__ */ k("div", {
122
+ r.routingNumberLast4 && /* @__PURE__ */ E("div", {
115
123
  className: "flex gap-2",
116
- children: [/* @__PURE__ */ O("span", {
124
+ children: [/* @__PURE__ */ T("span", {
117
125
  className: "text-text-muted w-32 shrink-0",
118
126
  children: "Routing (last 4)"
119
- }), /* @__PURE__ */ k("span", {
127
+ }), /* @__PURE__ */ E("span", {
120
128
  className: "text-text-primary font-mono",
121
129
  children: ["••••", r.routingNumberLast4]
122
130
  })]
123
131
  }),
124
- r.upiIdMasked && /* @__PURE__ */ k("div", {
132
+ r.upiIdMasked && /* @__PURE__ */ E("div", {
125
133
  className: "flex gap-2",
126
- children: [/* @__PURE__ */ O("span", {
134
+ children: [/* @__PURE__ */ T("span", {
127
135
  className: "text-text-muted w-32 shrink-0",
128
136
  children: "UPI ID"
129
- }), /* @__PURE__ */ O("span", {
137
+ }), /* @__PURE__ */ T("span", {
130
138
  className: "text-text-primary font-mono",
131
139
  children: r.upiIdMasked
132
140
  })]
133
141
  }),
134
- r.swift && /* @__PURE__ */ k("div", {
142
+ r.swift && /* @__PURE__ */ E("div", {
135
143
  className: "flex gap-2",
136
- children: [/* @__PURE__ */ O("span", {
144
+ children: [/* @__PURE__ */ T("span", {
137
145
  className: "text-text-muted w-32 shrink-0",
138
146
  children: "SWIFT"
139
- }), /* @__PURE__ */ O("span", {
147
+ }), /* @__PURE__ */ T("span", {
140
148
  className: "text-text-primary font-mono",
141
149
  children: r.swift
142
150
  })]
@@ -145,111 +153,114 @@ function H({ account: e }) {
145
153
  })]
146
154
  });
147
155
  }
148
- function U({ request: e, onApprove: t, onReject: n, onMarkPaid: r }) {
149
- let i = e.status === "REQUESTED" || e.status === "REJECTED", s = e.status === "REQUESTED" || e.status === "APPROVED", c = e.status === "APPROVED" || e.status === "PROCESSING";
150
- return /* @__PURE__ */ k("div", {
156
+ function B({ request: e, onApprove: t, onReject: n, onMarkPaid: r }) {
157
+ let i = e.status === "REQUESTED" || e.status === "REJECTED", s = e.status === "REQUESTED" || e.status === "APPROVED", c = e.requestKind === "CASH_PAYOUT" && (e.status === "APPROVED" || e.status === "PROCESSING");
158
+ return /* @__PURE__ */ E("div", {
151
159
  className: "rounded-card border border-border-seam bg-bg-surface p-5 space-y-4 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:shadow-[var(--shadow-elevation-2)]",
152
160
  children: [
153
- /* @__PURE__ */ k("div", {
161
+ /* @__PURE__ */ E("div", {
154
162
  className: "flex flex-wrap items-start justify-between gap-3",
155
- children: [/* @__PURE__ */ k("div", {
163
+ children: [/* @__PURE__ */ E("div", {
156
164
  className: "space-y-1",
157
- children: [/* @__PURE__ */ k("div", {
165
+ children: [/* @__PURE__ */ E("div", {
158
166
  className: "flex items-center gap-2",
159
- children: [/* @__PURE__ */ O("span", {
167
+ children: [/* @__PURE__ */ T("span", {
160
168
  className: "text-xl font-semibold text-text-primary",
161
169
  children: a(e.requestedAmount, e.currency)
162
- }), /* @__PURE__ */ O(V, { status: e.status })]
163
- }), /* @__PURE__ */ k("div", {
170
+ }), /* @__PURE__ */ T(R, { status: e.status })]
171
+ }), /* @__PURE__ */ E("div", {
164
172
  className: "text-xs text-text-muted space-x-2",
165
173
  children: [
166
- /* @__PURE__ */ k("span", { children: ["Requested ", o(e.createdAt)] }),
167
- e.requesterUserId && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("span", { children: "·" }), /* @__PURE__ */ k("span", { children: ["by ", e.requesterUserId] })] }),
168
- /* @__PURE__ */ O("span", { children: "·" }),
169
- /* @__PURE__ */ k("span", {
174
+ /* @__PURE__ */ E("span", { children: ["Requested ", o(e.createdAt)] }),
175
+ e.requesterUserId && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", { children: "·" }), /* @__PURE__ */ E("span", { children: ["by ", e.requesterUserId] })] }),
176
+ /* @__PURE__ */ T("span", { children: "·" }),
177
+ /* @__PURE__ */ E("span", {
170
178
  className: "font-mono text-xs",
171
179
  children: [e.id.slice(0, 8), "…"]
172
180
  })
173
181
  ]
174
182
  })]
175
- }), /* @__PURE__ */ k("div", {
183
+ }), /* @__PURE__ */ E("div", {
176
184
  className: "flex flex-wrap gap-2",
177
185
  children: [
178
- i && /* @__PURE__ */ k("button", {
186
+ i && /* @__PURE__ */ E("button", {
179
187
  type: "button",
180
188
  onClick: () => t(e),
181
189
  className: "inline-flex items-center gap-1.5 rounded-button bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text",
182
- children: [/* @__PURE__ */ O(y, { className: "size-3.5" }), "Approve"]
190
+ children: [/* @__PURE__ */ T(g, { className: "size-3.5" }), "Approve"]
183
191
  }),
184
- c && /* @__PURE__ */ k("button", {
192
+ c && /* @__PURE__ */ E("button", {
185
193
  type: "button",
186
194
  onClick: () => r(e),
187
195
  className: "inline-flex items-center gap-1.5 rounded-button bg-status-success-bg-subtle border border-status-success-border px-3 py-1.5 text-xs font-medium text-status-success-text transition-colors hover:bg-status-success-bg-subtle/70",
188
- children: [/* @__PURE__ */ O(v, { className: "size-3.5" }), "Mark as Paid"]
196
+ children: [/* @__PURE__ */ T(h, { className: "size-3.5" }), "Mark as Paid"]
189
197
  }),
190
- s && /* @__PURE__ */ k("button", {
198
+ s && /* @__PURE__ */ E("button", {
191
199
  type: "button",
192
200
  onClick: () => n(e),
193
201
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text",
194
- children: [/* @__PURE__ */ O(E, { className: "size-3.5" }), "Reject"]
202
+ children: [/* @__PURE__ */ T(C, { className: "size-3.5" }), "Reject"]
195
203
  })
196
204
  ]
197
205
  })]
198
206
  }),
199
- e.payoutAccount && /* @__PURE__ */ O(H, { account: e.payoutAccount }),
200
- e.userNotes && /* @__PURE__ */ k("div", {
207
+ e.requestKind === "CREDIT_CONVERSION" ? /* @__PURE__ */ E("div", {
208
+ className: "flex items-center gap-2 rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-muted",
209
+ children: [/* @__PURE__ */ T(b, { className: "size-4 shrink-0" }), "Approving converts this straight into earned credits — no bank transfer needed."]
210
+ }) : e.payoutAccount && /* @__PURE__ */ T(z, { account: e.payoutAccount }),
211
+ e.userNotes && /* @__PURE__ */ E("div", {
201
212
  className: "rounded-md bg-bg-sunken/40 border border-border-subtle px-3 py-2 text-sm",
202
- children: [/* @__PURE__ */ O("span", {
213
+ children: [/* @__PURE__ */ T("span", {
203
214
  className: "text-xs font-medium text-text-muted uppercase tracking-wide",
204
215
  children: "User note"
205
- }), /* @__PURE__ */ O("p", {
216
+ }), /* @__PURE__ */ T("p", {
206
217
  className: "mt-1 text-text-primary",
207
218
  children: e.userNotes
208
219
  })]
209
220
  }),
210
- (e.internalNotes ?? e.failureReason ?? e.externalReference) && /* @__PURE__ */ k("div", {
221
+ (e.internalNotes ?? e.failureReason ?? e.externalReference) && /* @__PURE__ */ E("div", {
211
222
  className: "grid gap-1 text-xs text-text-muted",
212
223
  children: [
213
- e.externalReference && /* @__PURE__ */ k("div", {
224
+ e.externalReference && /* @__PURE__ */ E("div", {
214
225
  className: "flex gap-2",
215
- children: [/* @__PURE__ */ O(w, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ k("span", { children: [
226
+ children: [/* @__PURE__ */ T(S, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ E("span", { children: [
216
227
  "Ref:",
217
228
  " ",
218
- /* @__PURE__ */ O("span", {
229
+ /* @__PURE__ */ T("span", {
219
230
  className: "font-mono text-text-primary",
220
231
  children: e.externalReference
221
232
  })
222
233
  ] })]
223
234
  }),
224
- e.internalNotes && /* @__PURE__ */ k("div", {
235
+ e.internalNotes && /* @__PURE__ */ E("div", {
225
236
  className: "flex gap-2",
226
- children: [/* @__PURE__ */ O("span", {
237
+ children: [/* @__PURE__ */ T("span", {
227
238
  className: "shrink-0",
228
239
  children: "Internal note:"
229
- }), /* @__PURE__ */ O("span", {
240
+ }), /* @__PURE__ */ T("span", {
230
241
  className: "text-text-primary",
231
242
  children: e.internalNotes
232
243
  })]
233
244
  }),
234
- e.failureReason && /* @__PURE__ */ k("div", {
245
+ e.failureReason && /* @__PURE__ */ E("div", {
235
246
  className: "flex gap-2 text-status-error-text",
236
- children: [/* @__PURE__ */ O(_, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ O("span", { children: e.failureReason })]
247
+ children: [/* @__PURE__ */ T(m, { className: "size-3.5 mt-px shrink-0" }), /* @__PURE__ */ T("span", { children: e.failureReason })]
237
248
  })
238
249
  ]
239
250
  }),
240
- (e.paidAt ?? e.processedAt) && /* @__PURE__ */ k("div", {
251
+ (e.paidAt ?? e.processedAt) && /* @__PURE__ */ E("div", {
241
252
  className: "flex flex-wrap gap-4 text-xs text-text-muted",
242
- children: [e.processedAt && /* @__PURE__ */ k("span", {
253
+ children: [e.processedAt && /* @__PURE__ */ E("span", {
243
254
  className: "flex items-center gap-1",
244
255
  children: [
245
- /* @__PURE__ */ O(S, { className: "size-3" }),
256
+ /* @__PURE__ */ T(y, { className: "size-3" }),
246
257
  "Processed ",
247
258
  o(e.processedAt)
248
259
  ]
249
- }), e.paidAt && /* @__PURE__ */ k("span", {
260
+ }), e.paidAt && /* @__PURE__ */ E("span", {
250
261
  className: "flex items-center gap-1",
251
262
  children: [
252
- /* @__PURE__ */ O(y, { className: "size-3" }),
263
+ /* @__PURE__ */ T(g, { className: "size-3" }),
253
264
  "Paid ",
254
265
  o(e.paidAt)
255
266
  ]
@@ -258,49 +269,49 @@ function U({ request: e, onApprove: t, onReject: n, onMarkPaid: r }) {
258
269
  ]
259
270
  });
260
271
  }
261
- function W({ summary: e }) {
262
- return /* @__PURE__ */ k("div", {
272
+ function V({ summary: e }) {
273
+ return /* @__PURE__ */ E("div", {
263
274
  className: "grid gap-3 sm:grid-cols-3",
264
275
  children: [
265
- /* @__PURE__ */ k("div", {
276
+ /* @__PURE__ */ E("div", {
266
277
  className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
267
278
  children: [
268
- /* @__PURE__ */ O("div", {
279
+ /* @__PURE__ */ T("div", {
269
280
  className: "text-xs text-text-muted uppercase tracking-wide",
270
281
  children: "Pending payout"
271
282
  }),
272
- /* @__PURE__ */ O("div", {
283
+ /* @__PURE__ */ T("div", {
273
284
  className: "mt-1 text-lg font-semibold text-text-primary",
274
285
  children: a(e.totalRequestedAmount, "USD")
275
286
  }),
276
- /* @__PURE__ */ k("div", {
287
+ /* @__PURE__ */ E("div", {
277
288
  className: "text-xs text-text-muted mt-0.5",
278
289
  children: [e.pendingCount, " requests"]
279
290
  })
280
291
  ]
281
292
  }),
282
- /* @__PURE__ */ k("div", {
293
+ /* @__PURE__ */ E("div", {
283
294
  className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
284
- children: [/* @__PURE__ */ O("div", {
295
+ children: [/* @__PURE__ */ T("div", {
285
296
  className: "text-xs text-text-muted uppercase tracking-wide",
286
297
  children: "Processing"
287
- }), /* @__PURE__ */ O("div", {
298
+ }), /* @__PURE__ */ T("div", {
288
299
  className: "mt-1 text-lg font-semibold text-text-primary",
289
300
  children: a(e.totalProcessingAmount, "USD")
290
301
  })]
291
302
  }),
292
- /* @__PURE__ */ k("div", {
303
+ /* @__PURE__ */ E("div", {
293
304
  className: "rounded-card border border-border-seam bg-bg-surface p-4 shadow-[var(--shadow-elevation-1)]",
294
305
  children: [
295
- /* @__PURE__ */ O("div", {
306
+ /* @__PURE__ */ T("div", {
296
307
  className: "text-xs text-text-muted uppercase tracking-wide",
297
308
  children: "Total paid"
298
309
  }),
299
- /* @__PURE__ */ O("div", {
310
+ /* @__PURE__ */ T("div", {
300
311
  className: "mt-1 text-lg font-semibold text-text-primary",
301
312
  children: a(e.totalPaidAmount, "USD")
302
313
  }),
303
- e.failedCount > 0 && /* @__PURE__ */ k("div", {
314
+ e.failedCount > 0 && /* @__PURE__ */ E("div", {
304
315
  className: "text-xs text-status-error-text mt-0.5",
305
316
  children: [e.failedCount, " failed"]
306
317
  })
@@ -309,53 +320,53 @@ function W({ summary: e }) {
309
320
  ]
310
321
  });
311
322
  }
312
- function G({ dialog: e, onClose: t, onConfirm: n }) {
313
- let [r, i] = g(""), [o, s] = g(""), [c, l] = g(""), [u, d] = g(!1), f = async () => {
323
+ function oe({ dialog: e, onClose: t, onConfirm: n }) {
324
+ let [r, i] = p(""), [o, s] = p(""), [c, l] = p(""), [u, d] = p(!1), f = async () => {
314
325
  e.type === "reject" && !o.trim() || (d(!0), await n({
315
326
  notes: r.trim() || void 0,
316
327
  reason: o.trim() || void 0,
317
328
  externalReference: c.trim() || void 0
318
329
  }), d(!1));
319
330
  };
320
- return /* @__PURE__ */ O(M, {
331
+ return /* @__PURE__ */ T(O, {
321
332
  open: !0,
322
333
  onOpenChange: (e) => {
323
334
  !e && !u && t();
324
335
  },
325
- children: /* @__PURE__ */ k(N, {
336
+ children: /* @__PURE__ */ E(k, {
326
337
  className: "sm:max-w-md",
327
338
  children: [
328
- /* @__PURE__ */ k(I, { children: [/* @__PURE__ */ O(L, { children: {
339
+ /* @__PURE__ */ E(M, { children: [/* @__PURE__ */ T(N, { children: {
329
340
  approve: "Approve withdrawal request",
330
341
  reject: "Reject withdrawal request",
331
342
  mark_paid: "Mark as paid"
332
- }[e.type] }), /* @__PURE__ */ k(P, { children: [
343
+ }[e.type] }), /* @__PURE__ */ E(A, { children: [
333
344
  a(e.amount, e.currency),
334
345
  " · ",
335
346
  e.accountLabel
336
347
  ] })] }),
337
- e.type === "mark_paid" && /* @__PURE__ */ k("div", {
348
+ e.type === "mark_paid" && /* @__PURE__ */ E("div", {
338
349
  className: "space-y-3",
339
- children: [/* @__PURE__ */ k("div", { children: [
340
- /* @__PURE__ */ O("label", {
350
+ children: [/* @__PURE__ */ E("div", { children: [
351
+ /* @__PURE__ */ T("label", {
341
352
  className: "text-xs font-medium text-text-primary block mb-1",
342
353
  children: "Transaction reference / UTR number"
343
354
  }),
344
- /* @__PURE__ */ O("input", {
355
+ /* @__PURE__ */ T("input", {
345
356
  type: "text",
346
357
  value: c,
347
358
  onChange: (e) => l(e.target.value),
348
359
  placeholder: "e.g. UTR123456789012, TXN_abc123",
349
360
  className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
350
361
  }),
351
- /* @__PURE__ */ O("p", {
362
+ /* @__PURE__ */ T("p", {
352
363
  className: "text-xs text-text-muted mt-1",
353
364
  children: "Enter the bank reference number so the user can verify the transfer."
354
365
  })
355
- ] }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
366
+ ] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
356
367
  className: "text-xs font-medium text-text-primary block mb-1",
357
368
  children: "Internal notes (optional)"
358
- }), /* @__PURE__ */ O("textarea", {
369
+ }), /* @__PURE__ */ T("textarea", {
359
370
  value: r,
360
371
  onChange: (e) => i(e.target.value),
361
372
  rows: 2,
@@ -363,36 +374,36 @@ function G({ dialog: e, onClose: t, onConfirm: n }) {
363
374
  className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
364
375
  })] })]
365
376
  }),
366
- e.type === "approve" && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
377
+ e.type === "approve" && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
367
378
  className: "text-xs font-medium text-text-primary block mb-1",
368
379
  children: "Internal notes (optional)"
369
- }), /* @__PURE__ */ O("textarea", {
380
+ }), /* @__PURE__ */ T("textarea", {
370
381
  value: r,
371
382
  onChange: (e) => i(e.target.value),
372
383
  rows: 3,
373
384
  placeholder: "e.g. Verified bank details, approved for transfer…",
374
385
  className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
375
386
  })] }),
376
- e.type === "reject" && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("label", {
387
+ e.type === "reject" && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("label", {
377
388
  className: "text-xs font-medium text-text-primary block mb-1",
378
- children: ["Reason for rejection ", /* @__PURE__ */ O("span", {
389
+ children: ["Reason for rejection ", /* @__PURE__ */ T("span", {
379
390
  className: "text-status-error-text",
380
391
  children: "*"
381
392
  })]
382
- }), /* @__PURE__ */ O("textarea", {
393
+ }), /* @__PURE__ */ T("textarea", {
383
394
  value: o,
384
395
  onChange: (e) => s(e.target.value),
385
396
  rows: 3,
386
397
  placeholder: "e.g. Invalid bank details provided, please re-submit with correct IFSC…",
387
398
  className: "w-full rounded-input border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
388
399
  })] }),
389
- /* @__PURE__ */ k(F, { children: [/* @__PURE__ */ O("button", {
400
+ /* @__PURE__ */ E(j, { children: [/* @__PURE__ */ T("button", {
390
401
  type: "button",
391
402
  onClick: t,
392
403
  disabled: u,
393
404
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary disabled:opacity-50",
394
405
  children: "Cancel"
395
- }), /* @__PURE__ */ O("button", {
406
+ }), /* @__PURE__ */ T("button", {
396
407
  type: "button",
397
408
  onClick: () => void f(),
398
409
  disabled: u || e.type === "reject" && !o.trim(),
@@ -403,59 +414,62 @@ function G({ dialog: e, onClose: t, onConfirm: n }) {
403
414
  })
404
415
  });
405
416
  }
406
- var K = () => {
407
- let a = c(), { emit: o } = i(), { apiGatewayUrl: _, authToken: v, orgId: y } = e(), [b, x] = g(null), [S, C] = g([]), [w, E] = g(0), [D, M] = g(!1), [N, P] = g(!0), [F, I] = g(!1), [L, z] = g(null), [B, V] = g("pending"), [H, K] = g(null), q = ee(() => ({
408
- apiGatewayUrl: _,
409
- authToken: v,
410
- orgId: y
417
+ var H = () => {
418
+ let a = c(), { emit: o } = i(), { apiGatewayUrl: m, authToken: g, orgId: _ } = e(), [v, y] = p(null), [x, S] = p([]), [C, w] = p(0), [O, k] = p(!1), [A, j] = p(!0), [M, N] = p(!1), [I, L] = p(null), [R, z] = p("CASH_PAYOUT"), [H, U] = p("pending"), [W, G] = p(null), K = re(() => ({
419
+ apiGatewayUrl: m,
420
+ authToken: g,
421
+ orgId: _
411
422
  }), [
412
- _,
413
- v,
414
- y
415
- ]), J = m(async () => {
416
- P(!0), z(null);
423
+ m,
424
+ g,
425
+ _
426
+ ]), q = te(async () => {
427
+ j(!0), L(null);
417
428
  try {
418
- let [e, t] = await Promise.all([d(q), u(q, {
419
- limit: R,
429
+ let [e, t] = await Promise.all([d(K), u(K, {
430
+ limit: P,
420
431
  offset: 0
421
432
  })]);
422
- x(e), C(t.items), E(t.totalCount), M(t.hasMore);
433
+ y(e), S(t.items), w(t.totalCount), k(t.hasMore);
423
434
  } catch (e) {
424
- z(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load payout queue"));
435
+ L(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load payout queue"));
425
436
  } finally {
426
- P(!1);
437
+ j(!1);
427
438
  }
428
- }, [q]), te = async () => {
429
- if (!(F || !D)) {
430
- I(!0), z(null);
439
+ }, [K]), se = async () => {
440
+ if (!(M || !O)) {
441
+ N(!0), L(null);
431
442
  try {
432
- let e = await u(q, {
433
- limit: R,
434
- offset: S.length
443
+ let e = await u(K, {
444
+ limit: P,
445
+ offset: x.length
435
446
  });
436
- C((t) => [...t, ...e.items]), E(e.totalCount), M(e.hasMore);
447
+ S((t) => [...t, ...e.items]), w(e.totalCount), k(e.hasMore);
437
448
  } catch (e) {
438
- z(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more payout requests"));
449
+ L(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load more payout requests"));
439
450
  } finally {
440
- I(!1);
451
+ N(!1);
441
452
  }
442
453
  }
443
454
  };
444
- if (h(() => {
445
- J();
446
- }, [J]), !a.isBillingAdmin) return /* @__PURE__ */ O(t, { message: "You don't have permission to manage payouts." });
447
- if (L && s(L)) return /* @__PURE__ */ O(r, {
455
+ if (ne(() => {
456
+ q();
457
+ }, [q]), !a.isBillingAdmin) return /* @__PURE__ */ T(t, { message: "You don't have permission to manage payouts." });
458
+ if (I && s(I)) return /* @__PURE__ */ T(r, {
448
459
  title: "Payout queue unavailable",
449
- message: L.message,
450
- onRetry: () => void J(),
460
+ message: I.message,
461
+ onRetry: () => void q(),
451
462
  showRetry: !0
452
463
  });
453
- let Y = S.filter((e) => e.status === "REQUESTED"), X = S.filter((e) => e.status === "APPROVED" || e.status === "PROCESSING"), Z = S.filter((e) => [
464
+ let J = x.filter((e) => e.requestKind === R), Y = J.filter((e) => e.status === "REQUESTED"), X = J.filter((e) => e.status === "APPROVED" || e.status === "PROCESSING"), Z = J.filter((e) => [
454
465
  "PAID",
455
466
  "REJECTED",
456
467
  "FAILED",
457
468
  "CANCELED"
458
- ].includes(e.status)), ne = [
469
+ ].includes(e.status)), ce = F.map((e) => ({
470
+ ...e,
471
+ count: x.filter((t) => t.requestKind === e.id).length
472
+ })), le = [
459
473
  {
460
474
  id: "pending",
461
475
  label: "Pending",
@@ -471,8 +485,8 @@ var K = () => {
471
485
  label: "History",
472
486
  count: Z.length
473
487
  }
474
- ], Q = B === "pending" ? Y : B === "approved" ? X : Z, $ = (e, t) => {
475
- K({
488
+ ], Q = H === "pending" ? Y : H === "approved" ? X : Z, $ = (e, t) => {
489
+ G({
476
490
  type: e,
477
491
  requestId: t.id,
478
492
  amount: t.requestedAmount,
@@ -480,113 +494,149 @@ var K = () => {
480
494
  accountLabel: t.payoutAccount?.displayName ?? t.payoutAccount?.label ?? "Unknown account"
481
495
  });
482
496
  };
483
- return /* @__PURE__ */ k("div", {
497
+ return /* @__PURE__ */ E("div", {
484
498
  className: "space-y-6 p-6",
485
499
  children: [
486
- /* @__PURE__ */ O(n, {
500
+ /* @__PURE__ */ T(n, {
487
501
  title: "Payout queue",
488
502
  description: "Review withdrawal requests, verify payout details, and mark them as paid once funds are transferred.",
489
- actions: /* @__PURE__ */ k("button", {
503
+ actions: /* @__PURE__ */ E("button", {
490
504
  type: "button",
491
- onClick: () => void J(),
505
+ onClick: () => void q(),
492
506
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary",
493
- children: [/* @__PURE__ */ O(T, { className: `size-4 ${N ? "animate-spin" : ""}` }), "Refresh"]
507
+ children: [/* @__PURE__ */ T(ie, { className: `size-4 ${A ? "animate-spin" : ""}` }), "Refresh"]
494
508
  })
495
509
  }),
496
- /* @__PURE__ */ O(j, { children: "This queue is for billing-account withdrawal requests. Developers withdraw their purchased and earned credits from billing using their own payout methods; approved requests appear here for operations review and payment completion." }),
497
- b && !N && /* @__PURE__ */ O(W, { summary: b }),
498
- !N && w > 0 && /* @__PURE__ */ k("div", {
510
+ /* @__PURE__ */ E(D, { children: [
511
+ "This queue holds two different kinds of request, split into the tabs below so a revenue-share credit conversion never gets mistaken for a real bank transfer. ",
512
+ /* @__PURE__ */ T("strong", { children: "Cash Payouts" }),
513
+ " ",
514
+ "are real money leaving the platform — developers withdrawing purchased or earned credits from billing to their own bank/UPI account. ",
515
+ /* @__PURE__ */ T("strong", { children: "Revenue Share Credits" }),
516
+ " are a developer requesting their store revenue share — approving one just converts the amount into earned credits on their billing account, no transfer involved."
517
+ ] }),
518
+ v && !A && /* @__PURE__ */ T(V, { summary: v }),
519
+ !A && C > 0 && /* @__PURE__ */ E("div", {
499
520
  className: "text-sm text-text-muted",
500
521
  children: [
501
522
  "Showing ",
502
- S.length,
523
+ x.length,
503
524
  " of ",
504
- w,
525
+ C,
505
526
  " payout requests."
506
527
  ]
507
528
  }),
508
- N && /* @__PURE__ */ O("div", {
529
+ A && /* @__PURE__ */ T("div", {
509
530
  className: "grid gap-3 sm:grid-cols-3",
510
531
  children: [
511
532
  1,
512
533
  2,
513
534
  3
514
- ].map((e) => /* @__PURE__ */ O("div", { className: "h-20 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
535
+ ].map((e) => /* @__PURE__ */ T("div", { className: "h-20 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
515
536
  }),
516
- L && !s(L) && /* @__PURE__ */ O("div", {
537
+ I && !s(I) && /* @__PURE__ */ T("div", {
517
538
  className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 text-sm text-status-error-text",
518
- children: L.message
539
+ children: I.message
519
540
  }),
520
- /* @__PURE__ */ O("div", {
541
+ /* @__PURE__ */ T("div", {
542
+ className: "grid gap-3 sm:grid-cols-2",
543
+ children: ce.map((e) => {
544
+ let t = e.id === "CASH_PAYOUT" ? h : b, n = R === e.id;
545
+ return /* @__PURE__ */ E("button", {
546
+ type: "button",
547
+ onClick: () => {
548
+ z(e.id), U("pending");
549
+ },
550
+ className: `flex items-start gap-3 rounded-card border p-4 text-left transition-colors ${n ? "border-action-primary-bg bg-[var(--color-accent-soft)]" : "border-border-subtle bg-bg-surface hover:border-border-strong"}`,
551
+ children: [/* @__PURE__ */ T(t, { className: `size-5 mt-0.5 shrink-0 ${n ? "text-text-link" : "text-text-muted"}` }), /* @__PURE__ */ E("div", {
552
+ className: "min-w-0",
553
+ children: [/* @__PURE__ */ E("div", {
554
+ className: "flex items-center gap-2",
555
+ children: [/* @__PURE__ */ T("span", {
556
+ className: `text-sm font-semibold ${n ? "text-text-link" : "text-text-primary"}`,
557
+ children: e.label
558
+ }), e.count > 0 && /* @__PURE__ */ T("span", {
559
+ className: `rounded-full px-1.5 py-0.5 text-xs ${n ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-muted"}`,
560
+ children: e.count
561
+ })]
562
+ }), /* @__PURE__ */ T("p", {
563
+ className: "text-xs text-text-muted mt-0.5",
564
+ children: e.description
565
+ })]
566
+ })]
567
+ }, e.id);
568
+ })
569
+ }),
570
+ /* @__PURE__ */ T("div", {
521
571
  className: "border-b border-border-subtle",
522
- children: /* @__PURE__ */ O("div", {
572
+ children: /* @__PURE__ */ T("div", {
523
573
  className: "flex gap-0",
524
- children: ne.map((e) => /* @__PURE__ */ k("button", {
574
+ children: le.map((e) => /* @__PURE__ */ E("button", {
525
575
  type: "button",
526
- onClick: () => V(e.id),
527
- className: `flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors ${B === e.id ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
528
- children: [e.label, e.count > 0 && /* @__PURE__ */ O("span", {
529
- className: `rounded-full px-1.5 py-0.5 text-xs ${B === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-muted"}`,
576
+ onClick: () => U(e.id),
577
+ className: `flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors ${H === e.id ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
578
+ children: [e.label, e.count > 0 && /* @__PURE__ */ T("span", {
579
+ className: `rounded-full px-1.5 py-0.5 text-xs ${H === e.id ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-muted"}`,
530
580
  children: e.count
531
581
  })]
532
582
  }, e.id))
533
583
  })
534
584
  }),
535
- B === "approved" && X.length > 0 && /* @__PURE__ */ k("div", {
585
+ R === "CASH_PAYOUT" && H === "approved" && X.length > 0 && /* @__PURE__ */ E("div", {
536
586
  className: "rounded-card border border-status-info-border bg-status-info-bg-subtle px-4 py-3 text-sm text-status-info-text",
537
587
  children: [
538
- /* @__PURE__ */ O("strong", { children: "How to pay:" }),
588
+ /* @__PURE__ */ T("strong", { children: "How to pay:" }),
539
589
  " Click the account row to expand bank/UPI details → transfer the exact amount via your bank → click ",
540
- /* @__PURE__ */ O("strong", { children: "Mark as Paid" }),
590
+ /* @__PURE__ */ T("strong", { children: "Mark as Paid" }),
541
591
  " and enter the UTR / transaction reference number."
542
592
  ]
543
593
  }),
544
- N ? /* @__PURE__ */ O("div", {
594
+ A ? /* @__PURE__ */ T("div", {
545
595
  className: "space-y-4",
546
- children: [1, 2].map((e) => /* @__PURE__ */ O("div", { className: "h-40 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
547
- }) : Q.length === 0 ? /* @__PURE__ */ O(A, {
596
+ children: [1, 2].map((e) => /* @__PURE__ */ T("div", { className: "h-40 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
597
+ }) : Q.length === 0 ? /* @__PURE__ */ T(ae, {
548
598
  illustration: "empty-data",
549
- title: B === "pending" ? "No pending requests" : B === "approved" ? "No approved requests awaiting payment" : "No history yet",
550
- description: B === "pending" ? "New withdrawal requests will appear here." : B === "approved" ? "Approve pending requests first, then send payment and mark as paid." : "Completed and rejected requests will appear here."
551
- }) : /* @__PURE__ */ k("div", {
599
+ title: H === "pending" ? "No pending requests" : H === "approved" ? "No approved requests awaiting payment" : "No history yet",
600
+ description: H === "pending" ? "New requests will appear here." : H === "approved" ? R === "CREDIT_CONVERSION" ? "Revenue share requests skip this tab — approving one completes it immediately, there's no separate payment step." : "Approve pending requests first, then send payment and mark as paid." : "Completed and rejected requests will appear here."
601
+ }) : /* @__PURE__ */ E("div", {
552
602
  className: "space-y-4",
553
- children: [Q.map((e) => /* @__PURE__ */ O(U, {
603
+ children: [Q.map((e) => /* @__PURE__ */ T(B, {
554
604
  request: e,
555
605
  onApprove: (e) => $("approve", e),
556
606
  onReject: (e) => $("reject", e),
557
607
  onMarkPaid: (e) => $("mark_paid", e)
558
- }, e.id)), D && /* @__PURE__ */ O("div", {
608
+ }, e.id)), O && /* @__PURE__ */ T("div", {
559
609
  className: "flex justify-center pt-2",
560
- children: /* @__PURE__ */ O("button", {
610
+ children: /* @__PURE__ */ T("button", {
561
611
  type: "button",
562
- onClick: () => void te(),
563
- disabled: F,
612
+ onClick: () => void se(),
613
+ disabled: M,
564
614
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary disabled:opacity-50",
565
- children: F ? "Loading…" : "Load more requests"
615
+ children: M ? "Loading…" : "Load more requests"
566
616
  })
567
617
  })]
568
618
  }),
569
- H && /* @__PURE__ */ O(G, {
570
- dialog: H,
571
- onClose: () => K(null),
619
+ W && /* @__PURE__ */ T(oe, {
620
+ dialog: W,
621
+ onClose: () => G(null),
572
622
  onConfirm: async (e) => {
573
- if (H) try {
574
- H.type === "approve" ? (await l(H.requestId, e.notes ?? null, q), o("billing.payout.approved", {
623
+ if (W) try {
624
+ W.type === "approve" ? (await l(W.requestId, e.notes ?? null, K), o("billing.payout.approved", {
575
625
  route: "/billing/payouts",
576
- entityId: H.requestId,
626
+ entityId: W.requestId,
577
627
  source: "payout-admin"
578
- })) : H.type === "reject" ? (await p(H.requestId, e.reason ?? "", q), o("billing.payout.rejected", {
628
+ })) : W.type === "reject" ? (await ee(W.requestId, e.reason ?? "", K), o("billing.payout.rejected", {
579
629
  route: "/billing/payouts",
580
- entityId: H.requestId,
630
+ entityId: W.requestId,
581
631
  source: "payout-admin",
582
632
  reason: e.reason
583
- })) : H.type === "mark_paid" && (await f(H.requestId, e.externalReference ?? null, e.notes ?? null, q), o("billing.payout.processed", {
633
+ })) : W.type === "mark_paid" && (await f(W.requestId, e.externalReference ?? null, e.notes ?? null, K), o("billing.payout.processed", {
584
634
  route: "/billing/payouts",
585
- entityId: H.requestId,
635
+ entityId: W.requestId,
586
636
  source: "payout-admin"
587
- })), K(null), await J();
637
+ })), G(null), await q();
588
638
  } catch (e) {
589
- z(e instanceof Error ? e : /* @__PURE__ */ Error("Action failed"));
639
+ L(e instanceof Error ? e : /* @__PURE__ */ Error("Action failed"));
590
640
  }
591
641
  }
592
642
  })
@@ -594,6 +644,6 @@ var K = () => {
594
644
  });
595
645
  };
596
646
  //#endregion
597
- export { K as PayoutAdminPage };
647
+ export { H as PayoutAdminPage };
598
648
 
599
649
  //# sourceMappingURL=PayoutAdminPage.js.map