@carlonicora/nextjs-jsonapi 1.24.1 → 1.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,7 +51,7 @@
51
51
 
52
52
 
53
53
 
54
- var _chunkILKUML3Zjs = require('../chunk-ILKUML3Z.js');
54
+ var _chunkHIKTQMCRjs = require('../chunk-HIKTQMCR.js');
55
55
 
56
56
 
57
57
 
@@ -124,41 +124,41 @@ function SubscriptionSummaryCard({
124
124
  onManageClick
125
125
  }) {
126
126
  if (loading) {
127
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
128
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
129
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
127
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
128
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
129
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
130
130
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
131
131
  ] }),
132
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { children: [
133
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-6 w-32 mb-2" }),
134
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-24 mb-1" }),
135
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-40" })
132
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: [
133
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-6 w-32 mb-2" }),
134
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-24 mb-1" }),
135
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-40" })
136
136
  ] })
137
137
  ] });
138
138
  }
139
139
  if (error) {
140
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
141
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
142
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
140
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
141
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
142
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
143
143
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
144
144
  ] }),
145
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
145
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
146
146
  ] });
147
147
  }
148
148
  const activeSubscriptions = subscriptions.filter(
149
149
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */
150
150
  );
151
151
  const primarySubscription = activeSubscriptions[0];
152
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
153
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
154
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
152
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
153
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
154
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Subscriptions" }),
155
155
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
156
156
  ] }),
157
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
157
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: subscriptions.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
158
158
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No active plan" }),
159
159
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Subscribe to get started" }),
160
160
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
161
- _chunkILKUML3Zjs.Button,
161
+ _chunkHIKTQMCRjs.Button,
162
162
  {
163
163
  variant: "outline",
164
164
  size: "sm",
@@ -176,7 +176,7 @@ function SubscriptionSummaryCard({
176
176
  ] }) : primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
177
177
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
178
178
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription) }),
179
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Badge, { variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status), children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status })
179
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Badge, { variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status), children: primarySubscription.cancelAtPeriodEnd ? "Canceling" : primarySubscription.status })
180
180
  ] }),
181
181
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm text-muted-foreground", children: [
182
182
  formatPrice(_optionalChain([primarySubscription, 'access', _10 => _10.price, 'optionalAccess', _11 => _11.unitAmount]), _optionalChain([primarySubscription, 'access', _12 => _12.price, 'optionalAccess', _13 => _13.currency])),
@@ -220,36 +220,36 @@ function PaymentMethodSummaryCard({
220
220
  onManageClick
221
221
  }) {
222
222
  if (loading) {
223
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
224
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
225
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
223
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
224
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.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.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { children: [
229
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-6 w-32 mb-2" }),
230
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-24" })
228
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: [
229
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-6 w-32 mb-2" }),
230
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-24" })
231
231
  ] })
232
232
  ] });
233
233
  }
234
234
  if (error) {
235
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
236
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
237
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
235
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
236
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
237
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
238
238
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
239
239
  ] }),
240
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
240
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
241
241
  ] });
242
242
  }
243
243
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
244
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
245
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
246
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
244
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
245
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
246
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Payment Method" }),
247
247
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
248
248
  ] }),
249
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
249
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
250
250
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No payment method" }),
251
251
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Add a card to enable subscriptions" }),
252
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: (e) => {
252
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: (e) => {
253
253
  e.stopPropagation();
254
254
  onManageClick();
255
255
  }, children: [
@@ -314,52 +314,52 @@ function CustomerInfoCard({ customer, loading, error }) {
314
314
  }
315
315
  }, "handlePortalClick");
316
316
  if (loading) {
317
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
318
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
319
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
317
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
318
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
319
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
320
320
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
321
321
  ] }),
322
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { children: [
323
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-6 w-32 mb-2" }),
324
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-48 mb-1" }),
325
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-24" })
322
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: [
323
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-6 w-32 mb-2" }),
324
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-48 mb-1" }),
325
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-24" })
326
326
  ] })
327
327
  ] });
328
328
  }
329
329
  if (error) {
330
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
331
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
332
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
330
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
331
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
332
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
333
333
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
334
334
  ] }),
335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
336
336
  ] });
337
337
  }
338
338
  if (!customer) {
339
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
340
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
339
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
340
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
341
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
342
342
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
343
343
  ] }),
344
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { children: [
344
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: [
345
345
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "Not set up" }),
346
346
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Billing account will be created when you subscribe" })
347
347
  ] })
348
348
  ] });
349
349
  }
350
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
351
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
352
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
350
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
351
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
352
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Billing Account" }),
353
353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
354
354
  ] }),
355
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
355
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
356
356
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
357
357
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
358
358
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
359
359
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: "Credit Balance: " }),
360
360
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-green-600" : "text-destructive", children: formatBalance(customer.balance, customer.currency) })
361
361
  ] }),
362
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
362
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
363
363
  portalLoading ? "Loading..." : "Manage in Stripe Portal",
364
364
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ml-1" })
365
365
  ] })
@@ -403,42 +403,42 @@ function formatAmount(amount, currency) {
403
403
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
404
404
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
405
405
  if (loading) {
406
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
407
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
408
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
406
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
407
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
408
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
409
409
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
410
410
  ] }),
411
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { children: [
412
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-6 w-24 mb-2" }),
413
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-32 mb-1" }),
414
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-20" })
411
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: [
412
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-6 w-24 mb-2" }),
413
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-32 mb-1" }),
414
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-20" })
415
415
  ] })
416
416
  ] });
417
417
  }
418
418
  if (error) {
419
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
420
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
421
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
419
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
420
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
421
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
422
422
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
423
423
  ] }),
424
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
424
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
425
425
  ] });
426
426
  }
427
427
  const latestInvoice = invoices[0];
428
428
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
429
429
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
430
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
431
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
430
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
431
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
432
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Recent Invoices" }),
433
433
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
434
434
  ] }),
435
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
435
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
436
436
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No invoices yet" }),
437
437
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "Invoices will appear after your first billing cycle" })
438
438
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
439
439
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
440
440
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency) }),
441
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
441
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: latestInvoice.status })
442
442
  ] }),
443
443
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || `Invoice from ${formatDate2(latestInvoice.periodStart)}` }),
444
444
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
@@ -478,24 +478,24 @@ function BillingUsageSummaryCard({
478
478
  onViewDetailsClick
479
479
  }) {
480
480
  if (loading) {
481
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
482
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
483
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
481
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
482
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
483
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
484
484
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
485
485
  ] }),
486
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { children: [
487
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-6 w-24 mb-2" }),
488
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-32" })
486
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: [
487
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-6 w-24 mb-2" }),
488
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-32" })
489
489
  ] })
490
490
  ] });
491
491
  }
492
492
  if (error) {
493
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
494
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
493
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
494
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
495
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
496
496
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
497
497
  ] }),
498
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
498
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-destructive", children: error }) })
499
499
  ] });
500
500
  }
501
501
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -503,12 +503,12 @@ function BillingUsageSummaryCard({
503
503
  }, 0);
504
504
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _23 => _23[m.id], 'optionalAccess', _24 => _24.aggregatedValue]));
505
505
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
506
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
507
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
508
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
506
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
507
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
508
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { className: "text-sm font-medium", children: "Usage This Month" }),
509
509
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
510
510
  ] }),
511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
511
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
512
512
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: "No meters" }),
513
513
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: "No usage meters are configured" })
514
514
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -612,10 +612,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
612
612
  setIsSubmitting(false);
613
613
  }
614
614
  }, "handleSubmit");
615
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-md", children: [
616
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
617
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: "Add Payment Method" }),
618
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
615
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-md", children: [
616
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
617
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: "Add Payment Method" }),
618
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: "Add a new payment method to your account. Your card information is securely processed by Stripe." })
619
619
  ] }),
620
620
  loading && /* @__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..." }) }),
621
621
  !loading && setupIntent && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
@@ -640,22 +640,22 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
640
640
  ) }),
641
641
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
642
642
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
643
- _chunkILKUML3Zjs.Checkbox,
643
+ _chunkHIKTQMCRjs.Checkbox,
644
644
  {
645
645
  id: "setAsDefault",
646
646
  checked: setAsDefault,
647
647
  onCheckedChange: (checked) => setSetAsDefault(!!checked)
648
648
  }
649
649
  ),
650
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Label, { htmlFor: "setAsDefault", className: "text-sm font-normal", children: "Set as default payment method" })
650
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Label, { htmlFor: "setAsDefault", className: "text-sm font-normal", children: "Set as default payment method" })
651
651
  ] }),
652
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDescription, { children: error }) }),
652
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDescription, { children: error }) }),
653
653
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
654
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Cancel" }),
655
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { type: "submit", disabled: !stripe || isSubmitting, children: isSubmitting ? "Processing..." : "Add Card" })
654
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Cancel" }),
655
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { type: "submit", disabled: !stripe || isSubmitting, children: isSubmitting ? "Processing..." : "Add Card" })
656
656
  ] })
657
657
  ] }),
658
- !loading && !setupIntent && error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDescription, { children: error }) })
658
+ !loading && !setupIntent && error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDescription, { children: error }) })
659
659
  ] }) });
660
660
  }
661
661
  _chunk7QVYU63Ejs.__name.call(void 0, PaymentMethodEditor, "PaymentMethodEditor");
@@ -714,22 +714,22 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
714
714
  }
715
715
  }, "handleRemove");
716
716
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
717
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { className: "relative", children: [
718
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Badge, { className: "absolute right-2 top-2 bg-green-100 text-green-800 hover:bg-green-100", children: "Default" }),
719
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
717
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { className: "relative", children: [
718
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Badge, { className: "absolute right-2 top-2 bg-green-100 text-green-800 hover:bg-green-100", children: "Default" }),
719
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
720
720
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
721
721
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
722
722
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
723
723
  ] }),
724
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DropdownMenu, { children: [
725
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, variant: "ghost", size: "sm", disabled: loading, className: "h-8 w-8 p-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" }) }) }),
726
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DropdownMenuContent, { align: "end", children: [
727
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
728
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DropdownMenuItem, { onClick: () => setShowRemoveDialog(true), disabled: loading, className: "text-red-600", children: "Remove" })
724
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DropdownMenu, { children: [
725
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, variant: "ghost", size: "sm", disabled: loading, className: "h-8 w-8 p-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" }) }) }),
726
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DropdownMenuContent, { align: "end", children: [
727
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: "Set as Default" }),
728
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DropdownMenuItem, { onClick: () => setShowRemoveDialog(true), disabled: loading, className: "text-red-600", children: "Remove" })
729
729
  ] })
730
730
  ] })
731
731
  ] }),
732
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
732
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
733
733
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
734
734
  "\u2022\u2022\u2022\u2022 ",
735
735
  last4
@@ -742,17 +742,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
742
742
  ] })
743
743
  ] }) })
744
744
  ] }),
745
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogContent, { children: [
746
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogHeader, { children: [
747
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogTitle, { children: "Remove Payment Method" }),
748
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogDescription, { children: [
745
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogContent, { children: [
746
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogHeader, { children: [
747
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogTitle, { children: "Remove Payment Method" }),
748
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogDescription, { children: [
749
749
  "Are you sure you want to remove this payment method? This action cannot be undone.",
750
750
  isDefault && " This is your default payment method."
751
751
  ] })
752
752
  ] }),
753
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogFooter, { children: [
754
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
755
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
753
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogFooter, { children: [
754
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogCancel, { disabled: loading, children: "Cancel" }),
755
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? "Removing..." : "Remove" })
756
756
  ] })
757
757
  ] }) })
758
758
  ] });
@@ -795,14 +795,14 @@ function PaymentMethodsContainer() {
795
795
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
796
796
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Payment Methods" })
797
797
  ] }),
798
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
798
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Payment Method" })
799
799
  ] }),
800
800
  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: [
801
801
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
802
802
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
803
803
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-xl font-semibold", children: "No payment methods" }),
804
804
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: "Add a payment method to enable subscriptions and secure checkout." }),
805
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
805
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: "Add Your First Card" })
806
806
  ] })
807
807
  ] }),
808
808
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -926,13 +926,13 @@ function InvoiceDetails({ invoice, open, onOpenChange, onInvoiceChange }) {
926
926
  return invoice.stripeInvoiceId.slice(-8);
927
927
  }, "getInvoiceNumber");
928
928
  const productName = _optionalChain([invoice, 'access', _35 => _35.subscription, 'optionalAccess', _36 => _36.price, 'optionalAccess', _37 => _37.product, 'optionalAccess', _38 => _38.name]) || "Subscription";
929
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-2xl", children: [
930
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
931
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: [
929
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-2xl", children: [
930
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
931
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: [
932
932
  "Invoice ",
933
933
  getInvoiceNumber()
934
934
  ] }),
935
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
935
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: formatDate3(invoice.periodStart) })
936
936
  ] }),
937
937
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
938
938
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -997,15 +997,15 @@ function InvoiceDetails({ invoice, open, onOpenChange, onInvoiceChange }) {
997
997
  ] })
998
998
  ] }),
999
999
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1000
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1000
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1001
1001
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "mr-2 h-4 w-4" }),
1002
1002
  "Download PDF"
1003
1003
  ] }),
1004
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1004
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1005
1005
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "mr-2 h-4 w-4" }),
1006
1006
  "Retry Payment"
1007
1007
  ] }),
1008
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1008
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1009
1009
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "mr-2 h-4 w-4" }),
1010
1010
  "View in Stripe"
1011
1011
  ] })
@@ -1029,30 +1029,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1029
1029
  return invoice.stripeInvoiceId.slice(-8);
1030
1030
  }, "getInvoiceNumber");
1031
1031
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1032
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Table, { children: [
1033
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.TableRow, { children: [
1034
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Invoice #" }),
1035
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Date" }),
1036
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Status" }),
1037
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { className: "text-right", children: "Amount" }),
1038
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Period" })
1032
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Table, { children: [
1033
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.TableRow, { children: [
1034
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Invoice #" }),
1035
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Date" }),
1036
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Status" }),
1037
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { className: "text-right", children: "Amount" }),
1038
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Period" })
1039
1039
  ] }) }),
1040
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableBody, { children: invoices.map((invoice) => {
1040
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableBody, { children: invoices.map((invoice) => {
1041
1041
  const invoiceNumber = getInvoiceNumber(invoice);
1042
1042
  const date = formatDate3(invoice.periodStart);
1043
1043
  const amount = formatCurrency(invoice.total, invoice.currency);
1044
1044
  const period = `${formatDate3(invoice.periodStart)} - ${formatDate3(invoice.periodEnd)}`;
1045
1045
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1046
- _chunkILKUML3Zjs.TableRow,
1046
+ _chunkHIKTQMCRjs.TableRow,
1047
1047
  {
1048
1048
  onClick: () => handleRowClick(invoice),
1049
1049
  className: "cursor-pointer hover:bg-muted/50",
1050
1050
  children: [
1051
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1052
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-muted-foreground text-sm", children: date }),
1053
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1054
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-right font-medium", children: amount }),
1055
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-muted-foreground text-sm", children: period })
1051
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1052
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-muted-foreground text-sm", children: date }),
1053
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1054
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-right font-medium", children: amount }),
1055
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-muted-foreground text-sm", children: period })
1056
1056
  ]
1057
1057
  },
1058
1058
  invoice.id
@@ -1101,12 +1101,12 @@ function InvoicesContainer() {
1101
1101
  setStatusFilter(value);
1102
1102
  }, "handleFilterChange");
1103
1103
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1104
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.TabsList, { children: [
1105
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TabsTrigger, { value: "all", children: "All" }),
1106
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1107
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1108
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1109
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1104
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.TabsList, { children: [
1105
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TabsTrigger, { value: "all", children: "All" }),
1106
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TabsTrigger, { value: "paid" /* PAID */, children: "Paid" }),
1107
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TabsTrigger, { value: "open" /* OPEN */, children: "Open" }),
1108
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TabsTrigger, { value: "void" /* VOID */, children: "Void" }),
1109
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: "Uncollectible" })
1110
1110
  ] }) }),
1111
1111
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: "Loading invoices..." }),
1112
1112
  !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: [
@@ -1228,20 +1228,20 @@ function CancelSubscriptionDialog({
1228
1228
  }
1229
1229
  }, "onSubmit");
1230
1230
  const periodEndDate = formatDate3(subscription.currentPeriodEnd);
1231
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-md", children: [
1232
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
1233
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: "Cancel Subscription" }),
1234
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1231
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-md", children: [
1232
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
1233
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: "Cancel Subscription" }),
1234
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: "Are you sure you want to cancel this subscription? This action cannot be undone." })
1235
1235
  ] }),
1236
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1237
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormCheckbox, { form, id: "cancelImmediately", name: "Cancel Immediately" }),
1236
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1237
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormCheckbox, { form, id: "cancelImmediately", name: "Cancel Immediately" }),
1238
1238
  cancelImmediately ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-800", children: "Your subscription will be canceled immediately and you will lose access right away." }) : /* @__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: [
1239
1239
  "Your subscription will remain active until ",
1240
1240
  periodEndDate,
1241
1241
  ". You can continue using the service until then."
1242
1242
  ] }),
1243
1243
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1244
- _chunkILKUML3Zjs.FormTextarea,
1244
+ _chunkHIKTQMCRjs.FormTextarea,
1245
1245
  {
1246
1246
  form,
1247
1247
  id: "reason",
@@ -1251,8 +1251,8 @@ function CancelSubscriptionDialog({
1251
1251
  }
1252
1252
  ),
1253
1253
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1254
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1255
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1254
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: "Keep Subscription" }),
1255
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? "Canceling..." : "Confirm Cancellation" })
1256
1256
  ] })
1257
1257
  ] }) })
1258
1258
  ] }) });
@@ -1284,7 +1284,7 @@ function PricingCard({ price, isCurrentPlan = false, isSelected = false, isDisab
1284
1284
  }
1285
1285
  }, "handleClick");
1286
1286
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1287
- _chunkILKUML3Zjs.Card,
1287
+ _chunkHIKTQMCRjs.Card,
1288
1288
  {
1289
1289
  role: "radio",
1290
1290
  "aria-checked": isSelected,
@@ -1302,9 +1302,9 @@ function PricingCard({ price, isCurrentPlan = false, isSelected = false, isDisab
1302
1302
  isLoading && "pointer-events-none"
1303
1303
  ),
1304
1304
  children: [
1305
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Badge, { variant: "secondary", className: "absolute top-2 right-2", children: "Current" }),
1306
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-lg", children: description }) }),
1307
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { className: "pb-4 grow", children: [
1305
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Badge, { variant: "secondary", className: "absolute top-2 right-2", children: "Current" }),
1306
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-lg", children: description }) }),
1307
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { className: "pb-4 grow", children: [
1308
1308
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1309
1309
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1310
1310
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ml-1", children: interval })
@@ -1314,8 +1314,8 @@ function PricingCard({ price, isCurrentPlan = false, isSelected = false, isDisab
1314
1314
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1315
1315
  ] }, index)) })
1316
1316
  ] }),
1317
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1318
- _chunkILKUML3Zjs.Button,
1317
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1318
+ _chunkHIKTQMCRjs.Button,
1319
1319
  {
1320
1320
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1321
1321
  className: "w-full",
@@ -1369,26 +1369,26 @@ function PricingCardsGrid({
1369
1369
  _chunk7QVYU63Ejs.__name.call(void 0, PricingCardsGrid, "PricingCardsGrid");
1370
1370
  function PricingCardsGridSkeleton() {
1371
1371
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-8", children: [1, 2].map((productIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1372
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-6 w-32" }),
1373
- /* @__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, _chunkILKUML3Zjs.Card, { className: "animate-pulse", children: [
1374
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-5 w-24" }) }),
1375
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { className: "pb-4", children: [
1372
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-6 w-32" }),
1373
+ /* @__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, _chunkHIKTQMCRjs.Card, { className: "animate-pulse", children: [
1374
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-5 w-24" }) }),
1375
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { className: "pb-4", children: [
1376
1376
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1377
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-9 w-20 inline-block" }),
1378
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-12 inline-block ml-2" })
1377
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-9 w-20 inline-block" }),
1378
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-12 inline-block ml-2" })
1379
1379
  ] }),
1380
1380
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1381
1381
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
1382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-4 rounded-full" }),
1383
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-32" })
1382
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-4 rounded-full" }),
1383
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-32" })
1384
1384
  ] }),
1385
1385
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
1386
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-4 rounded-full" }),
1387
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-4 w-28" })
1386
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-4 rounded-full" }),
1387
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-4 w-28" })
1388
1388
  ] })
1389
1389
  ] })
1390
1390
  ] }),
1391
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Skeleton, { className: "h-9 w-full" }) })
1391
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Skeleton, { className: "h-9 w-full" }) })
1392
1392
  ] }, cardIndex)) })
1393
1393
  ] }, productIndex)) });
1394
1394
  }
@@ -1577,16 +1577,16 @@ function SubscriptionEditor({
1577
1577
  setSelectedPriceId(null);
1578
1578
  setProrationPreview(null);
1579
1579
  }, "handleCancel");
1580
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-4xl max-h-[90vh] overflow-y-auto", children: [
1581
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
1582
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: subscription ? "Change Plan" : "Subscribe to a Plan" }),
1583
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: subscription ? "Select a new plan to switch to. You'll see a proration preview before confirming." : "Choose a plan to start your subscription." })
1580
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-4xl max-h-[90vh] overflow-y-auto", children: [
1581
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
1582
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: subscription ? "Change Plan" : "Subscribe to a Plan" }),
1583
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: subscription ? "Select a new plan to switch to. You'll see a proration preview before confirming." : "Choose a plan to start your subscription." })
1584
1584
  ] }),
1585
- loadingPaymentMethods && !subscription ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: "Checking payment methods..." }) }) : !hasPaymentMethod && !subscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Alert, { variant: "destructive", children: [
1586
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertTitle, { children: "Payment Method Required" }),
1587
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDescription, { className: "mt-2", children: [
1585
+ loadingPaymentMethods && !subscription ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: "Checking payment methods..." }) }) : !hasPaymentMethod && !subscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Alert, { variant: "destructive", children: [
1586
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertTitle, { children: "Payment Method Required" }),
1587
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDescription, { className: "mt-2", children: [
1588
1588
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4", children: paymentRequiredError ? "Your subscription could not be created because no payment method is on file." : "You need to add a payment method before you can subscribe to a plan." }),
1589
- onAddPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: onAddPaymentMethod, variant: "outline", children: "Add Payment Method" })
1589
+ onAddPaymentMethod && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: onAddPaymentMethod, variant: "outline", children: "Add Payment Method" })
1590
1590
  ] })
1591
1591
  ] }) : paymentConfirmationState === "confirming" || isConfirming ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
1592
1592
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-primary" }),
@@ -1600,12 +1600,12 @@ function SubscriptionEditor({
1600
1600
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium text-green-600", children: "Payment successful!" }),
1601
1601
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: "Your subscription is now active." })
1602
1602
  ] })
1603
- ] }) : paymentConfirmationState === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Alert, { variant: "destructive", children: [
1604
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertTitle, { children: "Payment Failed" }),
1605
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDescription, { className: "mt-2", children: [
1603
+ ] }) : paymentConfirmationState === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Alert, { variant: "destructive", children: [
1604
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertTitle, { children: "Payment Failed" }),
1605
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDescription, { className: "mt-2", children: [
1606
1606
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4", children: paymentError || "We couldn't process your payment. Please try again." }),
1607
1607
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1608
- _chunkILKUML3Zjs.Button,
1608
+ _chunkHIKTQMCRjs.Button,
1609
1609
  {
1610
1610
  onClick: () => {
1611
1611
  setPaymentConfirmationState("idle");
@@ -1634,8 +1634,8 @@ function SubscriptionEditor({
1634
1634
  isEditMode && prorationPreview && !loadingProration && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1635
1635
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProrationPreview, { preview: prorationPreview }),
1636
1636
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3", children: [
1637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", onClick: handleCancel, disabled: !!loadingPriceId, children: "Cancel" }),
1638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: handleConfirmPlanChange, disabled: !!loadingPriceId, children: loadingPriceId ? "Processing..." : "Confirm Plan Change" })
1637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", onClick: handleCancel, disabled: !!loadingPriceId, children: "Cancel" }),
1638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: handleConfirmPlanChange, disabled: !!loadingPriceId, children: loadingPriceId ? "Processing..." : "Confirm Plan Change" })
1639
1639
  ] })
1640
1640
  ] })
1641
1641
  ] })
@@ -1764,10 +1764,10 @@ function SubscriptionDetails({
1764
1764
  const canResume = subscription.status === "paused" /* PAUSED */;
1765
1765
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1766
1766
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1767
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-2xl", children: [
1768
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
1769
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: "Subscription Details" }),
1770
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: "View and manage your subscription" })
1767
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-2xl", children: [
1768
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
1769
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: "Subscription Details" }),
1770
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: "View and manage your subscription" })
1771
1771
  ] }),
1772
1772
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1773
1773
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1803,11 +1803,11 @@ function SubscriptionDetails({
1803
1803
  "."
1804
1804
  ] }) }),
1805
1805
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1806
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "default", onClick: () => setShowEdit(true), children: "Change Plan" }),
1807
- canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1808
- canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1809
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1810
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1806
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "default", onClick: () => setShowEdit(true), children: "Change Plan" }),
1807
+ canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? "Pausing..." : "Pause" }),
1808
+ canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? "Resuming..." : "Resume" }),
1809
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: "Cancel" }),
1810
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: "Manage via Portal" })
1811
1811
  ] })
1812
1812
  ] })
1813
1813
  ] }) }),
@@ -1866,27 +1866,27 @@ function SubscriptionsList({ subscriptions, onSubscriptionsChange }) {
1866
1866
  setSelectedSub(subscription);
1867
1867
  }, "handleRowClick");
1868
1868
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1869
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Table, { children: [
1870
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.TableRow, { children: [
1871
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Status" }),
1872
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Plan" }),
1873
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Period" }),
1874
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { className: "text-right", children: "Amount" })
1869
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Table, { children: [
1870
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.TableRow, { children: [
1871
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Status" }),
1872
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Plan" }),
1873
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Period" }),
1874
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { className: "text-right", children: "Amount" })
1875
1875
  ] }) }),
1876
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableBody, { children: subscriptions.map((subscription) => {
1876
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableBody, { children: subscriptions.map((subscription) => {
1877
1877
  const price = subscription.price;
1878
1878
  const amount = _optionalChain([price, 'optionalAccess', _56 => _56.unitAmount]) ? formatCurrency(price.unitAmount, price.currency) : "N/A";
1879
1879
  const period = `${formatDate3(subscription.currentPeriodStart)} - ${formatDate3(subscription.currentPeriodEnd)}`;
1880
1880
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1881
- _chunkILKUML3Zjs.TableRow,
1881
+ _chunkHIKTQMCRjs.TableRow,
1882
1882
  {
1883
1883
  onClick: () => handleRowClick(subscription),
1884
1884
  className: "cursor-pointer hover:bg-muted/50",
1885
1885
  children: [
1886
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubscriptionStatusBadge, { status: subscription.status, cancelAtPeriodEnd: subscription.cancelAtPeriodEnd }) }),
1887
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1888
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1889
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-right font-medium", children: amount })
1886
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubscriptionStatusBadge, { status: subscription.status, cancelAtPeriodEnd: subscription.cancelAtPeriodEnd }) }),
1887
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "font-medium", children: formatPlanName3(price) }),
1888
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1889
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-right font-medium", children: amount })
1890
1890
  ]
1891
1891
  },
1892
1892
  subscription.id
@@ -2041,7 +2041,7 @@ function SubscriptionsContainer() {
2041
2041
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
2042
2042
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Subscriptions" })
2043
2043
  ] }),
2044
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: () => setShowCreateSubscription(true), children: "Subscribe to a Plan" })
2044
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: () => setShowCreateSubscription(true), children: "Subscribe to a Plan" })
2045
2045
  ] }),
2046
2046
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
2047
2047
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
@@ -2059,12 +2059,12 @@ function SubscriptionsContainer() {
2059
2059
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: "Your subscription is now active." })
2060
2060
  ] })
2061
2061
  ] }),
2062
- paymentConfirmationState === "error" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Alert, { variant: "destructive", children: [
2063
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertTitle, { children: "Payment Failed" }),
2064
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDescription, { className: "mt-2", children: [
2062
+ paymentConfirmationState === "error" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Alert, { variant: "destructive", children: [
2063
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertTitle, { children: "Payment Failed" }),
2064
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDescription, { className: "mt-2", children: [
2065
2065
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4", children: paymentError || "We couldn't process your payment. Please try again." }),
2066
2066
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2067
- _chunkILKUML3Zjs.Button,
2067
+ _chunkHIKTQMCRjs.Button,
2068
2068
  {
2069
2069
  onClick: () => {
2070
2070
  setPaymentConfirmationState("idle");
@@ -2158,15 +2158,15 @@ function UsageSummaryCard({ meter, summary }) {
2158
2158
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2159
2159
  const displayName = meter.displayName || meter.eventName;
2160
2160
  const hasLimit = limit !== null && limit !== void 0;
2161
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
2162
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2161
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
2162
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2163
2163
  /* @__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" }) }),
2164
2164
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2165
2165
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold", children: displayName }),
2166
2166
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-gray-500", children: meter.id })
2167
2167
  ] })
2168
2168
  ] }),
2169
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2169
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2170
2170
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2171
2171
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString() }),
2172
2172
  hasLimit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm text-gray-500", children: [
@@ -2294,21 +2294,21 @@ function UsageHistoryTable({ usageRecords }) {
2294
2294
  }
2295
2295
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2296
2296
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold", children: "Usage History" }),
2297
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Table, { children: [
2298
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.TableRow, { children: [
2299
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Date & Time" }),
2300
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Meter Event" }),
2301
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { className: "text-right", children: "Quantity" }),
2302
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableHead, { children: "Event ID" })
2297
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Table, { children: [
2298
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.TableRow, { children: [
2299
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Date & Time" }),
2300
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Meter Event" }),
2301
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { className: "text-right", children: "Quantity" }),
2302
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableHead, { children: "Event ID" })
2303
2303
  ] }) }),
2304
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableBody, { children: usageRecords.map((record) => {
2304
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableBody, { children: usageRecords.map((record) => {
2305
2305
  const dateTime = formatDateTime(record.timestamp);
2306
2306
  const quantity = record.quantity.toLocaleString();
2307
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.TableRow, { children: [
2308
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "font-medium", children: dateTime }),
2309
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2310
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-right font-medium", children: quantity }),
2311
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.TableCell, { className: "text-muted-foreground text-sm font-mono", children: record.stripeEventId })
2307
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.TableRow, { children: [
2308
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "font-medium", children: dateTime }),
2309
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2310
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-right font-medium", children: quantity }),
2311
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.TableCell, { className: "text-muted-foreground text-sm font-mono", children: record.stripeEventId })
2312
2312
  ] }, record.id);
2313
2313
  }) })
2314
2314
  ] }) })
@@ -2325,8 +2325,8 @@ function BillingDetailModal({
2325
2325
  children,
2326
2326
  className
2327
2327
  }) {
2328
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: title }) }),
2328
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2329
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: title }) }),
2330
2330
  children
2331
2331
  ] }) });
2332
2332
  }
@@ -2343,7 +2343,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2343
2343
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-semibold text-red-900", children: "Payment Failed" }),
2344
2344
  /* @__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." })
2345
2345
  ] }),
2346
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "border-red-300 text-red-700", children: "Update Payment Method" })
2346
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "border-red-300 text-red-700", children: "Update Payment Method" })
2347
2347
  ] });
2348
2348
  }
2349
2349
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -2363,7 +2363,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2363
2363
  ". Add a payment method to continue your subscription."
2364
2364
  ] })
2365
2365
  ] }),
2366
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "border-yellow-300 text-yellow-700", children: "Add Payment Method" })
2366
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "border-yellow-300 text-yellow-700", children: "Add Payment Method" })
2367
2367
  ] });
2368
2368
  }
2369
2369
  }
@@ -2563,18 +2563,18 @@ function BillingDashboardContainer() {
2563
2563
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
2564
2564
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Billing" })
2565
2565
  ] }),
2566
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.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" }) }) }),
2567
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Card, { children: [
2568
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.CardHeader, { className: "text-center", children: [
2566
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.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" }) }) }),
2567
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Card, { children: [
2568
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.CardHeader, { className: "text-center", children: [
2569
2569
  /* @__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" }) }),
2570
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardTitle, { children: "Set Up Billing" }),
2571
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2570
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardTitle, { children: "Set Up Billing" }),
2571
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardDescription, { children: "Your company doesn't have a billing account yet. Set one up to manage subscriptions, payment methods, and view invoices." })
2572
2572
  ] }),
2573
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2573
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2574
2574
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
2575
2575
  "Setting up..."
2576
2576
  ] }) : "Set Up Billing Account" }) }),
2577
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-sm text-destructive", children: errors.customer }) })
2577
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-sm text-destructive", children: errors.customer }) })
2578
2578
  ] }),
2579
2579
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2580
2580
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2814,10 +2814,10 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2814
2814
  { id: "licensed", text: "Licensed (per unit)" },
2815
2815
  { id: "metered", text: "Metered (usage-based)" }
2816
2816
  ];
2817
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-2xl", children: [
2818
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
2819
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: isEditMode ? "Edit Price" : "Create Price" }),
2820
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: isEditMode ? "Update the price details. Note: Only nickname and active status can be changed." : "Create a new price for this product" })
2817
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-2xl", children: [
2818
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
2819
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: isEditMode ? "Edit Price" : "Create Price" }),
2820
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: isEditMode ? "Update the price details. Note: Only nickname and active status can be changed." : "Create a new price for this product" })
2821
2821
  ] }),
2822
2822
  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: [
2823
2823
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-5 w-5 text-blue-600 flex-shrink-0 mt-0.5" }),
@@ -2826,10 +2826,10 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2826
2826
  /* @__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." })
2827
2827
  ] })
2828
2828
  ] }),
2829
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
2829
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
2830
2830
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
2831
2831
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2832
- _chunkILKUML3Zjs.FormInput,
2832
+ _chunkHIKTQMCRjs.FormInput,
2833
2833
  {
2834
2834
  form,
2835
2835
  id: "unitAmount",
@@ -2839,10 +2839,10 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2839
2839
  isRequired: true
2840
2840
  }
2841
2841
  ),
2842
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormSelect, { form, id: "currency", name: "Currency", values: currencyOptions, disabled: isEditMode })
2842
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormSelect, { form, id: "currency", name: "Currency", values: currencyOptions, disabled: isEditMode })
2843
2843
  ] }),
2844
2844
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2845
- _chunkILKUML3Zjs.FormSelect,
2845
+ _chunkHIKTQMCRjs.FormSelect,
2846
2846
  {
2847
2847
  form,
2848
2848
  id: "interval",
@@ -2853,7 +2853,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2853
2853
  ),
2854
2854
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
2855
2855
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2856
- _chunkILKUML3Zjs.FormInput,
2856
+ _chunkHIKTQMCRjs.FormInput,
2857
2857
  {
2858
2858
  form,
2859
2859
  id: "intervalCount",
@@ -2864,7 +2864,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2864
2864
  }
2865
2865
  ),
2866
2866
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2867
- _chunkILKUML3Zjs.FormSelect,
2867
+ _chunkHIKTQMCRjs.FormSelect,
2868
2868
  {
2869
2869
  form,
2870
2870
  id: "usageType",
@@ -2875,7 +2875,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2875
2875
  )
2876
2876
  ] }),
2877
2877
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2878
- _chunkILKUML3Zjs.FormInput,
2878
+ _chunkHIKTQMCRjs.FormInput,
2879
2879
  {
2880
2880
  form,
2881
2881
  id: "nickname",
@@ -2884,7 +2884,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2884
2884
  }
2885
2885
  ),
2886
2886
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2887
- _chunkILKUML3Zjs.FormTextarea,
2887
+ _chunkHIKTQMCRjs.FormTextarea,
2888
2888
  {
2889
2889
  form,
2890
2890
  id: "description",
@@ -2893,12 +2893,12 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2893
2893
  className: "min-h-24"
2894
2894
  }
2895
2895
  ),
2896
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.FormItem, { children: [
2897
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormLabel, { children: "Features (optional)" }),
2896
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.FormItem, { children: [
2897
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormLabel, { children: "Features (optional)" }),
2898
2898
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2899
2899
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2900
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormControl, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2901
- _chunkILKUML3Zjs.Input,
2900
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormControl, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2901
+ _chunkHIKTQMCRjs.Input,
2902
2902
  {
2903
2903
  ...form.register(`features.${index}`),
2904
2904
  placeholder: `Feature ${index + 1}`,
@@ -2906,7 +2906,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2906
2906
  }
2907
2907
  ) }),
2908
2908
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2909
- _chunkILKUML3Zjs.Button,
2909
+ _chunkHIKTQMCRjs.Button,
2910
2910
  {
2911
2911
  type: "button",
2912
2912
  variant: "outline",
@@ -2923,7 +2923,7 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2923
2923
  )
2924
2924
  ] }, index)),
2925
2925
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2926
- _chunkILKUML3Zjs.Button,
2926
+ _chunkHIKTQMCRjs.Button,
2927
2927
  {
2928
2928
  type: "button",
2929
2929
  variant: "outline",
@@ -2941,8 +2941,8 @@ function PriceEditor({ productId, price, open, onOpenChange, onSuccess }) {
2941
2941
  )
2942
2942
  ] })
2943
2943
  ] }),
2944
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormCheckbox, { form, id: "active", name: "Active" }),
2945
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CommonEditorButtons, { isEdit: isEditMode, form, disabled: isSubmitting, setOpen: onOpenChange })
2944
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormCheckbox, { form, id: "active", name: "Active" }),
2945
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CommonEditorButtons, { isEdit: isEditMode, form, disabled: isSubmitting, setOpen: onOpenChange })
2946
2946
  ] }) })
2947
2947
  ] }) });
2948
2948
  }
@@ -3028,12 +3028,12 @@ function PricesList({ productId, onPricesChange }) {
3028
3028
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
3029
3029
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between mb-4", children: [
3030
3030
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-lg font-semibold", children: "Prices" }),
3031
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3031
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3032
3032
  ] }),
3033
3033
  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: [
3034
3034
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.DollarSign, { className: "text-muted-foreground h-12 w-12" }),
3035
3035
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: "No prices yet. Add a price to enable subscriptions." }),
3036
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3036
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { size: "sm", onClick: () => setShowCreatePrice(true), children: "Add Price" })
3037
3037
  ] }),
3038
3038
  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) => {
3039
3039
  const isArchiving = archivingPriceId === price.id;
@@ -3042,9 +3042,9 @@ function PricesList({ productId, onPricesChange }) {
3042
3042
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start justify-between mb-3", children: [
3043
3043
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.DollarSign, { className: "h-5 w-5 text-primary" }),
3044
3044
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-1", children: [
3045
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.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" }) }),
3045
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.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" }) }),
3046
3046
  price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3047
- _chunkILKUML3Zjs.Button,
3047
+ _chunkHIKTQMCRjs.Button,
3048
3048
  {
3049
3049
  variant: "ghost",
3050
3050
  size: "sm",
@@ -3054,7 +3054,7 @@ function PricesList({ productId, onPricesChange }) {
3054
3054
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Archive, { className: "h-4 w-4" })
3055
3055
  }
3056
3056
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3057
- _chunkILKUML3Zjs.Button,
3057
+ _chunkHIKTQMCRjs.Button,
3058
3058
  {
3059
3059
  variant: "ghost",
3060
3060
  size: "sm",
@@ -3105,20 +3105,20 @@ function PricesList({ productId, onPricesChange }) {
3105
3105
  }
3106
3106
  }
3107
3107
  ),
3108
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialog, { open: !!priceToArchive, onOpenChange: (open) => !open && setPriceToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogContent, { children: [
3109
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogHeader, { children: [
3110
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogTitle, { children: "Archive Price" }),
3111
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogDescription, { children: [
3108
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialog, { open: !!priceToArchive, onOpenChange: (open) => !open && setPriceToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogContent, { children: [
3109
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogHeader, { children: [
3110
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogTitle, { children: "Archive Price" }),
3111
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogDescription, { children: [
3112
3112
  "Are you sure you want to archive the price for",
3113
3113
  " ",
3114
3114
  priceToArchive && `${formatCurrency(priceToArchive.unitAmount, priceToArchive.currency)} ${formatInterval2(priceToArchive)}`,
3115
3115
  "? This will prevent new subscriptions but existing ones will continue."
3116
3116
  ] })
3117
3117
  ] }),
3118
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogFooter, { children: [
3119
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogCancel, { disabled: !!archivingPriceId, children: "Cancel" }),
3118
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogFooter, { children: [
3119
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogCancel, { disabled: !!archivingPriceId, children: "Cancel" }),
3120
3120
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3121
- _chunkILKUML3Zjs.AlertDialogAction,
3121
+ _chunkHIKTQMCRjs.AlertDialogAction,
3122
3122
  {
3123
3123
  onClick: handleArchive,
3124
3124
  disabled: !!archivingPriceId,
@@ -3128,20 +3128,20 @@ function PricesList({ productId, onPricesChange }) {
3128
3128
  )
3129
3129
  ] })
3130
3130
  ] }) }),
3131
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialog, { open: !!priceToReactivate, onOpenChange: (open) => !open && setPriceToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogContent, { children: [
3132
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogHeader, { children: [
3133
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogTitle, { children: "Reactivate Price" }),
3134
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogDescription, { children: [
3131
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialog, { open: !!priceToReactivate, onOpenChange: (open) => !open && setPriceToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogContent, { children: [
3132
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogHeader, { children: [
3133
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogTitle, { children: "Reactivate Price" }),
3134
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogDescription, { children: [
3135
3135
  "Are you sure you want to reactivate the price for",
3136
3136
  " ",
3137
3137
  priceToReactivate && `${formatCurrency(priceToReactivate.unitAmount, priceToReactivate.currency)} ${formatInterval2(priceToReactivate)}`,
3138
3138
  "? This will allow new subscriptions again."
3139
3139
  ] })
3140
3140
  ] }),
3141
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogFooter, { children: [
3142
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogCancel, { disabled: !!reactivatingPriceId, children: "Cancel" }),
3141
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogFooter, { children: [
3142
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogCancel, { disabled: !!reactivatingPriceId, children: "Cancel" }),
3143
3143
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3144
- _chunkILKUML3Zjs.AlertDialogAction,
3144
+ _chunkHIKTQMCRjs.AlertDialogAction,
3145
3145
  {
3146
3146
  onClick: handleReactivate,
3147
3147
  disabled: !!reactivatingPriceId,
@@ -3207,15 +3207,15 @@ function ProductEditor({ product, open, onOpenChange, onSuccess }) {
3207
3207
  setIsSubmitting(false);
3208
3208
  }
3209
3209
  }, "onSubmit");
3210
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogContent, { className: "max-w-2xl", children: [
3211
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.DialogHeader, { children: [
3212
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogTitle, { children: product ? "Edit Product" : "Create Product" }),
3213
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.DialogDescription, { children: product ? `Update the details for ${product.name}` : "Create a new product to offer to your customers" })
3210
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogContent, { className: "max-w-2xl", children: [
3211
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.DialogHeader, { children: [
3212
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogTitle, { children: product ? "Edit Product" : "Create Product" }),
3213
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.DialogDescription, { children: product ? `Update the details for ${product.name}` : "Create a new product to offer to your customers" })
3214
3214
  ] }),
3215
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
3216
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormInput, { form, id: "name", name: "Product Name", placeholder: "Enter product name", isRequired: true }),
3215
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
3216
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormInput, { form, id: "name", name: "Product Name", placeholder: "Enter product name", isRequired: true }),
3217
3217
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3218
- _chunkILKUML3Zjs.FormTextarea,
3218
+ _chunkHIKTQMCRjs.FormTextarea,
3219
3219
  {
3220
3220
  form,
3221
3221
  id: "description",
@@ -3224,8 +3224,8 @@ function ProductEditor({ product, open, onOpenChange, onSuccess }) {
3224
3224
  className: "min-h-32"
3225
3225
  }
3226
3226
  ),
3227
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.FormCheckbox, { form, id: "active", name: "Active" }),
3228
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.CommonEditorButtons, { isEdit: !!product, form, disabled: isSubmitting, setOpen: onOpenChange })
3227
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.FormCheckbox, { form, id: "active", name: "Active" }),
3228
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.CommonEditorButtons, { isEdit: !!product, form, disabled: isSubmitting, setOpen: onOpenChange })
3229
3229
  ] }) })
3230
3230
  ] }) });
3231
3231
  }
@@ -3292,12 +3292,12 @@ function ProductsList({ products, onProductsChange }) {
3292
3292
  ] })
3293
3293
  ] }),
3294
3294
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3295
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.Button, { variant: "outline", size: "sm", onClick: () => setEditingProduct(product), children: [
3295
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.Button, { variant: "outline", size: "sm", onClick: () => setEditingProduct(product), children: [
3296
3296
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Edit, { className: "h-4 w-4 mr-1" }),
3297
3297
  "Edit"
3298
3298
  ] }),
3299
3299
  product.active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3300
- _chunkILKUML3Zjs.Button,
3300
+ _chunkHIKTQMCRjs.Button,
3301
3301
  {
3302
3302
  variant: "outline",
3303
3303
  size: "sm",
@@ -3309,7 +3309,7 @@ function ProductsList({ products, onProductsChange }) {
3309
3309
  ]
3310
3310
  }
3311
3311
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3312
- _chunkILKUML3Zjs.Button,
3312
+ _chunkHIKTQMCRjs.Button,
3313
3313
  {
3314
3314
  variant: "outline",
3315
3315
  size: "sm",
@@ -3321,7 +3321,7 @@ function ProductsList({ products, onProductsChange }) {
3321
3321
  ]
3322
3322
  }
3323
3323
  ),
3324
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.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" }) })
3324
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.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" }) })
3325
3325
  ] })
3326
3326
  ] }),
3327
3327
  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 }) })
@@ -3339,19 +3339,19 @@ function ProductsList({ products, onProductsChange }) {
3339
3339
  }
3340
3340
  }
3341
3341
  ),
3342
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialog, { open: !!productToArchive, onOpenChange: (open) => !open && setProductToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogContent, { children: [
3343
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogHeader, { children: [
3344
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogTitle, { children: "Archive Product" }),
3345
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogDescription, { children: [
3342
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialog, { open: !!productToArchive, onOpenChange: (open) => !open && setProductToArchive(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogContent, { children: [
3343
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogHeader, { children: [
3344
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogTitle, { children: "Archive Product" }),
3345
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogDescription, { children: [
3346
3346
  'Are you sure you want to archive "',
3347
3347
  _optionalChain([productToArchive, 'optionalAccess', _99 => _99.name]),
3348
3348
  '"? This will deactivate it and it will no longer be available for new subscriptions.'
3349
3349
  ] })
3350
3350
  ] }),
3351
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogFooter, { children: [
3352
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogCancel, { disabled: !!archivingProductId, children: "Cancel" }),
3351
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogFooter, { children: [
3352
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogCancel, { disabled: !!archivingProductId, children: "Cancel" }),
3353
3353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3354
- _chunkILKUML3Zjs.AlertDialogAction,
3354
+ _chunkHIKTQMCRjs.AlertDialogAction,
3355
3355
  {
3356
3356
  onClick: handleArchive,
3357
3357
  disabled: !!archivingProductId,
@@ -3361,19 +3361,19 @@ function ProductsList({ products, onProductsChange }) {
3361
3361
  )
3362
3362
  ] })
3363
3363
  ] }) }),
3364
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialog, { open: !!productToReactivate, onOpenChange: (open) => !open && setProductToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogContent, { children: [
3365
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogHeader, { children: [
3366
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogTitle, { children: "Reactivate Product" }),
3367
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogDescription, { children: [
3364
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialog, { open: !!productToReactivate, onOpenChange: (open) => !open && setProductToReactivate(null), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogContent, { children: [
3365
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogHeader, { children: [
3366
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogTitle, { children: "Reactivate Product" }),
3367
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogDescription, { children: [
3368
3368
  'Are you sure you want to reactivate "',
3369
3369
  _optionalChain([productToReactivate, 'optionalAccess', _100 => _100.name]),
3370
3370
  '"? This will make it available for new subscriptions again.'
3371
3371
  ] })
3372
3372
  ] }),
3373
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkILKUML3Zjs.AlertDialogFooter, { children: [
3374
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.AlertDialogCancel, { disabled: !!reactivatingProductId, children: "Cancel" }),
3373
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHIKTQMCRjs.AlertDialogFooter, { children: [
3374
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.AlertDialogCancel, { disabled: !!reactivatingProductId, children: "Cancel" }),
3375
3375
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3376
- _chunkILKUML3Zjs.AlertDialogAction,
3376
+ _chunkHIKTQMCRjs.AlertDialogAction,
3377
3377
  {
3378
3378
  onClick: handleReactivate,
3379
3379
  disabled: !!reactivatingProductId,
@@ -3390,7 +3390,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
3390
3390
  // src/features/billing/stripe-product/components/containers/ProductsAdminContainer.tsx
3391
3391
 
3392
3392
  function ProductsAdminContainer() {
3393
- const { hasRole } = _chunkILKUML3Zjs.useCurrentUserContext.call(void 0, );
3393
+ const { hasRole } = _chunkHIKTQMCRjs.useCurrentUserContext.call(void 0, );
3394
3394
  const [products, setProducts] = _react.useState.call(void 0, []);
3395
3395
  const [loading, setLoading] = _react.useState.call(void 0, true);
3396
3396
  const [showCreateProduct, setShowCreateProduct] = _react.useState.call(void 0, false);
@@ -3420,14 +3420,14 @@ function ProductsAdminContainer() {
3420
3420
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Package, { className: "h-8 w-8" }),
3421
3421
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-3xl font-bold", children: "Product & Price Management" })
3422
3422
  ] }),
3423
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Product" })
3423
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Product" })
3424
3424
  ] }),
3425
3425
  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: [
3426
3426
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Package, { className: "text-muted-foreground h-16 w-16" }),
3427
3427
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
3428
3428
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-xl font-semibold", children: "No products yet" }),
3429
3429
  /* @__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." }),
3430
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkILKUML3Zjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Your First Product" })
3430
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHIKTQMCRjs.Button, { onClick: () => setShowCreateProduct(true), children: "Create Your First Product" })
3431
3431
  ] })
3432
3432
  ] }),
3433
3433
  products.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, { products, onProductsChange: loadProducts }),