@carlonicora/nextjs-jsonapi 1.38.1 → 1.38.3

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 (79) hide show
  1. package/dist/{BlockNoteEditor-VB72JQEO.js → BlockNoteEditor-RG5BCHLC.js} +6 -6
  2. package/dist/{BlockNoteEditor-VB72JQEO.js.map → BlockNoteEditor-RG5BCHLC.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-5CEV5TZT.mjs → BlockNoteEditor-YP7ZYOPD.mjs} +2 -2
  4. package/dist/billing/index.js +299 -299
  5. package/dist/billing/index.mjs +1 -1
  6. package/dist/{chunk-BYMBRMKS.js → chunk-6CYZMNDG.js} +6 -6
  7. package/dist/{chunk-BYMBRMKS.js.map → chunk-6CYZMNDG.js.map} +1 -1
  8. package/dist/{chunk-VMK2N3TQ.mjs → chunk-XPWXQWXX.mjs} +6 -6
  9. package/dist/{chunk-VMK2N3TQ.mjs.map → chunk-XPWXQWXX.mjs.map} +1 -1
  10. package/dist/client/index.js +2 -2
  11. package/dist/client/index.mjs +1 -1
  12. package/dist/components/index.js +2 -2
  13. package/dist/components/index.mjs +1 -1
  14. package/dist/contexts/index.js +2 -2
  15. package/dist/contexts/index.mjs +1 -1
  16. package/dist/scripts/generate-web-module/generator.d.ts.map +1 -1
  17. package/dist/scripts/generate-web-module/generator.js +5 -0
  18. package/dist/scripts/generate-web-module/generator.js.map +1 -1
  19. package/dist/scripts/generate-web-module/templates/components/container.template.js +7 -7
  20. package/dist/scripts/generate-web-module/templates/components/container.template.js.map +1 -1
  21. package/dist/scripts/generate-web-module/templates/components/content.template.js +1 -1
  22. package/dist/scripts/generate-web-module/templates/components/content.template.js.map +1 -1
  23. package/dist/scripts/generate-web-module/templates/components/deleter.template.js +2 -2
  24. package/dist/scripts/generate-web-module/templates/components/deleter.template.js.map +1 -1
  25. package/dist/scripts/generate-web-module/templates/components/details.template.js +1 -1
  26. package/dist/scripts/generate-web-module/templates/components/details.template.js.map +1 -1
  27. package/dist/scripts/generate-web-module/templates/components/editor.template.d.ts.map +1 -1
  28. package/dist/scripts/generate-web-module/templates/components/editor.template.js +8 -13
  29. package/dist/scripts/generate-web-module/templates/components/editor.template.js.map +1 -1
  30. package/dist/scripts/generate-web-module/templates/components/list-container.template.js +1 -1
  31. package/dist/scripts/generate-web-module/templates/components/list-container.template.js.map +1 -1
  32. package/dist/scripts/generate-web-module/templates/components/list.template.js +5 -5
  33. package/dist/scripts/generate-web-module/templates/components/list.template.js.map +1 -1
  34. package/dist/scripts/generate-web-module/templates/components/multi-selector.template.js +2 -2
  35. package/dist/scripts/generate-web-module/templates/components/multi-selector.template.js.map +1 -1
  36. package/dist/scripts/generate-web-module/templates/components/selector.template.js +2 -2
  37. package/dist/scripts/generate-web-module/templates/components/selector.template.js.map +1 -1
  38. package/dist/scripts/generate-web-module/templates/context.template.js +4 -4
  39. package/dist/scripts/generate-web-module/templates/context.template.js.map +1 -1
  40. package/dist/scripts/generate-web-module/templates/data/interface.template.js +3 -3
  41. package/dist/scripts/generate-web-module/templates/data/interface.template.js.map +1 -1
  42. package/dist/scripts/generate-web-module/templates/data/model.template.js +2 -2
  43. package/dist/scripts/generate-web-module/templates/data/model.template.js.map +1 -1
  44. package/dist/scripts/generate-web-module/templates/data/service.template.js +1 -1
  45. package/dist/scripts/generate-web-module/templates/data/service.template.js.map +1 -1
  46. package/dist/scripts/generate-web-module/templates/module.template.js +1 -1
  47. package/dist/scripts/generate-web-module/templates/module.template.js.map +1 -1
  48. package/dist/scripts/generate-web-module/templates/pages/detail-page.template.js +4 -4
  49. package/dist/scripts/generate-web-module/templates/pages/detail-page.template.js.map +1 -1
  50. package/dist/scripts/generate-web-module/templates/pages/list-page.template.js +2 -2
  51. package/dist/scripts/generate-web-module/templates/pages/list-page.template.js.map +1 -1
  52. package/dist/scripts/generate-web-module/templates/table-hook.template.d.ts.map +1 -1
  53. package/dist/scripts/generate-web-module/templates/table-hook.template.js +10 -6
  54. package/dist/scripts/generate-web-module/templates/table-hook.template.js.map +1 -1
  55. package/dist/scripts/generate-web-module/types/template-data.interface.d.ts +2 -0
  56. package/dist/scripts/generate-web-module/types/template-data.interface.d.ts.map +1 -1
  57. package/package.json +1 -1
  58. package/scripts/generate-web-module/generator.ts +5 -0
  59. package/scripts/generate-web-module/templates/components/container.template.ts +7 -7
  60. package/scripts/generate-web-module/templates/components/content.template.ts +1 -1
  61. package/scripts/generate-web-module/templates/components/deleter.template.ts +2 -2
  62. package/scripts/generate-web-module/templates/components/details.template.ts +1 -1
  63. package/scripts/generate-web-module/templates/components/editor.template.ts +23 -18
  64. package/scripts/generate-web-module/templates/components/list-container.template.ts +1 -1
  65. package/scripts/generate-web-module/templates/components/list.template.ts +5 -5
  66. package/scripts/generate-web-module/templates/components/multi-selector.template.ts +2 -2
  67. package/scripts/generate-web-module/templates/components/selector.template.ts +2 -2
  68. package/scripts/generate-web-module/templates/context.template.ts +4 -4
  69. package/scripts/generate-web-module/templates/data/interface.template.ts +5 -11
  70. package/scripts/generate-web-module/templates/data/model.template.ts +2 -2
  71. package/scripts/generate-web-module/templates/data/service.template.ts +1 -1
  72. package/scripts/generate-web-module/templates/module.template.ts +1 -1
  73. package/scripts/generate-web-module/templates/pages/detail-page.template.ts +4 -4
  74. package/scripts/generate-web-module/templates/pages/list-page.template.ts +2 -2
  75. package/scripts/generate-web-module/templates/table-hook.template.ts +16 -8
  76. package/scripts/generate-web-module/types/template-data.interface.ts +9 -1
  77. package/src/components/containers/PageContainer.tsx +1 -1
  78. package/src/components/pages/PageContentContainer.tsx +5 -5
  79. /package/dist/{BlockNoteEditor-5CEV5TZT.mjs.map → BlockNoteEditor-YP7ZYOPD.mjs.map} +0 -0
@@ -47,7 +47,7 @@
47
47
 
48
48
 
49
49
 
50
- var _chunkBYMBRMKSjs = require('../chunk-BYMBRMKS.js');
50
+ var _chunk6CYZMNDGjs = require('../chunk-6CYZMNDG.js');
51
51
 
52
52
 
53
53
 
@@ -113,41 +113,41 @@ function SubscriptionSummaryCard({
113
113
  onManageClick
114
114
  }) {
115
115
  if (loading) {
116
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
117
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
118
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
116
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
117
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
118
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
119
119
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
120
120
  ] }),
121
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: [
122
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-32 mb-2" }),
123
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-24 mb-1" }),
124
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-40" })
121
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: [
122
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-32 mb-2" }),
123
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-24 mb-1" }),
124
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-40" })
125
125
  ] })
126
126
  ] });
127
127
  }
128
128
  if (error) {
129
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
130
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
131
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
129
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
130
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
131
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
132
132
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
133
133
  ] }),
134
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
134
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
135
135
  ] });
136
136
  }
137
137
  const activeSubscriptions = subscriptions.filter(
138
138
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */
139
139
  );
140
140
  const primarySubscription = activeSubscriptions[0];
141
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
142
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
143
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
141
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
142
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
143
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
144
144
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
145
145
  ] }),
146
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
146
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
147
147
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No active plan" }),
148
148
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Subscribe to get started" }),
149
149
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
150
- _chunkBYMBRMKSjs.Button,
150
+ _chunk6CYZMNDGjs.Button,
151
151
  {
152
152
  variant: "outline",
153
153
  size: "sm",
@@ -166,7 +166,7 @@ function SubscriptionSummaryCard({
166
166
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
167
167
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription) }),
168
168
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
169
- _chunkBYMBRMKSjs.Badge,
169
+ _chunk6CYZMNDGjs.Badge,
170
170
  {
171
171
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
172
172
  children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status
@@ -208,37 +208,37 @@ function PaymentMethodSummaryCard({
208
208
  onManageClick
209
209
  }) {
210
210
  if (loading) {
211
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
212
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
213
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
211
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
212
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
213
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
214
214
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
215
215
  ] }),
216
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: [
217
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-32 mb-2" }),
218
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-24" })
216
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: [
217
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-32 mb-2" }),
218
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-24" })
219
219
  ] })
220
220
  ] });
221
221
  }
222
222
  if (error) {
223
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
224
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
225
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
223
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
224
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
226
226
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
227
227
  ] }),
228
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
228
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
229
229
  ] });
230
230
  }
231
231
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
232
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
233
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
234
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
232
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
233
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
234
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
235
235
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
236
236
  ] }),
237
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
237
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
238
238
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No payment method" }),
239
239
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Add a card to enable subscriptions" }),
240
240
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
241
- _chunkBYMBRMKSjs.Button,
241
+ _chunk6CYZMNDGjs.Button,
242
242
  {
243
243
  variant: "outline",
244
244
  size: "sm",
@@ -311,52 +311,52 @@ function CustomerInfoCard({ customer, loading, error }) {
311
311
  }
312
312
  }, "handlePortalClick");
313
313
  if (loading) {
314
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
315
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
316
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
314
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
315
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
316
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
317
317
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
318
318
  ] }),
319
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: [
320
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-32 mb-2" }),
321
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-48 mb-1" }),
322
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-24" })
319
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: [
320
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-32 mb-2" }),
321
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-48 mb-1" }),
322
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-24" })
323
323
  ] })
324
324
  ] });
325
325
  }
326
326
  if (error) {
327
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
328
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
327
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
328
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
329
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
330
330
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
331
331
  ] }),
332
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
332
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
333
333
  ] });
334
334
  }
335
335
  if (!customer) {
336
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
337
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
336
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
337
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
339
339
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
340
340
  ] }),
341
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: [
341
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: [
342
342
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "Not set up" }),
343
343
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Billing account will be created when you subscribe" })
344
344
  ] })
345
345
  ] });
346
346
  }
347
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
348
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
349
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
347
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
348
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
349
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
350
350
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
351
351
  ] }),
352
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
352
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
353
353
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
354
354
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
355
355
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
356
356
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: "Credit Balance: " }),
357
357
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-green-600" : "text-destructive", children: formatBalance(customer.balance, customer.currency) })
358
358
  ] }),
359
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
359
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
360
360
  portalLoading ? "Loading..." : "Manage in Stripe Portal",
361
361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ml-1" })
362
362
  ] })
@@ -400,42 +400,42 @@ function formatAmount(amount, currency) {
400
400
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
401
401
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
402
402
  if (loading) {
403
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
404
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
405
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
403
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
404
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
405
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
406
406
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
407
407
  ] }),
408
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: [
409
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-24 mb-2" }),
410
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-32 mb-1" }),
411
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-20" })
408
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: [
409
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-24 mb-2" }),
410
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-32 mb-1" }),
411
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-20" })
412
412
  ] })
413
413
  ] });
414
414
  }
415
415
  if (error) {
416
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
417
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
418
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
416
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
417
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
418
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
419
419
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
420
420
  ] }),
421
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
421
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
422
422
  ] });
423
423
  }
424
424
  const latestInvoice = invoices[0];
425
425
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
426
426
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
427
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
428
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
427
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
428
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
429
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
430
430
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
431
431
  ] }),
432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
433
433
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No invoices yet" }),
434
434
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Invoices will appear after your first billing cycle" })
435
435
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
436
436
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
437
437
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency) }),
438
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
438
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
439
439
  ] }),
440
440
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || `Invoice from ${formatDate2(latestInvoice.periodStart)}` }),
441
441
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
@@ -475,24 +475,24 @@ function BillingUsageSummaryCard({
475
475
  onViewDetailsClick
476
476
  }) {
477
477
  if (loading) {
478
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
479
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
480
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
478
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
479
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
480
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
481
481
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
482
482
  ] }),
483
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: [
484
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-24 mb-2" }),
485
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-32" })
483
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: [
484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-24 mb-2" }),
485
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-32" })
486
486
  ] })
487
487
  ] });
488
488
  }
489
489
  if (error) {
490
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
491
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
492
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
490
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
491
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
492
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
493
493
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
494
494
  ] }),
495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
495
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
496
496
  ] });
497
497
  }
498
498
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -500,12 +500,12 @@ function BillingUsageSummaryCard({
500
500
  }, 0);
501
501
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
502
502
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
503
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
504
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
505
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
503
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
504
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
505
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
506
506
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
507
507
  ] }),
508
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
508
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
509
509
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No meters" }),
510
510
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "No usage meters are configured" })
511
511
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -611,7 +611,7 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
611
611
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: "Loading payment form..." }) });
612
612
  }
613
613
  if (!setupIntent && error) {
614
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDescription, { children: error }) });
614
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDescription, { children: error }) });
615
615
  }
616
616
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
617
617
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md border border-gray-300 p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -634,13 +634,13 @@ function PaymentMethodForm({ onSuccess, onCancel, isLoading = false }) {
634
634
  }
635
635
  ) }),
636
636
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Label, { htmlFor: "setAsDefault", className: "text-sm font-normal", children: "Set as default payment method" })
637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Checkbox, { id: "setAsDefault", checked: setAsDefault, onCheckedChange: (checked) => setSetAsDefault(!!checked) }),
638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Label, { htmlFor: "setAsDefault", className: "text-sm font-normal", children: "Set as default payment method" })
639
639
  ] }),
640
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDescription, { children: error }) }),
640
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDescription, { children: error }) }),
641
641
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
642
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
643
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
642
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: "Cancel" }),
643
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? "Processing..." : "Add Card" })
644
644
  ] })
645
645
  ] });
646
646
  }
@@ -656,10 +656,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
656
656
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
657
657
  onOpenChange(false);
658
658
  }, "handleCancel");
659
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-md", children: [
660
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
661
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: "Add Payment Method" }),
662
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
659
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-md", children: [
660
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
661
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: "Add Payment Method" }),
662
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
663
663
  ] }),
664
664
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
665
665
  ] }) });
@@ -720,16 +720,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
720
720
  }
721
721
  }, "handleRemove");
722
722
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
723
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { className: "relative", children: [
724
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Badge, { className: "absolute right-2 top-2 bg-green-100 text-green-800 hover:bg-green-100", children: "Default" }),
725
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
723
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { className: "relative", children: [
724
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Badge, { className: "absolute right-2 top-2 bg-green-100 text-green-800 hover:bg-green-100", children: "Default" }),
725
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
726
726
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
727
727
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
728
728
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
729
729
  ] }),
730
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DropdownMenu, { children: [
731
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
732
- _chunkBYMBRMKSjs.Button,
730
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DropdownMenu, { children: [
731
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
732
+ _chunk6CYZMNDGjs.Button,
733
733
  {
734
734
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
735
735
  nativeButton: false,
@@ -740,13 +740,13 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
740
740
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
741
741
  }
742
742
  ) }),
743
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DropdownMenuContent, { align: "end", children: [
744
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
745
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DropdownMenuItem, { onClick: () => setShowRemoveDialog(true), disabled: loading, className: "text-red-600", children: "Remove" })
743
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DropdownMenuContent, { align: "end", children: [
744
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
745
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DropdownMenuItem, { onClick: () => setShowRemoveDialog(true), disabled: loading, className: "text-red-600", children: "Remove" })
746
746
  ] })
747
747
  ] })
748
748
  ] }),
749
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
749
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
750
750
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
751
751
  "\u2022\u2022\u2022\u2022 ",
752
752
  last4
@@ -759,17 +759,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
759
759
  ] })
760
760
  ] }) })
761
761
  ] }),
762
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogContent, { children: [
763
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogHeader, { children: [
764
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogTitle, { children: "Remove Payment Method" }),
765
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogDescription, { children: [
762
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogContent, { children: [
763
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogHeader, { children: [
764
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogTitle, { children: "Remove Payment Method" }),
765
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogDescription, { children: [
766
766
  "Are you sure you want to remove this payment method? This action cannot be undone.",
767
767
  isDefault && " This is your default payment method."
768
768
  ] })
769
769
  ] }),
770
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogFooter, { children: [
771
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
772
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
770
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogFooter, { children: [
771
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
772
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
773
773
  ] })
774
774
  ] }) })
775
775
  ] });
@@ -812,14 +812,14 @@ function PaymentMethodsContainer() {
812
812
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
813
813
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Payment Methods" })
814
814
  ] }),
815
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
815
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
816
816
  ] }),
817
817
  paymentMethods.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center gap-y-4 rounded-lg border-2 border-dashed border-gray-300 bg-muted/50 p-12", children: [
818
818
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
819
819
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
820
820
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-xl font-semibold", children: "No payment methods" }),
821
821
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: "Add a payment method to enable subscriptions and secure checkout." }),
822
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
822
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
823
823
  ] })
824
824
  ] }),
825
825
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -948,13 +948,13 @@ function InvoiceDetails({
948
948
  return invoice.stripeInvoiceId.slice(-8);
949
949
  }, "getInvoiceNumber");
950
950
  const productName = _optionalChain([invoice, 'access', _29 => _29.subscription, 'optionalAccess', _30 => _30.price, 'optionalAccess', _31 => _31.product, 'optionalAccess', _32 => _32.name]) || "Subscription";
951
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-2xl", children: [
952
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
953
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: [
951
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-2xl", children: [
952
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
953
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: [
954
954
  "Invoice ",
955
955
  getInvoiceNumber()
956
956
  ] }),
957
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
957
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
958
958
  ] }),
959
959
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
960
960
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1019,15 +1019,15 @@ function InvoiceDetails({
1019
1019
  ] })
1020
1020
  ] }),
1021
1021
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1022
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1022
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1023
1023
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "mr-2 h-4 w-4" }),
1024
1024
  "Download PDF"
1025
1025
  ] }),
1026
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1026
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1027
1027
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "mr-2 h-4 w-4" }),
1028
1028
  "Retry Payment"
1029
1029
  ] }),
1030
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1030
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1031
1031
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "mr-2 h-4 w-4" }),
1032
1032
  "View in Stripe"
1033
1033
  ] })
@@ -1051,30 +1051,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1051
1051
  return invoice.stripeInvoiceId.slice(-8);
1052
1052
  }, "getInvoiceNumber");
1053
1053
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1054
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Table, { children: [
1055
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.TableRow, { children: [
1056
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Invoice #" }),
1057
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Date" }),
1058
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Status" }),
1059
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { className: "text-right", children: "Amount" }),
1060
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Period" })
1054
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Table, { children: [
1055
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.TableRow, { children: [
1056
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Invoice #" }),
1057
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Date" }),
1058
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Status" }),
1059
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { className: "text-right", children: "Amount" }),
1060
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Period" })
1061
1061
  ] }) }),
1062
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableBody, { children: invoices.map((invoice) => {
1062
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableBody, { children: invoices.map((invoice) => {
1063
1063
  const invoiceNumber = getInvoiceNumber(invoice);
1064
1064
  const date = formatDate3(invoice.periodStart);
1065
1065
  const amount = formatCurrency(invoice.total, invoice.currency);
1066
1066
  const period = `${formatDate3(invoice.periodStart)} - ${formatDate3(invoice.periodEnd)}`;
1067
1067
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1068
- _chunkBYMBRMKSjs.TableRow,
1068
+ _chunk6CYZMNDGjs.TableRow,
1069
1069
  {
1070
1070
  onClick: () => handleRowClick(invoice),
1071
1071
  className: "cursor-pointer hover:bg-muted/50",
1072
1072
  children: [
1073
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1074
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-muted-foreground text-sm", children: date }),
1075
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1076
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-right font-medium", children: amount }),
1077
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-muted-foreground text-sm", children: period })
1073
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1074
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-muted-foreground text-sm", children: date }),
1075
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1076
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-right font-medium", children: amount }),
1077
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-muted-foreground text-sm", children: period })
1078
1078
  ]
1079
1079
  },
1080
1080
  invoice.id
@@ -1123,12 +1123,12 @@ function InvoicesContainer() {
1123
1123
  setStatusFilter(value);
1124
1124
  }, "handleFilterChange");
1125
1125
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1126
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.TabsList, { children: [
1127
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "all", children: "All" }),
1128
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1129
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1130
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1131
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1126
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.TabsList, { children: [
1127
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "all", children: "All" }),
1128
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1129
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1130
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1131
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1132
1132
  ] }) }),
1133
1133
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: "Loading invoices..." }),
1134
1134
  !loading && invoices.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-dashed border-gray-300 rounded-lg p-8 text-center", children: [
@@ -1188,19 +1188,19 @@ function CancelSubscriptionDialog({
1188
1188
  }
1189
1189
  }, "onSubmit");
1190
1190
  const periodEndDate = formatDate3(subscription.currentPeriodEnd);
1191
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-md", children: [
1192
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
1193
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: "Cancel Subscription" }),
1194
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1191
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-md", children: [
1192
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
1193
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: "Cancel Subscription" }),
1194
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1195
1195
  ] }),
1196
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1196
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1197
1197
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-3 text-sm text-blue-800", children: [
1198
1198
  "Your subscription will remain active until ",
1199
1199
  periodEndDate,
1200
1200
  ". You can continue using the service until then."
1201
1201
  ] }),
1202
1202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1203
- _chunkBYMBRMKSjs.FormTextarea,
1203
+ _chunk6CYZMNDGjs.FormTextarea,
1204
1204
  {
1205
1205
  form,
1206
1206
  id: "reason",
@@ -1210,8 +1210,8 @@ function CancelSubscriptionDialog({
1210
1210
  }
1211
1211
  ),
1212
1212
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1213
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1214
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1213
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1214
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1215
1215
  ] })
1216
1216
  ] }) })
1217
1217
  ] }) });
@@ -1333,10 +1333,10 @@ function SubscriptionDetails({
1333
1333
  const canResume = subscription.status === "paused" /* PAUSED */;
1334
1334
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1335
1335
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1336
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-2xl", children: [
1337
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
1338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: "Subscription Details" }),
1339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: "View and manage your subscription" })
1336
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-2xl", children: [
1337
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
1338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: "Subscription Details" }),
1339
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: "View and manage your subscription" })
1340
1340
  ] }),
1341
1341
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1342
1342
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1378,11 +1378,11 @@ function SubscriptionDetails({
1378
1378
  "."
1379
1379
  ] }) }),
1380
1380
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1381
- onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1382
- canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1383
- canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1384
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1385
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1381
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: "Change Plan" }),
1382
+ canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1383
+ canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1384
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1385
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1386
1386
  ] })
1387
1387
  ] })
1388
1388
  ] }) }),
@@ -1429,36 +1429,36 @@ function SubscriptionsList({ subscriptions, onSubscriptionsChange, onChangePlan
1429
1429
  setSelectedSub(subscription);
1430
1430
  }, "handleRowClick");
1431
1431
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Table, { children: [
1433
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.TableRow, { children: [
1434
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Status" }),
1435
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Plan" }),
1436
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Period" }),
1437
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { className: "text-right", children: "Amount" }),
1438
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { className: "text-right", children: "Actions" })
1432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Table, { children: [
1433
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.TableRow, { children: [
1434
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Status" }),
1435
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Plan" }),
1436
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Period" }),
1437
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { className: "text-right", children: "Amount" }),
1438
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { className: "text-right", children: "Actions" })
1439
1439
  ] }) }),
1440
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableBody, { children: subscriptions.map((subscription) => {
1440
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableBody, { children: subscriptions.map((subscription) => {
1441
1441
  const price = subscription.price;
1442
1442
  const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? formatCurrency(price.unitAmount, price.currency) : "0";
1443
1443
  const period = `${formatDate3(subscription.currentPeriodStart)} - ${formatDate3(subscription.currentPeriodEnd)}`;
1444
1444
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1445
- _chunkBYMBRMKSjs.TableRow,
1445
+ _chunk6CYZMNDGjs.TableRow,
1446
1446
  {
1447
1447
  onClick: () => handleRowClick(subscription),
1448
1448
  className: "cursor-pointer hover:bg-muted/50",
1449
1449
  children: [
1450
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1450
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1451
1451
  SubscriptionStatusBadge,
1452
1452
  {
1453
1453
  status: subscription.status,
1454
1454
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1455
1455
  }
1456
1456
  ) }),
1457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1459
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-right font-medium", children: amount }),
1460
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-right", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1461
- _chunkBYMBRMKSjs.Button,
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-right font-medium", children: amount }),
1460
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-right", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1461
+ _chunk6CYZMNDGjs.Button,
1462
1462
  {
1463
1463
  size: "sm",
1464
1464
  variant: "outline",
@@ -1526,7 +1526,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1526
1526
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1527
1527
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Subscriptions" })
1528
1528
  ] }),
1529
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1529
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _43 => _43()]), children: hasActiveRecurringSubscription ? "Purchase Add-ons" : "Subscribe to a Plan" })
1530
1530
  ] }),
1531
1531
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1532
1532
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
@@ -1534,7 +1534,7 @@ function SubscriptionsContainer({ onOpenWizard, hasActiveRecurringSubscription }
1534
1534
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1535
1535
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-xl font-semibold mb-2", children: "No Active Subscriptions" }),
1536
1536
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-6", children: "Choose a subscription plan to get started with our services." }),
1537
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1537
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: "Subscribe to a Plan" })
1538
1538
  ] })
1539
1539
  ] }),
1540
1540
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1555,9 +1555,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1555
1555
  if (!hasMonthly || !hasYearly) {
1556
1556
  return null;
1557
1557
  }
1558
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.TabsList, { children: [
1559
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "month", children: "Monthly" }),
1560
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TabsTrigger, { value: "year", children: "Yearly" })
1558
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.TabsList, { children: [
1559
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "month", children: "Monthly" }),
1560
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TabsTrigger, { value: "year", children: "Yearly" })
1561
1561
  ] }) });
1562
1562
  }
1563
1563
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1589,7 +1589,7 @@ function PricingCard({
1589
1589
  }
1590
1590
  }, "handleClick");
1591
1591
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1592
- _chunkBYMBRMKSjs.Card,
1592
+ _chunk6CYZMNDGjs.Card,
1593
1593
  {
1594
1594
  role: "radio",
1595
1595
  "aria-checked": isSelected,
@@ -1607,9 +1607,9 @@ function PricingCard({
1607
1607
  isLoading && "pointer-events-none"
1608
1608
  ),
1609
1609
  children: [
1610
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Badge, { variant: "secondary", className: "absolute top-2 right-2", children: "Current" }),
1611
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-lg", children: description }) }),
1612
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { className: "pb-4 grow", children: [
1610
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Badge, { variant: "secondary", className: "absolute top-2 right-2", children: "Current" }),
1611
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-lg", children: description }) }),
1612
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { className: "pb-4 grow", children: [
1613
1613
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1614
1614
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1615
1615
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ml-1", children: interval })
@@ -1619,8 +1619,8 @@ function PricingCard({
1619
1619
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1620
1620
  ] }, index)) })
1621
1621
  ] }),
1622
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1623
- _chunkBYMBRMKSjs.Button,
1622
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1623
+ _chunk6CYZMNDGjs.Button,
1624
1624
  {
1625
1625
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1626
1626
  className: "w-full",
@@ -1748,15 +1748,15 @@ function ProductPricingList({
1748
1748
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1749
1749
  function ProductPricingListSkeleton() {
1750
1750
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-6", children: [1, 2].map((rowIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1751
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-32" }),
1751
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-32" }),
1752
1752
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: [1, 2, 3].map((cardIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 rounded-lg border animate-pulse space-y-3", children: [
1753
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-6 w-24" }),
1754
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-8 w-32" }),
1753
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-6 w-24" }),
1754
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-8 w-32" }),
1755
1755
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1756
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-full" }),
1757
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-4 w-3/4" })
1756
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-full" }),
1757
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-4 w-3/4" })
1758
1758
  ] }),
1759
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Skeleton, { className: "h-10 w-full" })
1759
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Skeleton, { className: "h-10 w-full" })
1760
1760
  ] }, cardIndex)) })
1761
1761
  ] }, rowIndex)) });
1762
1762
  }
@@ -1811,8 +1811,8 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1811
1811
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1812
1812
  ] }, index)) }),
1813
1813
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3 pt-2 border-t border-accent/30", children: [
1814
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1815
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1814
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
1815
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1816
1816
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin mr-2" }),
1817
1817
  "Processing..."
1818
1818
  ] }) : "Subscribe" })
@@ -2148,7 +2148,7 @@ function WizardStepPlanSelection({
2148
2148
  onSelectPrice: handleSelectPrice
2149
2149
  }
2150
2150
  ),
2151
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2151
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? "Loading..." : "Next: Review" }) })
2152
2152
  ] });
2153
2153
  }
2154
2154
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2209,7 +2209,7 @@ function PromoCodeInput({
2209
2209
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-green-600", children: formatDiscount(appliedCode) })
2210
2210
  ] }),
2211
2211
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2212
- _chunkBYMBRMKSjs.Button,
2212
+ _chunk6CYZMNDGjs.Button,
2213
2213
  {
2214
2214
  variant: "ghost",
2215
2215
  size: "sm",
@@ -2226,7 +2226,7 @@ function PromoCodeInput({
2226
2226
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2227
2227
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2228
2228
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2229
- _chunkBYMBRMKSjs.Input,
2229
+ _chunk6CYZMNDGjs.Input,
2230
2230
  {
2231
2231
  placeholder: "Enter promo code",
2232
2232
  value: code,
@@ -2236,7 +2236,7 @@ function PromoCodeInput({
2236
2236
  className: "flex-1"
2237
2237
  }
2238
2238
  ),
2239
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : "Apply" })
2239
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : "Apply" })
2240
2240
  ] }),
2241
2241
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-red-500", children: error })
2242
2242
  ] });
@@ -2360,15 +2360,15 @@ function WizardStepReview({
2360
2360
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: "Payment Method" }),
2361
2361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: hasPaymentMethod ? "A payment method is on file" : "No payment method on file" })
2362
2362
  ] }),
2363
- !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2363
+ !hasPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: "Add Payment Method" })
2364
2364
  ] }) }),
2365
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Alert, { variant: "destructive", children: [
2365
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Alert, { variant: "destructive", children: [
2366
2366
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2367
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDescription, { children: error })
2367
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDescription, { children: error })
2368
2368
  ] }),
2369
2369
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2370
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2371
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2370
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: "Back" }),
2371
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? "Processing..." : hasPaymentMethod ? isChangingPlan ? "Confirm Plan Change" : "Subscribe Now" : "Add Payment Method" })
2372
2372
  ] })
2373
2373
  ] });
2374
2374
  }
@@ -2421,10 +2421,10 @@ function SubscriptionWizard({
2421
2421
  const isChangePlanMode = !!subscription;
2422
2422
  const dialogTitle = subscription ? "Change Subscription Plan" : isPurchasingAddons ? "Purchase Add-ons" : "Subscribe to a Plan";
2423
2423
  const dialogDescription = subscription ? "Select a new plan for your subscription" : isPurchasingAddons ? "Select one-time products to purchase" : "Choose a subscription plan to get started";
2424
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-2xl", children: [
2425
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
2426
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: dialogTitle }),
2427
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: dialogDescription })
2424
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-2xl", children: [
2425
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
2426
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: dialogTitle }),
2427
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: dialogDescription })
2428
2428
  ] }),
2429
2429
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2430
2430
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2507,15 +2507,15 @@ function UsageSummaryCard({ meter, summary }) {
2507
2507
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2508
2508
  const displayName = meter.displayName || meter.eventName;
2509
2509
  const hasLimit = limit !== null && limit !== void 0;
2510
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
2511
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2510
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
2511
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2512
2512
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100 text-blue-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-5 w-5" }) }),
2513
2513
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2514
2514
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold", children: displayName }),
2515
2515
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-gray-500", children: meter.id })
2516
2516
  ] })
2517
2517
  ] }),
2518
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2518
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2519
2519
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2520
2520
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString() }),
2521
2521
  hasLimit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm text-gray-500", children: [
@@ -2643,21 +2643,21 @@ function UsageHistoryTable({ usageRecords }) {
2643
2643
  }
2644
2644
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2645
2645
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold", children: "Usage History" }),
2646
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Table, { children: [
2647
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.TableRow, { children: [
2648
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Date & Time" }),
2649
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Meter Event" }),
2650
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { className: "text-right", children: "Quantity" }),
2651
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableHead, { children: "Event ID" })
2646
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Table, { children: [
2647
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.TableRow, { children: [
2648
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Date & Time" }),
2649
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Meter Event" }),
2650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { className: "text-right", children: "Quantity" }),
2651
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableHead, { children: "Event ID" })
2652
2652
  ] }) }),
2653
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableBody, { children: usageRecords.map((record) => {
2653
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableBody, { children: usageRecords.map((record) => {
2654
2654
  const dateTime = formatDateTime(record.timestamp);
2655
2655
  const quantity = record.quantity.toLocaleString();
2656
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.TableRow, { children: [
2657
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "font-medium", children: dateTime }),
2658
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2659
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-right font-medium", children: quantity }),
2660
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.TableCell, { className: "text-muted-foreground text-sm font-mono", children: record.stripeEventId })
2656
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.TableRow, { children: [
2657
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "font-medium", children: dateTime }),
2658
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2659
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-right font-medium", children: quantity }),
2660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.TableCell, { className: "text-muted-foreground text-sm font-mono", children: record.stripeEventId })
2661
2661
  ] }, record.id);
2662
2662
  }) })
2663
2663
  ] }) })
@@ -2668,8 +2668,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2668
2668
  // src/features/billing/components/modals/BillingDetailModal.tsx
2669
2669
 
2670
2670
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2671
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2672
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: title }) }),
2671
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2672
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: title }) }),
2673
2673
  children
2674
2674
  ] }) });
2675
2675
  }
@@ -2686,7 +2686,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2686
2686
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-red-900", children: "Payment Failed" }),
2687
2687
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-red-700 mt-1", children: "Your last payment failed. Please update your payment method to avoid service interruption." })
2688
2688
  ] }),
2689
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "border-red-300 text-red-700", children: "Update Payment Method" })
2689
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "border-red-300 text-red-700", children: "Update Payment Method" })
2690
2690
  ] });
2691
2691
  }
2692
2692
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -2706,7 +2706,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2706
2706
  ". Add a payment method to continue your subscription."
2707
2707
  ] })
2708
2708
  ] }),
2709
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "border-yellow-300 text-yellow-700", children: "Add Payment Method" })
2709
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "border-yellow-300 text-yellow-700", children: "Add Payment Method" })
2710
2710
  ] });
2711
2711
  }
2712
2712
  }
@@ -2930,18 +2930,18 @@ function BillingDashboardContainer() {
2930
2930
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
2931
2931
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Billing" })
2932
2932
  ] }),
2933
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
2934
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Card, { children: [
2935
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.CardHeader, { className: "text-center", children: [
2933
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
2934
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Card, { children: [
2935
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.CardHeader, { className: "text-center", children: [
2936
2936
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8 text-primary" }) }),
2937
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardTitle, { children: "Set Up Billing" }),
2938
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2937
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardTitle, { children: "Set Up Billing" }),
2938
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2939
2939
  ] }),
2940
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2940
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2941
2941
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
2942
2942
  "Setting up..."
2943
2943
  ] }) : "Set Up Billing Account" }) }),
2944
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-sm text-destructive", children: errors.customer }) })
2944
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-sm text-destructive", children: errors.customer }) })
2945
2945
  ] }),
2946
2946
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2947
2947
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3257,10 +3257,10 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3257
3257
  { id: "licensed", text: "Licensed (per unit)" },
3258
3258
  { id: "metered", text: "Metered (usage-based)" }
3259
3259
  ];
3260
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-2xl", children: [
3261
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
3262
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: isEditMode ? "Edit Price" : "Create Price" }),
3263
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: isEditMode ? "Update the price details. Note: Only nickname and active status can be changed." : "Create a new price for this product" })
3260
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-2xl", children: [
3261
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
3262
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: isEditMode ? "Edit Price" : "Create Price" }),
3263
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: isEditMode ? "Update the price details. Note: Only nickname and active status can be changed." : "Create a new price for this product" })
3264
3264
  ] }),
3265
3265
  isEditMode && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4 flex gap-x-3", children: [
3266
3266
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
@@ -3269,10 +3269,10 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3269
3269
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { children: "Due to Stripe's architecture, only the nickname and active status can be modified after creation. To change amount, currency, or billing interval, create a new price." })
3270
3270
  ] })
3271
3271
  ] }),
3272
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
3272
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
3273
3273
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3274
3274
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3275
- _chunkBYMBRMKSjs.FormInput,
3275
+ _chunk6CYZMNDGjs.FormInput,
3276
3276
  {
3277
3277
  form,
3278
3278
  id: "unitAmount",
@@ -3282,10 +3282,10 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3282
3282
  isRequired: true
3283
3283
  }
3284
3284
  ),
3285
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.FormSelect, { form, id: "currency", name: "Currency", values: currencyOptions, disabled: isEditMode })
3285
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.FormSelect, { form, id: "currency", name: "Currency", values: currencyOptions, disabled: isEditMode })
3286
3286
  ] }),
3287
3287
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3288
- _chunkBYMBRMKSjs.FormSelect,
3288
+ _chunk6CYZMNDGjs.FormSelect,
3289
3289
  {
3290
3290
  form,
3291
3291
  id: "interval",
@@ -3296,7 +3296,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3296
3296
  ),
3297
3297
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3298
3298
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3299
- _chunkBYMBRMKSjs.FormInput,
3299
+ _chunk6CYZMNDGjs.FormInput,
3300
3300
  {
3301
3301
  form,
3302
3302
  id: "intervalCount",
@@ -3307,7 +3307,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3307
3307
  }
3308
3308
  ),
3309
3309
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3310
- _chunkBYMBRMKSjs.FormSelect,
3310
+ _chunk6CYZMNDGjs.FormSelect,
3311
3311
  {
3312
3312
  form,
3313
3313
  id: "usageType",
@@ -3318,7 +3318,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3318
3318
  )
3319
3319
  ] }),
3320
3320
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3321
- _chunkBYMBRMKSjs.FormInput,
3321
+ _chunk6CYZMNDGjs.FormInput,
3322
3322
  {
3323
3323
  form,
3324
3324
  id: "nickname",
@@ -3327,7 +3327,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3327
3327
  }
3328
3328
  ),
3329
3329
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3330
- _chunkBYMBRMKSjs.FormTextarea,
3330
+ _chunk6CYZMNDGjs.FormTextarea,
3331
3331
  {
3332
3332
  form,
3333
3333
  id: "description",
@@ -3336,13 +3336,13 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3336
3336
  className: "min-h-24"
3337
3337
  }
3338
3338
  ),
3339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.FormInput, { form, id: "token", name: "Token (optional)", placeholder: "Enter token value" }),
3339
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.FormInput, { form, id: "token", name: "Token (optional)", placeholder: "Enter token value" }),
3340
3340
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
3341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Label, { children: "Features (optional)" }),
3341
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Label, { children: "Features (optional)" }),
3342
3342
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
3343
3343
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3344
3344
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3345
- _chunkBYMBRMKSjs.Input,
3345
+ _chunk6CYZMNDGjs.Input,
3346
3346
  {
3347
3347
  ...form.register(`features.${index}`),
3348
3348
  placeholder: `Feature ${index + 1}`,
@@ -3350,7 +3350,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3350
3350
  }
3351
3351
  ),
3352
3352
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3353
- _chunkBYMBRMKSjs.Button,
3353
+ _chunk6CYZMNDGjs.Button,
3354
3354
  {
3355
3355
  type: "button",
3356
3356
  variant: "outline",
@@ -3367,7 +3367,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3367
3367
  )
3368
3368
  ] }, index)),
3369
3369
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3370
- _chunkBYMBRMKSjs.Button,
3370
+ _chunk6CYZMNDGjs.Button,
3371
3371
  {
3372
3372
  type: "button",
3373
3373
  variant: "outline",
@@ -3386,7 +3386,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3386
3386
  ] })
3387
3387
  ] }),
3388
3388
  isRecurring && allFeatures.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
3389
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Label, { children: "Platform Features" }),
3389
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Label, { children: "Platform Features" }),
3390
3390
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-md p-4 space-y-2 max-h-48 overflow-y-auto", children: allFeatures.map((feature) => {
3391
3391
  const isCore = feature.isCore;
3392
3392
  const isChecked = form.watch("featureIds").includes(feature.id);
@@ -3428,9 +3428,9 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3428
3428
  ] }, feature.id);
3429
3429
  }) })
3430
3430
  ] }),
3431
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.FormCheckbox, { form, id: "active", name: "Active" }),
3431
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.FormCheckbox, { form, id: "active", name: "Active" }),
3432
3432
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3433
- _chunkBYMBRMKSjs.FormCheckbox,
3433
+ _chunk6CYZMNDGjs.FormCheckbox,
3434
3434
  {
3435
3435
  form,
3436
3436
  id: "isTrial",
@@ -3438,7 +3438,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
3438
3438
  description: "Mark this as the trial subscription plan (only one price should be marked as trial)"
3439
3439
  }
3440
3440
  ),
3441
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CommonEditorButtons, { isEdit: isEditMode, form, disabled: isSubmitting, setOpen: onOpenChange })
3441
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CommonEditorButtons, { isEdit: isEditMode, form, disabled: isSubmitting, setOpen: onOpenChange })
3442
3442
  ] }) })
3443
3443
  ] }) });
3444
3444
  }
@@ -3524,12 +3524,12 @@ function PricesList({ productId, onPricesChange }) {
3524
3524
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
3525
3525
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between mb-4", children: [
3526
3526
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-lg font-semibold", children: "Prices" }),
3527
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3527
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3528
3528
  ] }),
3529
3529
  prices.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-background flex flex-col items-center justify-center gap-y-3 rounded-lg border border-dashed p-8", children: [
3530
3530
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.DollarSign, { className: "text-muted-foreground h-12 w-12" }),
3531
3531
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: "No prices yet. Add a price to enable subscriptions." }),
3532
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3532
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3533
3533
  ] }),
3534
3534
  prices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: prices.map((price) => {
3535
3535
  const isArchiving = archivingPriceId === price.id;
@@ -3538,9 +3538,9 @@ function PricesList({ productId, onPricesChange }) {
3538
3538
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start justify-between mb-3", children: [
3539
3539
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.DollarSign, { className: "h-5 w-5 text-primary" }),
3540
3540
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1", children: [
3541
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "ghost", size: "sm", onClick: () => setEditingPrice(price), className: "h-8 w-8 p-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Edit, { className: "h-4 w-4" }) }),
3541
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "ghost", size: "sm", onClick: () => setEditingPrice(price), className: "h-8 w-8 p-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Edit, { className: "h-4 w-4" }) }),
3542
3542
  price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3543
- _chunkBYMBRMKSjs.Button,
3543
+ _chunk6CYZMNDGjs.Button,
3544
3544
  {
3545
3545
  variant: "ghost",
3546
3546
  size: "sm",
@@ -3550,7 +3550,7 @@ function PricesList({ productId, onPricesChange }) {
3550
3550
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Archive, { className: "h-4 w-4" })
3551
3551
  }
3552
3552
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3553
- _chunkBYMBRMKSjs.Button,
3553
+ _chunk6CYZMNDGjs.Button,
3554
3554
  {
3555
3555
  variant: "ghost",
3556
3556
  size: "sm",
@@ -3601,20 +3601,20 @@ function PricesList({ productId, onPricesChange }) {
3601
3601
  }
3602
3602
  }
3603
3603
  ),
3604
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialog, { open: !!priceToArchive, onOpenChange: (open) => !open && setPriceToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogContent, { children: [
3605
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogHeader, { children: [
3606
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogTitle, { children: "Archive Price" }),
3607
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogDescription, { children: [
3604
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialog, { open: !!priceToArchive, onOpenChange: (open) => !open && setPriceToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogContent, { children: [
3605
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogHeader, { children: [
3606
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogTitle, { children: "Archive Price" }),
3607
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogDescription, { children: [
3608
3608
  "Are you sure you want to archive the price for",
3609
3609
  " ",
3610
3610
  priceToArchive && `${formatCurrency(priceToArchive.unitAmount, priceToArchive.currency)} ${formatInterval2(priceToArchive)}`,
3611
3611
  "? This will prevent new subscriptions but existing ones will continue."
3612
3612
  ] })
3613
3613
  ] }),
3614
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogFooter, { children: [
3615
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogCancel, { disabled: !!archivingPriceId, children: "Cancel" }),
3614
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogFooter, { children: [
3615
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogCancel, { disabled: !!archivingPriceId, children: "Cancel" }),
3616
3616
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3617
- _chunkBYMBRMKSjs.AlertDialogAction,
3617
+ _chunk6CYZMNDGjs.AlertDialogAction,
3618
3618
  {
3619
3619
  onClick: handleArchive,
3620
3620
  disabled: !!archivingPriceId,
@@ -3624,20 +3624,20 @@ function PricesList({ productId, onPricesChange }) {
3624
3624
  )
3625
3625
  ] })
3626
3626
  ] }) }),
3627
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialog, { open: !!priceToReactivate, onOpenChange: (open) => !open && setPriceToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogContent, { children: [
3628
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogHeader, { children: [
3629
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogTitle, { children: "Reactivate Price" }),
3630
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogDescription, { children: [
3627
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialog, { open: !!priceToReactivate, onOpenChange: (open) => !open && setPriceToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogContent, { children: [
3628
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogHeader, { children: [
3629
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogTitle, { children: "Reactivate Price" }),
3630
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogDescription, { children: [
3631
3631
  "Are you sure you want to reactivate the price for",
3632
3632
  " ",
3633
3633
  priceToReactivate && `${formatCurrency(priceToReactivate.unitAmount, priceToReactivate.currency)} ${formatInterval2(priceToReactivate)}`,
3634
3634
  "? This will allow new subscriptions again."
3635
3635
  ] })
3636
3636
  ] }),
3637
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogFooter, { children: [
3638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogCancel, { disabled: !!reactivatingPriceId, children: "Cancel" }),
3637
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogFooter, { children: [
3638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogCancel, { disabled: !!reactivatingPriceId, children: "Cancel" }),
3639
3639
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3640
- _chunkBYMBRMKSjs.AlertDialogAction,
3640
+ _chunk6CYZMNDGjs.AlertDialogAction,
3641
3641
  {
3642
3642
  onClick: handleReactivate,
3643
3643
  disabled: !!reactivatingPriceId,
@@ -3703,15 +3703,15 @@ function ProductEditor({ product, open, onOpenChange, onSuccess }) {
3703
3703
  setIsSubmitting(false);
3704
3704
  }
3705
3705
  }, "onSubmit");
3706
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogContent, { className: "max-w-2xl", children: [
3707
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.DialogHeader, { children: [
3708
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogTitle, { children: product ? "Edit Product" : "Create Product" }),
3709
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.DialogDescription, { children: product ? `Update the details for ${product.name}` : "Create a new product to offer to your customers" })
3706
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogContent, { className: "max-w-2xl", children: [
3707
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.DialogHeader, { children: [
3708
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogTitle, { children: product ? "Edit Product" : "Create Product" }),
3709
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.DialogDescription, { children: product ? `Update the details for ${product.name}` : "Create a new product to offer to your customers" })
3710
3710
  ] }),
3711
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
3712
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.FormInput, { form, id: "name", name: "Product Name", placeholder: "Enter product name", isRequired: true }),
3711
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
3712
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.FormInput, { form, id: "name", name: "Product Name", placeholder: "Enter product name", isRequired: true }),
3713
3713
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3714
- _chunkBYMBRMKSjs.FormTextarea,
3714
+ _chunk6CYZMNDGjs.FormTextarea,
3715
3715
  {
3716
3716
  form,
3717
3717
  id: "description",
@@ -3720,8 +3720,8 @@ function ProductEditor({ product, open, onOpenChange, onSuccess }) {
3720
3720
  className: "min-h-32"
3721
3721
  }
3722
3722
  ),
3723
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.FormCheckbox, { form, id: "active", name: "Active" }),
3724
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.CommonEditorButtons, { isEdit: !!product, form, disabled: isSubmitting, setOpen: onOpenChange })
3723
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.FormCheckbox, { form, id: "active", name: "Active" }),
3724
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.CommonEditorButtons, { isEdit: !!product, form, disabled: isSubmitting, setOpen: onOpenChange })
3725
3725
  ] }) })
3726
3726
  ] }) });
3727
3727
  }
@@ -3788,12 +3788,12 @@ function ProductsList({ products, onProductsChange }) {
3788
3788
  ] })
3789
3789
  ] }),
3790
3790
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3791
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "outline", size: "sm", onClick: () => setEditingProduct(product), children: [
3791
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "outline", size: "sm", onClick: () => setEditingProduct(product), children: [
3792
3792
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Edit, { className: "h-4 w-4 mr-1" }),
3793
3793
  "Edit"
3794
3794
  ] }),
3795
3795
  product.active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3796
- _chunkBYMBRMKSjs.Button,
3796
+ _chunk6CYZMNDGjs.Button,
3797
3797
  {
3798
3798
  variant: "outline",
3799
3799
  size: "sm",
@@ -3805,7 +3805,7 @@ function ProductsList({ products, onProductsChange }) {
3805
3805
  ]
3806
3806
  }
3807
3807
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3808
- _chunkBYMBRMKSjs.Button,
3808
+ _chunk6CYZMNDGjs.Button,
3809
3809
  {
3810
3810
  variant: "outline",
3811
3811
  size: "sm",
@@ -3817,7 +3817,7 @@ function ProductsList({ products, onProductsChange }) {
3817
3817
  ]
3818
3818
  }
3819
3819
  ),
3820
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { variant: "ghost", size: "sm", onClick: () => toggleExpand(product.id), children: isExpanded ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronUp, { className: "h-5 w-5" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown, { className: "h-5 w-5" }) })
3820
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { variant: "ghost", size: "sm", onClick: () => toggleExpand(product.id), children: isExpanded ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronUp, { className: "h-5 w-5" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown, { className: "h-5 w-5" }) })
3821
3821
  ] })
3822
3822
  ] }),
3823
3823
  isExpanded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-t bg-muted/30 p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PricesList, { productId: product.id, onPricesChange: onProductsChange }) })
@@ -3835,19 +3835,19 @@ function ProductsList({ products, onProductsChange }) {
3835
3835
  }
3836
3836
  }
3837
3837
  ),
3838
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialog, { open: !!productToArchive, onOpenChange: (open) => !open && setProductToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogContent, { children: [
3839
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogHeader, { children: [
3840
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogTitle, { children: "Archive Product" }),
3841
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogDescription, { children: [
3838
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialog, { open: !!productToArchive, onOpenChange: (open) => !open && setProductToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogContent, { children: [
3839
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogHeader, { children: [
3840
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogTitle, { children: "Archive Product" }),
3841
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogDescription, { children: [
3842
3842
  'Are you sure you want to archive "',
3843
3843
  _optionalChain([productToArchive, 'optionalAccess', _167 => _167.name]),
3844
3844
  '"? This will deactivate it and it will no longer be available for new subscriptions.'
3845
3845
  ] })
3846
3846
  ] }),
3847
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogFooter, { children: [
3848
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogCancel, { disabled: !!archivingProductId, children: "Cancel" }),
3847
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogFooter, { children: [
3848
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogCancel, { disabled: !!archivingProductId, children: "Cancel" }),
3849
3849
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3850
- _chunkBYMBRMKSjs.AlertDialogAction,
3850
+ _chunk6CYZMNDGjs.AlertDialogAction,
3851
3851
  {
3852
3852
  onClick: handleArchive,
3853
3853
  disabled: !!archivingProductId,
@@ -3857,19 +3857,19 @@ function ProductsList({ products, onProductsChange }) {
3857
3857
  )
3858
3858
  ] })
3859
3859
  ] }) }),
3860
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialog, { open: !!productToReactivate, onOpenChange: (open) => !open && setProductToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogContent, { children: [
3861
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogHeader, { children: [
3862
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogTitle, { children: "Reactivate Product" }),
3863
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogDescription, { children: [
3860
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialog, { open: !!productToReactivate, onOpenChange: (open) => !open && setProductToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogContent, { children: [
3861
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogHeader, { children: [
3862
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogTitle, { children: "Reactivate Product" }),
3863
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogDescription, { children: [
3864
3864
  'Are you sure you want to reactivate "',
3865
3865
  _optionalChain([productToReactivate, 'optionalAccess', _168 => _168.name]),
3866
3866
  '"? This will make it available for new subscriptions again.'
3867
3867
  ] })
3868
3868
  ] }),
3869
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBYMBRMKSjs.AlertDialogFooter, { children: [
3870
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.AlertDialogCancel, { disabled: !!reactivatingProductId, children: "Cancel" }),
3869
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6CYZMNDGjs.AlertDialogFooter, { children: [
3870
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.AlertDialogCancel, { disabled: !!reactivatingProductId, children: "Cancel" }),
3871
3871
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3872
- _chunkBYMBRMKSjs.AlertDialogAction,
3872
+ _chunk6CYZMNDGjs.AlertDialogAction,
3873
3873
  {
3874
3874
  onClick: handleReactivate,
3875
3875
  disabled: !!reactivatingProductId,
@@ -3886,7 +3886,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
3886
3886
  // src/features/billing/stripe-product/components/containers/ProductsAdminContainer.tsx
3887
3887
 
3888
3888
  function ProductsAdminContainer() {
3889
- const { hasRole } = _chunkBYMBRMKSjs.useCurrentUserContext.call(void 0, );
3889
+ const { hasRole } = _chunk6CYZMNDGjs.useCurrentUserContext.call(void 0, );
3890
3890
  const [products, setProducts] = _react.useState.call(void 0, []);
3891
3891
  const [loading, setLoading] = _react.useState.call(void 0, true);
3892
3892
  const [showCreateProduct, setShowCreateProduct] = _react.useState.call(void 0, false);
@@ -3916,14 +3916,14 @@ function ProductsAdminContainer() {
3916
3916
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Package, { className: "h-8 w-8" }),
3917
3917
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Product & Price Management" })
3918
3918
  ] }),
3919
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Product" })
3919
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Product" })
3920
3920
  ] }),
3921
3921
  products.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/50 flex flex-col items-center justify-center gap-y-4 rounded-lg border-2 border-dashed p-12", children: [
3922
3922
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Package, { className: "text-muted-foreground h-16 w-16" }),
3923
3923
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
3924
3924
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-xl font-semibold", children: "No products yet" }),
3925
3925
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-4", children: "Create your first product to start offering subscriptions to your customers." }),
3926
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBYMBRMKSjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Your First Product" })
3926
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6CYZMNDGjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Your First Product" })
3927
3927
  ] })
3928
3928
  ] }),
3929
3929
  products.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { products, onProductsChange: loadProducts }),