@burdenoff/microfe-comradecircle 2026.730.1 → 2026.730.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.
@@ -0,0 +1,596 @@
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { PageLayout as t } from "../../components/PageLayout.js";
3
+ import { useComArchiveDigitalProduct as n, useComArchiveMembershipTier as r, useComArchivePaidEvent as i, useComCreateDigitalProduct as a, useComCreateMembershipTier as o, useComCreatePaidEvent as s, useComMyDigitalProducts as c, useComMyMembershipTiers as l, useComMyPaidEvents as u, useComMyReceivedTips as d, useComUpdatePaidEvent as f } from "../../hooks/useComradeCircleApi.js";
4
+ import "../../hooks/index.js";
5
+ import { describeError as p, notify as m } from "../../lib/toast.js";
6
+ import { EmptyState as h } from "../../components/EmptyState.js";
7
+ import { ErrorView as g, LoadingView as _ } from "../../components/StateViews.js";
8
+ import { useState as v } from "react";
9
+ import { Coins as y, Gift as b, Package as x, Plus as S, Ticket as C, Trash2 as w, Users as T } from "lucide-react";
10
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
11
+ import { Badge as O, Button as k, GlassCard as A, Input as j, Label as M, Textarea as N } from "@burdenoff/fe-libs/ui";
12
+ //#region src/comradecircle/pages/monetization/MonetizationPage.tsx
13
+ var P = [
14
+ {
15
+ id: "tiers",
16
+ label: "Membership tiers",
17
+ icon: T
18
+ },
19
+ {
20
+ id: "events",
21
+ label: "Paid events",
22
+ icon: C
23
+ },
24
+ {
25
+ id: "products",
26
+ label: "Digital products",
27
+ icon: x
28
+ },
29
+ {
30
+ id: "tips",
31
+ label: "Tips received",
32
+ icon: b
33
+ }
34
+ ];
35
+ function F(e, t) {
36
+ try {
37
+ return new Intl.NumberFormat(void 0, {
38
+ style: "currency",
39
+ currency: t
40
+ }).format(e);
41
+ } catch {
42
+ return `${t} ${e.toFixed(2)}`;
43
+ }
44
+ }
45
+ function I({ children: e }) {
46
+ return /* @__PURE__ */ E("p", {
47
+ className: "text-xs font-semibold uppercase tracking-[0.08em] text-text-tertiary",
48
+ children: e
49
+ });
50
+ }
51
+ function L({ title: e, subtitle: t, price: n, statusLabel: r, statusTone: i, onArchive: a, archiving: o, archiveLabel: s = "Archive" }) {
52
+ return /* @__PURE__ */ D("div", {
53
+ className: "flex flex-col gap-3 rounded-xl border border-border-seam bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
54
+ children: [/* @__PURE__ */ D("div", {
55
+ className: "min-w-0",
56
+ children: [/* @__PURE__ */ D("div", {
57
+ className: "flex flex-wrap items-center gap-2",
58
+ children: [/* @__PURE__ */ E("h4", {
59
+ className: "truncate text-sm font-semibold text-text-primary",
60
+ children: e
61
+ }), /* @__PURE__ */ E(O, {
62
+ variant: i === "positive" ? "default" : i === "negative" ? "destructive" : "secondary",
63
+ children: r
64
+ })]
65
+ }), t && /* @__PURE__ */ E("p", {
66
+ className: "mt-1 truncate text-xs text-text-secondary",
67
+ children: t
68
+ })]
69
+ }), /* @__PURE__ */ D("div", {
70
+ className: "flex shrink-0 items-center gap-3",
71
+ children: [/* @__PURE__ */ E("span", {
72
+ className: "text-sm font-semibold tabular-nums text-text-primary",
73
+ children: n
74
+ }), a && /* @__PURE__ */ D(k, {
75
+ variant: "ghost",
76
+ size: "sm",
77
+ onClick: a,
78
+ disabled: o,
79
+ children: [
80
+ /* @__PURE__ */ E(w, { className: "mr-1.5 h-3.5 w-3.5" }),
81
+ " ",
82
+ s
83
+ ]
84
+ })]
85
+ })]
86
+ });
87
+ }
88
+ function R({ onDone: e }) {
89
+ let t = o(), [n, r] = v(""), [i, a] = v(""), [s, c] = v("");
90
+ return /* @__PURE__ */ D("form", {
91
+ onSubmit: async (o) => {
92
+ o.preventDefault();
93
+ let l = Number(s);
94
+ if (!n.trim()) {
95
+ m.error("Name required", "Give your tier a name.");
96
+ return;
97
+ }
98
+ if (!Number.isFinite(l) || l < 0) {
99
+ m.error("Invalid price", "Enter a price of 0 or more.");
100
+ return;
101
+ }
102
+ try {
103
+ await t.mutateAsync({
104
+ name: n.trim(),
105
+ description: i.trim() || null,
106
+ priceAmount: l,
107
+ billingInterval: "MONTHLY"
108
+ }), m.success("Membership tier created"), r(""), a(""), c(""), e();
109
+ } catch (e) {
110
+ m.error("Could not create tier", p(e));
111
+ }
112
+ },
113
+ className: "grid gap-3 rounded-xl border border-border-seam bg-bg-surface p-4",
114
+ children: [
115
+ /* @__PURE__ */ D("div", {
116
+ className: "grid gap-3 sm:grid-cols-[2fr_1fr]",
117
+ children: [/* @__PURE__ */ D("div", {
118
+ className: "grid gap-1.5",
119
+ children: [/* @__PURE__ */ E(M, {
120
+ htmlFor: "tier-name",
121
+ children: "Tier name"
122
+ }), /* @__PURE__ */ E(j, {
123
+ id: "tier-name",
124
+ value: n,
125
+ onChange: (e) => r(e.target.value),
126
+ placeholder: "e.g. Supporter",
127
+ required: !0
128
+ })]
129
+ }), /* @__PURE__ */ D("div", {
130
+ className: "grid gap-1.5",
131
+ children: [/* @__PURE__ */ E(M, {
132
+ htmlFor: "tier-price",
133
+ children: "Price / month (USD)"
134
+ }), /* @__PURE__ */ E(j, {
135
+ id: "tier-price",
136
+ type: "number",
137
+ min: "0",
138
+ step: "0.01",
139
+ value: s,
140
+ onChange: (e) => c(e.target.value),
141
+ placeholder: "4.99",
142
+ required: !0
143
+ })]
144
+ })]
145
+ }),
146
+ /* @__PURE__ */ D("div", {
147
+ className: "grid gap-1.5",
148
+ children: [/* @__PURE__ */ E(M, {
149
+ htmlFor: "tier-description",
150
+ children: "Perks description"
151
+ }), /* @__PURE__ */ E(N, {
152
+ id: "tier-description",
153
+ value: i,
154
+ onChange: (e) => a(e.target.value),
155
+ rows: 2,
156
+ placeholder: "What supporters get at this tier"
157
+ })]
158
+ }),
159
+ /* @__PURE__ */ E("div", {
160
+ className: "flex justify-end",
161
+ children: /* @__PURE__ */ D(k, {
162
+ type: "submit",
163
+ disabled: t.isPending,
164
+ children: [
165
+ /* @__PURE__ */ E(S, { className: "mr-1.5 h-4 w-4" }),
166
+ " ",
167
+ t.isPending ? "Creating…" : "Create tier"
168
+ ]
169
+ })
170
+ })
171
+ ]
172
+ });
173
+ }
174
+ function z() {
175
+ let { data: e, isLoading: t, isError: n, refetch: i } = l(), a = r(), [o, s] = v(!1), c = e?.items ?? [], u = async (e) => {
176
+ try {
177
+ await a.mutateAsync(e.id), m.success("Tier archived", e.name);
178
+ } catch (e) {
179
+ m.error("Could not archive tier", p(e));
180
+ }
181
+ };
182
+ return t ? /* @__PURE__ */ E(_, { label: "Loading your membership tiers…" }) : n ? /* @__PURE__ */ E(g, {
183
+ message: "We couldn't load your membership tiers.",
184
+ onRetry: () => i()
185
+ }) : /* @__PURE__ */ D("div", {
186
+ className: "flex flex-col gap-4",
187
+ children: [
188
+ /* @__PURE__ */ D("div", {
189
+ className: "flex items-center justify-between",
190
+ children: [/* @__PURE__ */ E(I, { children: "Your membership tiers" }), /* @__PURE__ */ D(k, {
191
+ variant: "outline",
192
+ size: "sm",
193
+ onClick: () => s((e) => !e),
194
+ children: [/* @__PURE__ */ E(S, { className: "mr-1.5 h-3.5 w-3.5" }), " New tier"]
195
+ })]
196
+ }),
197
+ o && /* @__PURE__ */ E(R, { onDone: () => s(!1) }),
198
+ c.length === 0 ? /* @__PURE__ */ E(h, {
199
+ icon: /* @__PURE__ */ E(T, { className: "h-10 w-10" }),
200
+ title: "No membership tiers yet",
201
+ description: "Create a tier so fans can support you on a recurring basis."
202
+ }) : /* @__PURE__ */ E("div", {
203
+ className: "flex flex-col gap-3",
204
+ children: c.map((e) => /* @__PURE__ */ E(L, {
205
+ title: e.name,
206
+ subtitle: e.description,
207
+ price: `${F(e.priceAmount, e.currency)}/${e.billingInterval === "YEARLY" ? "yr" : "mo"}`,
208
+ statusLabel: e.status,
209
+ statusTone: e.status === "ACTIVE" ? "positive" : "neutral",
210
+ onArchive: e.status === "ACTIVE" ? () => u(e) : void 0,
211
+ archiving: a.isPending
212
+ }, e.id))
213
+ })
214
+ ]
215
+ });
216
+ }
217
+ function B({ onDone: e }) {
218
+ let t = s(), [n, r] = v(""), [i, a] = v(""), [o, c] = v("");
219
+ return /* @__PURE__ */ D("form", {
220
+ onSubmit: async (s) => {
221
+ s.preventDefault();
222
+ let l = Number(i);
223
+ if (!n.trim()) {
224
+ m.error("Title required", "Give your event a title.");
225
+ return;
226
+ }
227
+ if (!Number.isFinite(l) || l < 0) {
228
+ m.error("Invalid price", "Enter a ticket price of 0 or more.");
229
+ return;
230
+ }
231
+ try {
232
+ await t.mutateAsync({
233
+ title: n.trim(),
234
+ priceAmount: l,
235
+ capacity: o.trim() ? Number(o) : null
236
+ }), m.success("Paid event created as a draft", "Publish it once you’re ready."), r(""), a(""), c(""), e();
237
+ } catch (e) {
238
+ m.error("Could not create event", p(e));
239
+ }
240
+ },
241
+ className: "grid gap-3 rounded-xl border border-border-seam bg-bg-surface p-4",
242
+ children: [/* @__PURE__ */ D("div", {
243
+ className: "grid gap-3 sm:grid-cols-[2fr_1fr_1fr]",
244
+ children: [
245
+ /* @__PURE__ */ D("div", {
246
+ className: "grid gap-1.5",
247
+ children: [/* @__PURE__ */ E(M, {
248
+ htmlFor: "event-title",
249
+ children: "Event title"
250
+ }), /* @__PURE__ */ E(j, {
251
+ id: "event-title",
252
+ value: n,
253
+ onChange: (e) => r(e.target.value),
254
+ required: !0
255
+ })]
256
+ }),
257
+ /* @__PURE__ */ D("div", {
258
+ className: "grid gap-1.5",
259
+ children: [/* @__PURE__ */ E(M, {
260
+ htmlFor: "event-price",
261
+ children: "Ticket price (USD)"
262
+ }), /* @__PURE__ */ E(j, {
263
+ id: "event-price",
264
+ type: "number",
265
+ min: "0",
266
+ step: "0.01",
267
+ value: i,
268
+ onChange: (e) => a(e.target.value),
269
+ required: !0
270
+ })]
271
+ }),
272
+ /* @__PURE__ */ D("div", {
273
+ className: "grid gap-1.5",
274
+ children: [/* @__PURE__ */ E(M, {
275
+ htmlFor: "event-capacity",
276
+ children: "Capacity (optional)"
277
+ }), /* @__PURE__ */ E(j, {
278
+ id: "event-capacity",
279
+ type: "number",
280
+ min: "1",
281
+ value: o,
282
+ onChange: (e) => c(e.target.value)
283
+ })]
284
+ })
285
+ ]
286
+ }), /* @__PURE__ */ E("div", {
287
+ className: "flex justify-end",
288
+ children: /* @__PURE__ */ D(k, {
289
+ type: "submit",
290
+ disabled: t.isPending,
291
+ children: [
292
+ /* @__PURE__ */ E(S, { className: "mr-1.5 h-4 w-4" }),
293
+ " ",
294
+ t.isPending ? "Creating…" : "Create event (draft)"
295
+ ]
296
+ })
297
+ })]
298
+ });
299
+ }
300
+ function V() {
301
+ let { data: e, isLoading: t, isError: n, refetch: r } = u(), a = f(), o = i(), [s, c] = v(!1), l = e?.items ?? [], d = async (e) => {
302
+ try {
303
+ await a.mutateAsync({
304
+ id: e.id,
305
+ input: { status: "PUBLISHED" }
306
+ }), m.success("Event published", e.title);
307
+ } catch (e) {
308
+ m.error("Could not publish event", p(e));
309
+ }
310
+ }, y = async (e) => {
311
+ try {
312
+ await o.mutateAsync(e.id), m.success("Event cancelled", e.title);
313
+ } catch (e) {
314
+ m.error("Could not cancel event", p(e));
315
+ }
316
+ };
317
+ return t ? /* @__PURE__ */ E(_, { label: "Loading your paid events…" }) : n ? /* @__PURE__ */ E(g, {
318
+ message: "We couldn't load your paid events.",
319
+ onRetry: () => r()
320
+ }) : /* @__PURE__ */ D("div", {
321
+ className: "flex flex-col gap-4",
322
+ children: [
323
+ /* @__PURE__ */ D("div", {
324
+ className: "flex items-center justify-between",
325
+ children: [/* @__PURE__ */ E(I, { children: "Your paid events" }), /* @__PURE__ */ D(k, {
326
+ variant: "outline",
327
+ size: "sm",
328
+ onClick: () => c((e) => !e),
329
+ children: [/* @__PURE__ */ E(S, { className: "mr-1.5 h-3.5 w-3.5" }), " New event"]
330
+ })]
331
+ }),
332
+ s && /* @__PURE__ */ E(B, { onDone: () => c(!1) }),
333
+ l.length === 0 ? /* @__PURE__ */ E(h, {
334
+ icon: /* @__PURE__ */ E(C, { className: "h-10 w-10" }),
335
+ title: "No paid events yet",
336
+ description: "Create a ticketed event — it starts as a draft until you publish it."
337
+ }) : /* @__PURE__ */ E("div", {
338
+ className: "flex flex-col gap-3",
339
+ children: l.map((e) => /* @__PURE__ */ D("div", {
340
+ className: "flex flex-col gap-3 rounded-xl border border-border-seam bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
341
+ children: [/* @__PURE__ */ D("div", {
342
+ className: "min-w-0",
343
+ children: [/* @__PURE__ */ D("div", {
344
+ className: "flex flex-wrap items-center gap-2",
345
+ children: [/* @__PURE__ */ E("h4", {
346
+ className: "truncate text-sm font-semibold text-text-primary",
347
+ children: e.title
348
+ }), /* @__PURE__ */ E(O, {
349
+ variant: e.status === "PUBLISHED" ? "default" : e.status === "CANCELLED" ? "destructive" : "secondary",
350
+ children: e.status
351
+ })]
352
+ }), e.capacity != null && /* @__PURE__ */ D("p", {
353
+ className: "mt-1 text-xs text-text-secondary",
354
+ children: ["Capacity: ", e.capacity]
355
+ })]
356
+ }), /* @__PURE__ */ D("div", {
357
+ className: "flex shrink-0 items-center gap-2",
358
+ children: [
359
+ /* @__PURE__ */ E("span", {
360
+ className: "text-sm font-semibold tabular-nums text-text-primary",
361
+ children: F(e.priceAmount, e.currency)
362
+ }),
363
+ e.status === "DRAFT" && /* @__PURE__ */ E(k, {
364
+ size: "sm",
365
+ onClick: () => d(e),
366
+ disabled: a.isPending,
367
+ children: "Publish"
368
+ }),
369
+ e.status !== "CANCELLED" && /* @__PURE__ */ D(k, {
370
+ variant: "ghost",
371
+ size: "sm",
372
+ onClick: () => y(e),
373
+ disabled: o.isPending,
374
+ children: [/* @__PURE__ */ E(w, { className: "mr-1.5 h-3.5 w-3.5" }), " Cancel"]
375
+ })
376
+ ]
377
+ })]
378
+ }, e.id))
379
+ })
380
+ ]
381
+ });
382
+ }
383
+ function H({ onDone: e }) {
384
+ let t = a(), [n, r] = v(""), [i, o] = v(""), [s, c] = v("");
385
+ return /* @__PURE__ */ D("form", {
386
+ onSubmit: async (a) => {
387
+ a.preventDefault();
388
+ let l = Number(i);
389
+ if (!n.trim()) {
390
+ m.error("Title required", "Give your product a title.");
391
+ return;
392
+ }
393
+ if (!Number.isFinite(l) || l < 0) {
394
+ m.error("Invalid price", "Enter a price of 0 or more.");
395
+ return;
396
+ }
397
+ try {
398
+ await t.mutateAsync({
399
+ title: n.trim(),
400
+ description: s.trim() || null,
401
+ priceAmount: l,
402
+ productType: "DOWNLOAD"
403
+ }), m.success("Digital product created"), r(""), o(""), c(""), e();
404
+ } catch (e) {
405
+ m.error("Could not create product", p(e));
406
+ }
407
+ },
408
+ className: "grid gap-3 rounded-xl border border-border-seam bg-bg-surface p-4",
409
+ children: [
410
+ /* @__PURE__ */ D("div", {
411
+ className: "grid gap-3 sm:grid-cols-[2fr_1fr]",
412
+ children: [/* @__PURE__ */ D("div", {
413
+ className: "grid gap-1.5",
414
+ children: [/* @__PURE__ */ E(M, {
415
+ htmlFor: "product-title",
416
+ children: "Product title"
417
+ }), /* @__PURE__ */ E(j, {
418
+ id: "product-title",
419
+ value: n,
420
+ onChange: (e) => r(e.target.value),
421
+ required: !0
422
+ })]
423
+ }), /* @__PURE__ */ D("div", {
424
+ className: "grid gap-1.5",
425
+ children: [/* @__PURE__ */ E(M, {
426
+ htmlFor: "product-price",
427
+ children: "Price (USD)"
428
+ }), /* @__PURE__ */ E(j, {
429
+ id: "product-price",
430
+ type: "number",
431
+ min: "0",
432
+ step: "0.01",
433
+ value: i,
434
+ onChange: (e) => o(e.target.value),
435
+ required: !0
436
+ })]
437
+ })]
438
+ }),
439
+ /* @__PURE__ */ D("div", {
440
+ className: "grid gap-1.5",
441
+ children: [/* @__PURE__ */ E(M, {
442
+ htmlFor: "product-description",
443
+ children: "Description"
444
+ }), /* @__PURE__ */ E(N, {
445
+ id: "product-description",
446
+ value: s,
447
+ onChange: (e) => c(e.target.value),
448
+ rows: 2,
449
+ placeholder: "What's included in this download"
450
+ })]
451
+ }),
452
+ /* @__PURE__ */ E("div", {
453
+ className: "flex justify-end",
454
+ children: /* @__PURE__ */ D(k, {
455
+ type: "submit",
456
+ disabled: t.isPending,
457
+ children: [
458
+ /* @__PURE__ */ E(S, { className: "mr-1.5 h-4 w-4" }),
459
+ " ",
460
+ t.isPending ? "Creating…" : "Create product"
461
+ ]
462
+ })
463
+ })
464
+ ]
465
+ });
466
+ }
467
+ function U() {
468
+ let { data: e, isLoading: t, isError: r, refetch: i } = c(), a = n(), [o, s] = v(!1), l = e?.items ?? [], u = async (e) => {
469
+ try {
470
+ await a.mutateAsync(e.id), m.success("Product archived", e.title);
471
+ } catch (e) {
472
+ m.error("Could not archive product", p(e));
473
+ }
474
+ };
475
+ return t ? /* @__PURE__ */ E(_, { label: "Loading your digital products…" }) : r ? /* @__PURE__ */ E(g, {
476
+ message: "We couldn't load your digital products.",
477
+ onRetry: () => i()
478
+ }) : /* @__PURE__ */ D("div", {
479
+ className: "flex flex-col gap-4",
480
+ children: [
481
+ /* @__PURE__ */ D("div", {
482
+ className: "flex items-center justify-between",
483
+ children: [/* @__PURE__ */ E(I, { children: "Your digital products" }), /* @__PURE__ */ D(k, {
484
+ variant: "outline",
485
+ size: "sm",
486
+ onClick: () => s((e) => !e),
487
+ children: [/* @__PURE__ */ E(S, { className: "mr-1.5 h-3.5 w-3.5" }), " New product"]
488
+ })]
489
+ }),
490
+ o && /* @__PURE__ */ E(H, { onDone: () => s(!1) }),
491
+ l.length === 0 ? /* @__PURE__ */ E(h, {
492
+ icon: /* @__PURE__ */ E(x, { className: "h-10 w-10" }),
493
+ title: "No digital products yet",
494
+ description: "List a downloadable or access-gated product with a price."
495
+ }) : /* @__PURE__ */ E("div", {
496
+ className: "flex flex-col gap-3",
497
+ children: l.map((e) => /* @__PURE__ */ E(L, {
498
+ title: e.title,
499
+ subtitle: e.description,
500
+ price: F(e.priceAmount, e.currency),
501
+ statusLabel: e.status,
502
+ statusTone: e.status === "ACTIVE" ? "positive" : "neutral",
503
+ onArchive: e.status === "ACTIVE" ? () => u(e) : void 0,
504
+ archiving: a.isPending
505
+ }, e.id))
506
+ })
507
+ ]
508
+ });
509
+ }
510
+ function W() {
511
+ let { data: e, isLoading: t, isError: n, refetch: r } = d(), i = e?.items ?? [], a = i.filter((e) => e.status === "RECORDED").reduce((e, t) => e + t.amount, 0);
512
+ return t ? /* @__PURE__ */ E(_, { label: "Loading tips received…" }) : n ? /* @__PURE__ */ E(g, {
513
+ message: "We couldn't load your tips.",
514
+ onRetry: () => r()
515
+ }) : /* @__PURE__ */ D("div", {
516
+ className: "flex flex-col gap-4",
517
+ children: [/* @__PURE__ */ D("div", {
518
+ className: "rounded-xl border border-border-seam bg-bg-surface p-4",
519
+ children: [
520
+ /* @__PURE__ */ E(I, { children: "Total recorded (not yet payable)" }),
521
+ /* @__PURE__ */ E("p", {
522
+ className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
523
+ children: F(a, i[0]?.currency ?? "USD")
524
+ }),
525
+ /* @__PURE__ */ E("p", {
526
+ className: "mt-1 text-xs text-text-tertiary",
527
+ children: "These are recorded tip intents only — payment integration is pending, so no funds have actually moved yet."
528
+ })
529
+ ]
530
+ }), i.length === 0 ? /* @__PURE__ */ E(h, {
531
+ icon: /* @__PURE__ */ E(b, { className: "h-10 w-10" }),
532
+ title: "No tips recorded yet",
533
+ description: "When fans tip you, the recorded intents will show up here."
534
+ }) : /* @__PURE__ */ E("div", {
535
+ className: "flex flex-col gap-3",
536
+ children: i.map((e) => /* @__PURE__ */ D("div", {
537
+ className: "flex items-center justify-between gap-3 rounded-xl border border-border-seam bg-bg-surface p-4",
538
+ children: [/* @__PURE__ */ D("div", {
539
+ className: "min-w-0",
540
+ children: [/* @__PURE__ */ D("p", {
541
+ className: "text-sm font-medium text-text-primary",
542
+ children: [F(e.amount, e.currency), /* @__PURE__ */ E("span", {
543
+ className: "ml-2 text-xs font-normal text-text-tertiary",
544
+ children: new Date(e.createdAt).toLocaleDateString()
545
+ })]
546
+ }), e.message && /* @__PURE__ */ D("p", {
547
+ className: "mt-1 truncate text-xs text-text-secondary",
548
+ children: [
549
+ "“",
550
+ e.message,
551
+ "”"
552
+ ]
553
+ })]
554
+ }), /* @__PURE__ */ E(O, {
555
+ variant: e.status === "RECORDED" ? "secondary" : "destructive",
556
+ children: e.status
557
+ })]
558
+ }, e.id))
559
+ })]
560
+ });
561
+ }
562
+ function G() {
563
+ let [n, r] = v("tiers");
564
+ return /* @__PURE__ */ D(t, {
565
+ title: "Monetization",
566
+ description: "Manage the membership tiers, paid events, and digital products you offer — and see the tips you've received. This is a pricing/catalog core: payment integration is pending, so no checkout is live yet.",
567
+ children: [
568
+ /* @__PURE__ */ E(A, {
569
+ treatment: "plain",
570
+ className: "mb-5 flex flex-wrap gap-1 p-1.5",
571
+ children: P.map(({ id: t, label: i, icon: a }) => /* @__PURE__ */ D("button", {
572
+ type: "button",
573
+ onClick: () => r(t),
574
+ className: e("flex items-center gap-1.5 rounded-lg px-3 py-2 text-xs font-medium transition-colors", n === t ? "bg-[var(--color-accent-soft)] text-accent" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
575
+ children: [
576
+ /* @__PURE__ */ E(a, { className: "h-4 w-4" }),
577
+ " ",
578
+ i
579
+ ]
580
+ }, t))
581
+ }),
582
+ /* @__PURE__ */ D("div", {
583
+ className: "mb-5 flex items-center gap-2 rounded-xl border border-status-warning-border bg-status-warning-bg-subtle px-4 py-3 text-xs text-status-warning-text",
584
+ children: [/* @__PURE__ */ E(y, { className: "h-4 w-4 shrink-0" }), "Payment integration pending — prices are informational until checkout goes live."]
585
+ }),
586
+ n === "tiers" && /* @__PURE__ */ E(z, {}),
587
+ n === "events" && /* @__PURE__ */ E(V, {}),
588
+ n === "products" && /* @__PURE__ */ E(U, {}),
589
+ n === "tips" && /* @__PURE__ */ E(W, {})
590
+ ]
591
+ });
592
+ }
593
+ //#endregion
594
+ export { G as MonetizationPage };
595
+
596
+ //# sourceMappingURL=MonetizationPage.js.map