@burdenoff/microfe-billing 2026.623.3 → 2026.624.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 (43) hide show
  1. package/dist/billing/BillingUserRoutes.js +3 -3
  2. package/dist/billing/BillingUserRoutes.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +34 -34
  4. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  5. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +94 -94
  6. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  7. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +162 -187
  8. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  9. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +146 -153
  10. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  11. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +10 -10
  12. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  13. package/dist/billing/modules/billing/pages/TransactionsPage.js +62 -62
  14. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  15. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +164 -179
  16. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  17. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +8 -8
  18. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  19. package/dist/billing/modules/earnings/pages/EarningsPage.js +243 -305
  20. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  21. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +73 -78
  22. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  23. package/dist/billing/modules/earnings/pages/PayoutsPage.js +173 -179
  24. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  25. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +4 -4
  26. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  27. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
  28. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  29. package/dist/billing/modules/settings/pages/SettingsPage.js +181 -173
  30. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  31. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +111 -99
  32. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  33. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +68 -83
  34. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  35. package/dist/billing/shared/components/AccessDenied.js +4 -4
  36. package/dist/billing/shared/components/AccessDenied.js.map +1 -1
  37. package/dist/billing/shared/components/ActorIdentity.js +8 -8
  38. package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
  39. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +11 -11
  40. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
  41. package/dist/billing/shared/ui/MetricCard.js +1 -1
  42. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  43. package/package.json +1 -1
@@ -8,15 +8,46 @@ import { useBillingEventEmitter as a } from "../../../hooks/useBillingEventEmitt
8
8
  import { formatCurrency as o, formatDateTime as s } from "../../../shared/utils/format.js";
9
9
  import { isServerError as c } from "../../../shared/utils/error.js";
10
10
  import "../../../shared/utils/index.js";
11
- import { useBillingPermissions as l } from "../../../hooks/useBillingPermissions.js";
12
- import { useGetDefaultBillingAccountSettingsQuery as u } from "../../../../generated/global-operations.js";
13
- import { addPayoutAccount as d, archivePayoutAccount as f, fetchPayoutAccounts as p, fetchPayoutRequests as m, requestPayout as h, setDefaultPayoutAccount as g, updatePayoutAccount as _ } from "../api.js";
14
- import { useEffect as v, useMemo as y, useState as b } from "react";
15
- import { Landmark as x, RefreshCw as S, Send as C } from "lucide-react";
16
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
11
+ import { useBillingPermissions as ee } from "../../../hooks/useBillingPermissions.js";
12
+ import { useGetDefaultBillingAccountSettingsQuery as l } from "../../../../generated/global-operations.js";
13
+ import { addPayoutAccount as u, archivePayoutAccount as te, fetchPayoutAccounts as ne, fetchPayoutRequests as re, requestPayout as d, setDefaultPayoutAccount as f, updatePayoutAccount as p } from "../api.js";
14
+ import { useEffect as m, useMemo as ie, useState as h } from "react";
15
+ import { Landmark as g, RefreshCw as _, Send as v } from "lucide-react";
16
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
17
+ import { AlertDialog as S, AlertDialogAction as C, AlertDialogCancel as w, AlertDialogContent as T, AlertDialogDescription as ae, AlertDialogFooter as oe, AlertDialogHeader as se, AlertDialogTitle as E, ResponsiveTable as D } from "@burdenoff/fe-libs/ui";
17
18
  //#region src/billing/modules/earnings/pages/PayoutsPage.tsx
18
- var D = () => {
19
- let D = l(), { emit: O } = a(), { apiGatewayUrl: k, authToken: A, orgId: j } = e(), { data: M } = u({}), N = M?.getDefaultBillingAccount?.id, [P, F] = b([]), [I, L] = b([]), [R, z] = b(!0), [B, V] = b(null), [H, U] = b({
19
+ var O = [
20
+ {
21
+ key: "amount",
22
+ header: "Amount",
23
+ priority: "primary",
24
+ cell: (e) => /* @__PURE__ */ b("span", {
25
+ className: "tabular-nums",
26
+ children: o(e.requestedAmount, e.currency)
27
+ })
28
+ },
29
+ {
30
+ key: "provider",
31
+ header: "Provider",
32
+ cell: (e) => e.provider
33
+ },
34
+ {
35
+ key: "status",
36
+ header: "Status",
37
+ cell: (e) => e.status
38
+ },
39
+ {
40
+ key: "account",
41
+ header: "Account",
42
+ cell: (e) => e.payoutAccount?.label || "-"
43
+ },
44
+ {
45
+ key: "created",
46
+ header: "Created",
47
+ cell: (e) => s(e.createdAt)
48
+ }
49
+ ], k = () => {
50
+ let o = ee(), { emit: s } = a(), { apiGatewayUrl: k, authToken: A, orgId: j } = e(), { data: M } = l({}), N = M?.getDefaultBillingAccount?.id, [P, F] = h([]), [I, L] = h([]), [R, z] = h(!0), [B, V] = h(null), [H, U] = h({
20
51
  label: "",
21
52
  type: "BANK_ACCOUNT",
22
53
  providerPreference: "AUTO",
@@ -28,7 +59,7 @@ var D = () => {
28
59
  routingNumber: "",
29
60
  ifsc: "",
30
61
  upiId: ""
31
- }), [W, G] = b(""), [K, q] = b(""), [J, Y] = b(null), X = y(() => ({
62
+ }), [W, G] = h(""), [K, q] = h(""), [J, Y] = h(null), [X, Z] = h(null), Q = ie(() => ({
32
63
  apiGatewayUrl: k,
33
64
  authToken: A,
34
65
  orgId: j
@@ -36,11 +67,11 @@ var D = () => {
36
67
  k,
37
68
  A,
38
69
  j
39
- ]), Z = async () => {
70
+ ]), $ = async () => {
40
71
  if (N) {
41
72
  z(!0), V(null);
42
73
  try {
43
- let [e, t] = await Promise.all([p(N, X), m(N, X)]);
74
+ let [e, t] = await Promise.all([ne(N, Q), re(N, Q)]);
44
75
  F(e), L(t), !K && e[0]?.id && q(e[0].id);
45
76
  } catch (e) {
46
77
  V(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load payout data"));
@@ -49,26 +80,26 @@ var D = () => {
49
80
  }
50
81
  }
51
82
  };
52
- if (v(() => {
53
- Z();
54
- }, [N, X]), !D.canManagePaymentMethods) return /* @__PURE__ */ T(t, { message: "You don't have permission to manage payout accounts." });
55
- if (B && c(B)) return /* @__PURE__ */ T(i, {
83
+ if (m(() => {
84
+ $();
85
+ }, [N, Q]), !o.canManagePaymentMethods) return /* @__PURE__ */ b(t, { message: "You don't have permission to manage payout accounts." });
86
+ if (B && c(B)) return /* @__PURE__ */ b(i, {
56
87
  title: "Payout data unavailable",
57
88
  message: B.message,
58
- onRetry: () => void Z(),
89
+ onRetry: () => void $(),
59
90
  showRetry: !0
60
91
  });
61
- let Q = async () => {
92
+ let ce = async () => {
62
93
  if (!N) return;
63
94
  let e = {
64
95
  billingAccountId: N,
65
96
  ...H
66
97
  };
67
- J ? (await _(J, e, X), O("billing.payout_account.updated", {
98
+ J ? (await p(J, e, Q), s("billing.payout_account.updated", {
68
99
  route: "/billing/payouts",
69
100
  entityId: J,
70
101
  source: "payouts"
71
- })) : (await d(e, X), O("billing.payout_account.added", {
102
+ })) : (await u(e, Q), s("billing.payout_account.added", {
72
103
  route: "/billing/payouts",
73
104
  entityId: N,
74
105
  source: "payouts"
@@ -84,16 +115,16 @@ var D = () => {
84
115
  routingNumber: "",
85
116
  ifsc: "",
86
117
  upiId: ""
87
- }), Y(null), await Z();
88
- }, $ = async (e) => {
89
- await g(e, X), await Z();
90
- }, ee = async (e) => {
91
- window.confirm("Archive this payout account?") && (await f(e, X), O("billing.payout_account.archived", {
118
+ }), Y(null), await $();
119
+ }, le = async (e) => {
120
+ await f(e, Q), await $();
121
+ }, ue = async (e) => {
122
+ await te(e, Q), s("billing.payout_account.archived", {
92
123
  route: "/billing/payouts",
93
124
  entityId: e,
94
125
  source: "payouts"
95
- }), await Z());
96
- }, te = (e) => {
126
+ }), await $();
127
+ }, de = (e) => {
97
128
  Y(e.id), U((t) => ({
98
129
  ...t,
99
130
  label: e.label,
@@ -108,151 +139,151 @@ var D = () => {
108
139
  ifsc: "",
109
140
  upiId: ""
110
141
  }));
111
- }, ne = async () => {
112
- !N || !K || !W || (await h({
142
+ }, fe = async () => {
143
+ !N || !K || !W || (await d({
113
144
  billingAccountId: N,
114
145
  payoutAccountId: K,
115
146
  amount: Number(W),
116
147
  currency: P.find((e) => e.id === K)?.currency || "USD"
117
- }, X), O("billing.payout.requested", {
148
+ }, Q), s("billing.payout.requested", {
118
149
  route: "/billing/payouts",
119
150
  entityId: K,
120
151
  source: "payouts",
121
152
  amount: Number(W),
122
153
  currency: P.find((e) => e.id === K)?.currency || "USD"
123
- }), G(""), await Z());
154
+ }), G(""), await $());
124
155
  };
125
- return /* @__PURE__ */ E("div", {
156
+ return /* @__PURE__ */ x("div", {
126
157
  className: "space-y-6 p-6",
127
158
  children: [
128
- /* @__PURE__ */ T(n, {
159
+ /* @__PURE__ */ b(n, {
129
160
  title: "Payouts",
130
161
  description: "Register payout accounts, request withdrawals, and track disbursement status."
131
162
  }),
132
- B && !c(B) ? /* @__PURE__ */ T("div", {
133
- className: "rounded-lg border border-border bg-card p-4 text-sm text-destructive",
163
+ B && !c(B) ? /* @__PURE__ */ b("div", {
164
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-sm text-status-error-text",
134
165
  children: B.message
135
166
  }) : null,
136
- /* @__PURE__ */ E("div", {
167
+ /* @__PURE__ */ x("div", {
137
168
  className: "grid gap-6 xl:grid-cols-[1.05fr,1.95fr]",
138
- children: [/* @__PURE__ */ E("section", {
139
- className: "rounded-lg border border-border bg-card p-4",
169
+ children: [/* @__PURE__ */ x("section", {
170
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
140
171
  children: [
141
- /* @__PURE__ */ T("h2", {
142
- className: "mb-4 text-lg font-semibold text-foreground",
172
+ /* @__PURE__ */ b("h2", {
173
+ className: "mb-4 text-lg font-semibold text-text-primary",
143
174
  children: J ? "Edit payout account" : "Add payout account"
144
175
  }),
145
- /* @__PURE__ */ E("div", {
176
+ /* @__PURE__ */ x("div", {
146
177
  className: "space-y-3",
147
178
  children: [
148
- /* @__PURE__ */ T("input", {
179
+ /* @__PURE__ */ b("input", {
149
180
  value: H.label,
150
181
  onChange: (e) => U((t) => ({
151
182
  ...t,
152
183
  label: e.target.value
153
184
  })),
154
185
  placeholder: "Label",
155
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
186
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
156
187
  }),
157
- /* @__PURE__ */ E("div", {
188
+ /* @__PURE__ */ x("div", {
158
189
  className: "grid gap-3 md:grid-cols-2",
159
- children: [/* @__PURE__ */ E("select", {
190
+ children: [/* @__PURE__ */ x("select", {
160
191
  value: H.type,
161
192
  onChange: (e) => U((t) => ({
162
193
  ...t,
163
194
  type: e.target.value
164
195
  })),
165
- className: "rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground",
196
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
166
197
  children: [
167
- /* @__PURE__ */ T("option", {
198
+ /* @__PURE__ */ b("option", {
168
199
  value: "BANK_ACCOUNT",
169
200
  children: "Bank account"
170
201
  }),
171
- /* @__PURE__ */ T("option", {
202
+ /* @__PURE__ */ b("option", {
172
203
  value: "UPI",
173
204
  children: "UPI"
174
205
  }),
175
- /* @__PURE__ */ T("option", {
206
+ /* @__PURE__ */ b("option", {
176
207
  value: "WALLET",
177
208
  children: "Wallet"
178
209
  })
179
210
  ]
180
- }), /* @__PURE__ */ E("select", {
211
+ }), /* @__PURE__ */ x("select", {
181
212
  value: H.providerPreference,
182
213
  onChange: (e) => U((t) => ({
183
214
  ...t,
184
215
  providerPreference: e.target.value
185
216
  })),
186
- className: "rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground",
217
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
187
218
  children: [
188
- /* @__PURE__ */ T("option", {
219
+ /* @__PURE__ */ b("option", {
189
220
  value: "AUTO",
190
221
  children: "Auto"
191
222
  }),
192
- /* @__PURE__ */ T("option", {
223
+ /* @__PURE__ */ b("option", {
193
224
  value: "STRIPE",
194
225
  children: "Stripe"
195
226
  }),
196
- /* @__PURE__ */ T("option", {
227
+ /* @__PURE__ */ b("option", {
197
228
  value: "RAZORPAY",
198
229
  children: "Razorpay"
199
230
  }),
200
- /* @__PURE__ */ T("option", {
231
+ /* @__PURE__ */ b("option", {
201
232
  value: "MANUAL",
202
233
  children: "Manual"
203
234
  })
204
235
  ]
205
236
  })]
206
237
  }),
207
- /* @__PURE__ */ E("div", {
238
+ /* @__PURE__ */ x("div", {
208
239
  className: "grid gap-3 md:grid-cols-2",
209
- children: [/* @__PURE__ */ T("input", {
240
+ children: [/* @__PURE__ */ b("input", {
210
241
  value: H.country,
211
242
  onChange: (e) => U((t) => ({
212
243
  ...t,
213
244
  country: e.target.value.toUpperCase()
214
245
  })),
215
246
  placeholder: "Country",
216
- className: "rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
217
- }), /* @__PURE__ */ T("input", {
247
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
248
+ }), /* @__PURE__ */ b("input", {
218
249
  value: H.currency,
219
250
  onChange: (e) => U((t) => ({
220
251
  ...t,
221
252
  currency: e.target.value.toUpperCase()
222
253
  })),
223
254
  placeholder: "Currency",
224
- className: "rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
255
+ className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
225
256
  })]
226
257
  }),
227
- /* @__PURE__ */ T("input", {
258
+ /* @__PURE__ */ b("input", {
228
259
  value: H.accountHolderName,
229
260
  onChange: (e) => U((t) => ({
230
261
  ...t,
231
262
  accountHolderName: e.target.value
232
263
  })),
233
264
  placeholder: "Account holder name",
234
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
265
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
235
266
  }),
236
- H.type === "BANK_ACCOUNT" ? /* @__PURE__ */ E(w, { children: [
237
- /* @__PURE__ */ T("input", {
267
+ H.type === "BANK_ACCOUNT" ? /* @__PURE__ */ x(y, { children: [
268
+ /* @__PURE__ */ b("input", {
238
269
  value: H.bankName,
239
270
  onChange: (e) => U((t) => ({
240
271
  ...t,
241
272
  bankName: e.target.value
242
273
  })),
243
274
  placeholder: "Bank name",
244
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
275
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
245
276
  }),
246
- /* @__PURE__ */ T("input", {
277
+ /* @__PURE__ */ b("input", {
247
278
  value: H.accountNumber,
248
279
  onChange: (e) => U((t) => ({
249
280
  ...t,
250
281
  accountNumber: e.target.value
251
282
  })),
252
283
  placeholder: "Account number",
253
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
284
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
254
285
  }),
255
- /* @__PURE__ */ T("input", {
286
+ /* @__PURE__ */ b("input", {
256
287
  value: H.country === "IN" ? H.ifsc : H.routingNumber,
257
288
  onChange: (e) => U((t) => t.country === "IN" ? {
258
289
  ...t,
@@ -262,26 +293,26 @@ var D = () => {
262
293
  routingNumber: e.target.value
263
294
  }),
264
295
  placeholder: H.country === "IN" ? "IFSC" : "Routing number",
265
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
296
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
266
297
  })
267
- ] }) : H.type === "UPI" ? /* @__PURE__ */ T("input", {
298
+ ] }) : H.type === "UPI" ? /* @__PURE__ */ b("input", {
268
299
  value: H.upiId,
269
300
  onChange: (e) => U((t) => ({
270
301
  ...t,
271
302
  upiId: e.target.value
272
303
  })),
273
304
  placeholder: "UPI ID",
274
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
305
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
275
306
  }) : null
276
307
  ]
277
308
  }),
278
- /* @__PURE__ */ E("button", {
309
+ /* @__PURE__ */ x("button", {
279
310
  type: "button",
280
- onClick: () => void Q(),
281
- className: "mt-4 inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
282
- children: [/* @__PURE__ */ T(x, { className: "size-4" }), J ? "Update payout account" : "Save payout account"]
311
+ onClick: () => void ce(),
312
+ className: "mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
313
+ children: [/* @__PURE__ */ b(g, { className: "size-4" }), J ? "Update payout account" : "Save payout account"]
283
314
  }),
284
- J ? /* @__PURE__ */ T("button", {
315
+ J ? /* @__PURE__ */ b("button", {
285
316
  type: "button",
286
317
  onClick: () => {
287
318
  Y(null), U({
@@ -298,39 +329,39 @@ var D = () => {
298
329
  upiId: ""
299
330
  });
300
331
  },
301
- className: "mt-4 ml-3 inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-foreground",
332
+ className: "mt-4 ml-3 inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary",
302
333
  children: "Cancel edit"
303
334
  }) : null
304
335
  ]
305
- }), /* @__PURE__ */ E("section", {
336
+ }), /* @__PURE__ */ x("section", {
306
337
  className: "space-y-4",
307
- children: [/* @__PURE__ */ E("div", {
308
- className: "rounded-lg border border-border bg-card p-4",
338
+ children: [/* @__PURE__ */ x("div", {
339
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
309
340
  children: [
310
- /* @__PURE__ */ E("div", {
341
+ /* @__PURE__ */ x("div", {
311
342
  className: "mb-4 flex items-center justify-between",
312
- children: [/* @__PURE__ */ T("h2", {
313
- className: "text-lg font-semibold text-foreground",
343
+ children: [/* @__PURE__ */ b("h2", {
344
+ className: "text-lg font-semibold text-text-primary",
314
345
  children: "Request payout"
315
- }), /* @__PURE__ */ E("button", {
346
+ }), /* @__PURE__ */ x("button", {
316
347
  type: "button",
317
- onClick: () => void Z(),
318
- className: "inline-flex items-center gap-2 rounded-md border border-border px-3 py-2 text-sm font-medium text-foreground",
319
- children: [/* @__PURE__ */ T(S, { className: "size-4" }), "Refresh"]
348
+ onClick: () => void $(),
349
+ className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary",
350
+ children: [/* @__PURE__ */ b(_, { className: "size-4" }), "Refresh"]
320
351
  })]
321
352
  }),
322
- P.length === 0 && !R ? /* @__PURE__ */ T(r, {
323
- icon: /* @__PURE__ */ T(x, { className: "size-8" }),
353
+ P.length === 0 && !R ? /* @__PURE__ */ b(r, {
354
+ icon: /* @__PURE__ */ b(g, { className: "size-8" }),
324
355
  title: "No payout accounts yet",
325
356
  description: "Add a payout account before requesting a withdrawal."
326
- }) : /* @__PURE__ */ E("div", {
357
+ }) : /* @__PURE__ */ x("div", {
327
358
  className: "space-y-3",
328
359
  children: [
329
- /* @__PURE__ */ T("select", {
360
+ /* @__PURE__ */ b("select", {
330
361
  value: K,
331
362
  onChange: (e) => q(e.target.value),
332
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground",
333
- children: P.map((e) => /* @__PURE__ */ E("option", {
363
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
364
+ children: P.map((e) => /* @__PURE__ */ x("option", {
334
365
  value: e.id,
335
366
  children: [
336
367
  e.label,
@@ -341,36 +372,36 @@ var D = () => {
341
372
  ]
342
373
  }, e.id))
343
374
  }),
344
- /* @__PURE__ */ T("input", {
375
+ /* @__PURE__ */ b("input", {
345
376
  value: W,
346
377
  onChange: (e) => G(e.target.value),
347
378
  placeholder: "Amount",
348
- className: "w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground"
379
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
349
380
  }),
350
- /* @__PURE__ */ E("button", {
381
+ /* @__PURE__ */ x("button", {
351
382
  type: "button",
352
- onClick: () => void ne(),
353
- className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground",
354
- children: [/* @__PURE__ */ T(C, { className: "size-4" }), "Request payout"]
383
+ onClick: () => void fe(),
384
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
385
+ children: [/* @__PURE__ */ b(v, { className: "size-4" }), "Request payout"]
355
386
  })
356
387
  ]
357
388
  }),
358
- P.length > 0 ? /* @__PURE__ */ E("div", {
359
- className: "mt-4 space-y-3 rounded-md border border-border bg-background/60 p-3",
360
- children: [/* @__PURE__ */ T("h3", {
361
- className: "text-sm font-semibold text-foreground",
389
+ P.length > 0 ? /* @__PURE__ */ x("div", {
390
+ className: "mt-4 space-y-3 rounded-md border border-border-subtle bg-bg-surface/60 p-3",
391
+ children: [/* @__PURE__ */ b("h3", {
392
+ className: "text-sm font-semibold text-text-primary",
362
393
  children: "Saved payout accounts"
363
- }), P.map((e) => /* @__PURE__ */ E("div", {
364
- className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-border/70 bg-card px-3 py-2 text-sm",
365
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("p", {
366
- className: "font-medium text-foreground",
394
+ }), P.map((e) => /* @__PURE__ */ x("div", {
395
+ className: "flex flex-wrap items-center justify-between gap-3 rounded-md border border-border-subtle/70 bg-bg-surface px-3 py-2 text-sm",
396
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("p", {
397
+ className: "font-medium text-text-primary",
367
398
  children: [
368
399
  e.label,
369
400
  " ",
370
401
  e.isDefault ? "• Default" : ""
371
402
  ]
372
- }), /* @__PURE__ */ E("p", {
373
- className: "text-muted-foreground",
403
+ }), /* @__PURE__ */ x("p", {
404
+ className: "text-text-secondary",
374
405
  children: [
375
406
  e.providerPreference,
376
407
  " · ",
@@ -378,25 +409,25 @@ var D = () => {
378
409
  " · ",
379
410
  e.status
380
411
  ]
381
- })] }), /* @__PURE__ */ E("div", {
412
+ })] }), /* @__PURE__ */ x("div", {
382
413
  className: "flex flex-wrap gap-2",
383
414
  children: [
384
- /* @__PURE__ */ T("button", {
415
+ /* @__PURE__ */ b("button", {
385
416
  type: "button",
386
- onClick: () => te(e),
387
- className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground",
417
+ onClick: () => de(e),
418
+ className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
388
419
  children: "Edit"
389
420
  }),
390
- e.isDefault ? null : /* @__PURE__ */ T("button", {
421
+ e.isDefault ? null : /* @__PURE__ */ b("button", {
391
422
  type: "button",
392
- onClick: () => void $(e.id),
393
- className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-foreground",
423
+ onClick: () => void le(e.id),
424
+ className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
394
425
  children: "Make default"
395
426
  }),
396
- /* @__PURE__ */ T("button", {
427
+ /* @__PURE__ */ b("button", {
397
428
  type: "button",
398
- onClick: () => void ee(e.id),
399
- className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-destructive",
429
+ onClick: () => Z(e.id),
430
+ className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text",
400
431
  children: "Archive"
401
432
  })
402
433
  ]
@@ -404,77 +435,40 @@ var D = () => {
404
435
  }, e.id))]
405
436
  }) : null
406
437
  ]
407
- }), /* @__PURE__ */ E("div", {
408
- className: "rounded-lg border border-border bg-card p-4",
409
- children: [/* @__PURE__ */ T("h2", {
410
- className: "mb-4 text-lg font-semibold text-foreground",
438
+ }), /* @__PURE__ */ x("div", {
439
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
440
+ children: [/* @__PURE__ */ b("h2", {
441
+ className: "mb-4 text-lg font-semibold text-text-primary",
411
442
  children: "Payout requests"
412
- }), I.length === 0 && !R ? /* @__PURE__ */ T(r, {
413
- icon: /* @__PURE__ */ T(C, { className: "size-8" }),
443
+ }), I.length === 0 && !R ? /* @__PURE__ */ b(r, {
444
+ icon: /* @__PURE__ */ b(v, { className: "size-8" }),
414
445
  title: "No payout requests yet",
415
446
  description: "Your payout requests and processing updates will appear here."
416
- }) : /* @__PURE__ */ T("div", {
417
- className: "overflow-x-auto",
418
- children: /* @__PURE__ */ E("table", {
419
- className: "min-w-full text-sm",
420
- children: [/* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", {
421
- className: "border-b border-border text-left text-muted-foreground",
422
- children: [
423
- /* @__PURE__ */ T("th", {
424
- className: "px-3 py-2",
425
- children: "Amount"
426
- }),
427
- /* @__PURE__ */ T("th", {
428
- className: "px-3 py-2",
429
- children: "Provider"
430
- }),
431
- /* @__PURE__ */ T("th", {
432
- className: "px-3 py-2",
433
- children: "Status"
434
- }),
435
- /* @__PURE__ */ T("th", {
436
- className: "px-3 py-2",
437
- children: "Account"
438
- }),
439
- /* @__PURE__ */ T("th", {
440
- className: "px-3 py-2",
441
- children: "Created"
442
- })
443
- ]
444
- }) }), /* @__PURE__ */ T("tbody", { children: I.map((e) => /* @__PURE__ */ E("tr", {
445
- className: "border-b border-border/70 text-foreground",
446
- children: [
447
- /* @__PURE__ */ T("td", {
448
- className: "px-3 py-2 font-medium",
449
- children: o(e.requestedAmount, e.currency)
450
- }),
451
- /* @__PURE__ */ T("td", {
452
- className: "px-3 py-2",
453
- children: e.provider
454
- }),
455
- /* @__PURE__ */ T("td", {
456
- className: "px-3 py-2",
457
- children: e.status
458
- }),
459
- /* @__PURE__ */ T("td", {
460
- className: "px-3 py-2",
461
- children: e.payoutAccount?.label || "-"
462
- }),
463
- /* @__PURE__ */ T("td", {
464
- className: "px-3 py-2",
465
- children: s(e.createdAt)
466
- })
467
- ]
468
- }, e.id)) })]
469
- })
447
+ }) : /* @__PURE__ */ b(D, {
448
+ data: I,
449
+ rowKey: (e) => e.id,
450
+ columns: O
470
451
  })]
471
452
  })]
472
453
  })]
454
+ }),
455
+ /* @__PURE__ */ b(S, {
456
+ open: X !== null,
457
+ onOpenChange: (e) => {
458
+ e || Z(null);
459
+ },
460
+ children: /* @__PURE__ */ x(T, { children: [/* @__PURE__ */ x(se, { children: [/* @__PURE__ */ b(E, { children: "Archive payout account?" }), /* @__PURE__ */ b(ae, { children: "Archive this payout account? You can add a new one at any time." })] }), /* @__PURE__ */ x(oe, { children: [/* @__PURE__ */ b(w, { children: "Cancel" }), /* @__PURE__ */ b(C, {
461
+ onClick: () => {
462
+ let e = X;
463
+ Z(null), e && ue(e);
464
+ },
465
+ children: "Archive"
466
+ })] })] })
473
467
  })
474
468
  ]
475
469
  });
476
470
  };
477
471
  //#endregion
478
- export { D as PayoutsPage };
472
+ export { k as PayoutsPage };
479
473
 
480
474
  //# sourceMappingURL=PayoutsPage.js.map