@burdenoff/microfe-billing 2026.625.4 → 2026.625.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +192 -187
  2. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonCreatePage.js +322 -317
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +190 -185
  6. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  7. package/dist/billing/modules/addons/pages/AddonEditPage.js +297 -292
  8. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  9. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +60 -75
  10. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  11. package/dist/billing/modules/addons/pages/AddonsListPage.js +86 -101
  12. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  13. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +124 -121
  14. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  15. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +103 -111
  16. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +196 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +58 -73
  20. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +65 -75
  22. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +399 -399
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +49 -48
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +144 -151
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/pages/CheckoutPage.js +430 -425
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  31. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +121 -93
  32. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  33. package/dist/billing/modules/coupons/pages/CouponsListPage.js +154 -152
  34. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  35. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +467 -462
  36. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  37. package/dist/billing/modules/coupons/pages/EditCouponPage.js +294 -286
  38. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  39. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +123 -117
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +43 -42
  42. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  43. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +192 -207
  44. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  45. package/dist/billing/modules/credits/pages/CreditsPage.js +40 -56
  46. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  47. package/dist/billing/modules/dashboard/pages/OverviewPage.js +128 -121
  48. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  49. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +165 -180
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  51. package/dist/billing/modules/earnings/pages/EarningsPage.js +103 -100
  52. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  53. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +175 -175
  54. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  55. package/dist/billing/modules/earnings/pages/PayoutsPage.js +96 -96
  56. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  57. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +42 -40
  58. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  59. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +45 -38
  60. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  61. package/dist/billing/modules/plans/pages/PlanCreatePage.js +339 -334
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  63. package/dist/billing/modules/plans/pages/PlanDetailPage.js +80 -74
  64. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  65. package/dist/billing/modules/plans/pages/PlanEditPage.js +342 -337
  66. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  67. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +38 -53
  68. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  69. package/dist/billing/modules/plans/pages/PlansListPage.js +60 -75
  70. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  71. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +242 -237
  72. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  73. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +29 -39
  74. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  75. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -0
  76. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +299 -294
  77. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  78. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +191 -186
  79. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  80. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +308 -303
  81. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  82. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +57 -78
  83. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  84. package/dist/billing/modules/settings/pages/SettingsPage.js +79 -78
  85. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  86. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +15 -13
  87. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  88. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +338 -299
  89. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  90. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +82 -103
  91. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  92. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +59 -54
  93. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  94. package/dist/billing/modules/usage/pages/UsagePage.js +172 -215
  95. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  96. package/package.json +2 -2
@@ -10,8 +10,9 @@ import { useMemo as u, useState as d } from "react";
10
10
  import { Minus as f, Plus as p, ShoppingCart as m, Trash2 as h, X as g } from "lucide-react";
11
11
  import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
12
12
  import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
+ import { IllustratedEmptyState as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
13
14
  //#region src/billing/modules/addons/pages/AddonsListPage.tsx
14
- function x(e) {
15
+ function C(e) {
15
16
  let t = /* @__PURE__ */ new Map();
16
17
  for (let n of e) {
17
18
  if (!n.quota) continue;
@@ -24,7 +25,7 @@ function x(e) {
24
25
  }
25
26
  return Array.from(t.values());
26
27
  }
27
- function S(e, t = "USD") {
28
+ function w(e, t = "USD") {
28
29
  if (e.currencyPrices && typeof e.currencyPrices == "object") {
29
30
  let n = e.currencyPrices;
30
31
  if (n[t]) return {
@@ -37,11 +38,11 @@ function S(e, t = "USD") {
37
38
  currency: e.currency || "USD"
38
39
  };
39
40
  }
40
- var C = () => {
41
+ var T = () => {
41
42
  let { t: e } = b(), t = (t, n) => {
42
43
  let r = e(t);
43
44
  return r === t ? n : r;
44
- }, n = o(), r = i(), { addons: u, isLoading: f, error: p, refetch: m } = c(), { toggleAddon: h, isToggling: g } = s(), { addToCart: _, removeFromCart: x, updateQuantity: S, isInCart: C, getCartItem: D } = a(), [O, k] = d("grid"), [A, j] = d(!1), [M, N] = d("all"), P = l();
45
+ }, n = o(), r = i(), { addons: u, isLoading: f, error: p, refetch: m } = c(), { toggleAddon: h, isToggling: g } = s(), { addToCart: _, removeFromCart: C, updateQuantity: w, isInCart: T, getCartItem: k } = a(), [A, j] = d("grid"), [M, N] = d(!1), [P, F] = d("all"), I = l();
45
46
  if (!r.canViewAddons) return /* @__PURE__ */ v("div", {
46
47
  className: "flex items-center justify-center h-full min-h-[400px]",
47
48
  children: /* @__PURE__ */ y("div", {
@@ -73,15 +74,15 @@ var C = () => {
73
74
  ]
74
75
  })
75
76
  });
76
- let F = u.filter((e) => !(!A && !e.isActive || M !== "all" && e.duration !== M)), I = async (e) => {
77
+ let L = u.filter((e) => !(!M && !e.isActive || P !== "all" && e.duration !== P)), R = async (e) => {
77
78
  if (r.canManageAddons) try {
78
79
  await h(e.id, !e.isActive), await m();
79
80
  } catch (e) {
80
81
  console.error("Failed to toggle addon:", e);
81
82
  }
82
- }, L = (e) => {
83
+ }, z = (e) => {
83
84
  n(`/addons/${e.id}`);
84
- }, R = (e) => {
85
+ }, B = (e) => {
85
86
  n(`/addons/${e.id}/edit`);
86
87
  };
87
88
  return f && u.length === 0 ? /* @__PURE__ */ y("div", {
@@ -149,13 +150,20 @@ var C = () => {
149
150
  children: [
150
151
  /* @__PURE__ */ y("div", {
151
152
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
152
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
153
- className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
154
- children: t("billing.addons.title", "Addons")
155
- }), /* @__PURE__ */ v("p", {
156
- className: "text-sm text-text-muted mt-1",
157
- children: t("billing.addons.subtitle", "Enhance your subscription with additional features")
158
- })] }), r.canManageAddons && /* @__PURE__ */ y("button", {
153
+ children: [/* @__PURE__ */ y("div", { children: [
154
+ /* @__PURE__ */ v("h1", {
155
+ className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
156
+ children: t("billing.addons.title", "Addons")
157
+ }),
158
+ /* @__PURE__ */ v("p", {
159
+ className: "text-sm text-text-muted mt-1",
160
+ children: t("billing.addons.subtitle", "Enhance your subscription with additional features")
161
+ }),
162
+ /* @__PURE__ */ v(S, {
163
+ className: "mt-3",
164
+ children: t("billing.addons.listPurpose", "Manage the catalog of add-ons customers can buy alongside their subscriptions — including inactive ones. Create new add-ons, edit their price and the quotas they grant, and activate or deactivate them to control availability.")
165
+ })
166
+ ] }), r.canManageAddons && /* @__PURE__ */ y("button", {
159
167
  type: "button",
160
168
  onClick: () => n("/addons/new"),
161
169
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
@@ -181,20 +189,20 @@ var C = () => {
181
189
  children: [
182
190
  /* @__PURE__ */ v("button", {
183
191
  type: "button",
184
- onClick: () => N("all"),
185
- className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${M === "all" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
192
+ onClick: () => F("all"),
193
+ className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${P === "all" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
186
194
  children: "All"
187
195
  }),
188
196
  /* @__PURE__ */ v("button", {
189
197
  type: "button",
190
- onClick: () => N("monthly"),
191
- className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${M === "monthly" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
198
+ onClick: () => F("monthly"),
199
+ className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${P === "monthly" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
192
200
  children: "Monthly"
193
201
  }),
194
202
  /* @__PURE__ */ v("button", {
195
203
  type: "button",
196
- onClick: () => N("yearly"),
197
- className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${M === "yearly" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
204
+ onClick: () => F("yearly"),
205
+ className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${P === "yearly" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
198
206
  children: "Yearly"
199
207
  })
200
208
  ]
@@ -203,8 +211,8 @@ var C = () => {
203
211
  className: "flex items-center gap-2 text-sm cursor-pointer",
204
212
  children: [/* @__PURE__ */ v("input", {
205
213
  type: "checkbox",
206
- checked: A,
207
- onChange: (e) => j(e.target.checked),
214
+ checked: M,
215
+ onChange: (e) => N(e.target.checked),
208
216
  className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
209
217
  }), /* @__PURE__ */ v("span", {
210
218
  className: "text-text-muted",
@@ -215,8 +223,8 @@ var C = () => {
215
223
  className: "ml-auto inline-flex rounded-lg border border-border-subtle p-1 bg-bg-sunken/50",
216
224
  children: [/* @__PURE__ */ v("button", {
217
225
  type: "button",
218
- onClick: () => k("grid"),
219
- className: `p-1.5 rounded-md transition-colors ${O === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
226
+ onClick: () => j("grid"),
227
+ className: `p-1.5 rounded-md transition-colors ${A === "grid" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
220
228
  title: "Grid view",
221
229
  children: /* @__PURE__ */ v("svg", {
222
230
  className: "size-4",
@@ -232,8 +240,8 @@ var C = () => {
232
240
  })
233
241
  }), /* @__PURE__ */ v("button", {
234
242
  type: "button",
235
- onClick: () => k("list"),
236
- className: `p-1.5 rounded-md transition-colors ${O === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
243
+ onClick: () => j("list"),
244
+ className: `p-1.5 rounded-md transition-colors ${A === "list" ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-muted hover:text-text-primary"}`,
237
245
  title: "List view",
238
246
  children: /* @__PURE__ */ v("svg", {
239
247
  className: "size-4",
@@ -251,83 +259,60 @@ var C = () => {
251
259
  })
252
260
  ]
253
261
  }),
254
- F.length === 0 ? /* @__PURE__ */ y("div", {
255
- className: "flex flex-col items-center justify-center py-16 border border-dashed border-border-seam rounded-card bg-bg-surface",
256
- children: [
257
- /* @__PURE__ */ v("div", {
258
- className: "size-12 rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center mb-4",
259
- children: /* @__PURE__ */ v("svg", {
260
- className: "size-6 text-text-muted",
261
- fill: "none",
262
- viewBox: "0 0 24 24",
263
- stroke: "currentColor",
264
- children: /* @__PURE__ */ v("path", {
265
- strokeLinecap: "round",
266
- strokeLinejoin: "round",
267
- strokeWidth: 2,
268
- d: "M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"
269
- })
270
- })
271
- }),
272
- /* @__PURE__ */ v("h3", {
273
- className: "text-lg font-medium text-text-primary",
274
- children: t("billing.addons.noAddonsFound", "No addons found")
275
- }),
276
- /* @__PURE__ */ v("p", {
277
- className: "text-sm text-text-muted mt-1",
278
- children: A ? t("billing.addons.noAddonsFiltered", "No addons match your current filters.") : t("billing.addons.noActiveAddons", "There are no active addons available.")
279
- }),
280
- r.canManageAddons && /* @__PURE__ */ v("button", {
281
- type: "button",
282
- onClick: () => n("/addons/new"),
283
- className: "mt-4 px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
284
- children: t("billing.addons.createFirstAddon", "Create your first addon")
285
- })
286
- ]
287
- }) : O === "grid" ? /* @__PURE__ */ v("div", {
262
+ L.length === 0 ? /* @__PURE__ */ v(x, {
263
+ illustration: "empty-data",
264
+ title: t("billing.addons.noAddonsFound", "No addons found"),
265
+ description: M ? t("billing.addons.noAddonsFiltered", "No addons match your current filters.") : t("billing.addons.noActiveAddons", "There are no active addons available."),
266
+ action: r.canManageAddons ? /* @__PURE__ */ v("button", {
267
+ type: "button",
268
+ onClick: () => n("/addons/new"),
269
+ className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors",
270
+ children: t("billing.addons.createFirstAddon", "Create your first addon")
271
+ }) : void 0
272
+ }) : A === "grid" ? /* @__PURE__ */ v("div", {
288
273
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",
289
- children: F.map((e) => {
290
- let t = D(e.id);
291
- return /* @__PURE__ */ v(w, {
274
+ children: L.map((e) => {
275
+ let t = k(e.id);
276
+ return /* @__PURE__ */ v(E, {
292
277
  addon: e,
293
- onView: L,
294
- onEdit: R,
295
- onToggle: I,
278
+ onView: z,
279
+ onEdit: B,
280
+ onToggle: R,
296
281
  canManage: r.canManageAddons,
297
282
  isToggling: g,
298
- isInCart: C(e.id),
283
+ isInCart: T(e.id),
299
284
  cartQuantity: t?.quantity || 0,
300
285
  onAddToCart: _,
301
- onUpdateQuantity: S,
302
- onRemoveFromCart: x,
303
- displayCurrency: P
286
+ onUpdateQuantity: w,
287
+ onRemoveFromCart: C,
288
+ displayCurrency: I
304
289
  }, e.id);
305
290
  })
306
291
  }) : /* @__PURE__ */ v("div", {
307
292
  className: "space-y-3",
308
- children: F.map((e) => {
309
- let t = D(e.id);
310
- return /* @__PURE__ */ v(T, {
293
+ children: L.map((e) => {
294
+ let t = k(e.id);
295
+ return /* @__PURE__ */ v(D, {
311
296
  addon: e,
312
- onView: L,
313
- onEdit: R,
314
- onToggle: I,
297
+ onView: z,
298
+ onEdit: B,
299
+ onToggle: R,
315
300
  canManage: r.canManageAddons,
316
301
  isToggling: g,
317
- isInCart: C(e.id),
302
+ isInCart: T(e.id),
318
303
  cartQuantity: t?.quantity || 0,
319
304
  onAddToCart: _,
320
- onUpdateQuantity: S,
321
- onRemoveFromCart: x,
322
- displayCurrency: P
305
+ onUpdateQuantity: w,
306
+ onRemoveFromCart: C,
307
+ displayCurrency: I
323
308
  }, e.id);
324
309
  })
325
310
  }),
326
- /* @__PURE__ */ v(E, { displayCurrency: P })
311
+ /* @__PURE__ */ v(O, { displayCurrency: I })
327
312
  ]
328
313
  });
329
- }, w = ({ addon: r, onView: i, onEdit: a, onToggle: o, canManage: s, displayCurrency: c, isToggling: l, isInCart: d, cartQuantity: g, onAddToCart: _, onUpdateQuantity: b, onRemoveFromCart: C }) => {
330
- let w = u(() => x(r.features || []), [r.features]);
314
+ }, E = ({ addon: r, onView: i, onEdit: a, onToggle: o, canManage: s, displayCurrency: c, isToggling: l, isInCart: d, cartQuantity: g, onAddToCart: _, onUpdateQuantity: b, onRemoveFromCart: x }) => {
315
+ let S = u(() => C(r.features || []), [r.features]);
331
316
  return /* @__PURE__ */ y("div", {
332
317
  className: `relative border rounded-card p-6 shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:border-border-strong hover:shadow-[var(--shadow-elevation-2)] flex flex-col h-full ${r.isActive ? d ? "border-action-primary-bg bg-[var(--color-accent-soft)]" : "border-border-subtle bg-bg-surface" : "border-dashed border-text-muted/30 bg-bg-sunken/30"}`,
333
318
  children: [
@@ -373,7 +358,7 @@ var C = () => {
373
358
  children: [/* @__PURE__ */ v("span", {
374
359
  className: "text-2xl font-bold text-text-primary",
375
360
  children: (() => {
376
- let { price: t, currency: n } = S(r, c);
361
+ let { price: t, currency: n } = w(r, c);
377
362
  return e(t, n);
378
363
  })()
379
364
  }), /* @__PURE__ */ y("span", {
@@ -381,9 +366,9 @@ var C = () => {
381
366
  children: ["/ ", t(r.duration)]
382
367
  })]
383
368
  }),
384
- w.length > 0 && /* @__PURE__ */ y("ul", {
369
+ S.length > 0 && /* @__PURE__ */ y("ul", {
385
370
  className: "space-y-2 mb-4",
386
- children: [w.slice(0, 4).map((e) => /* @__PURE__ */ y("li", {
371
+ children: [S.slice(0, 4).map((e) => /* @__PURE__ */ y("li", {
387
372
  className: "flex items-center justify-between text-sm",
388
373
  children: [/* @__PURE__ */ y("div", {
389
374
  className: "flex items-center gap-2",
@@ -406,11 +391,11 @@ var C = () => {
406
391
  className: "font-medium text-text-primary",
407
392
  children: e.totalValue.toLocaleString()
408
393
  })]
409
- }, e.quotaId)), w.length > 4 && /* @__PURE__ */ y("li", {
394
+ }, e.quotaId)), S.length > 4 && /* @__PURE__ */ y("li", {
410
395
  className: "text-sm text-text-muted pl-6",
411
396
  children: [
412
397
  "+",
413
- w.length - 4,
398
+ S.length - 4,
414
399
  " more quotas"
415
400
  ]
416
401
  })]
@@ -442,7 +427,7 @@ var C = () => {
442
427
  ]
443
428
  }), /* @__PURE__ */ v("button", {
444
429
  type: "button",
445
- onClick: () => C(r.id),
430
+ onClick: () => x(r.id),
446
431
  className: "p-1.5 rounded text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
447
432
  title: "Remove from cart",
448
433
  children: /* @__PURE__ */ v(h, { className: "size-4" })
@@ -478,8 +463,8 @@ var C = () => {
478
463
  })
479
464
  ]
480
465
  });
481
- }, T = ({ addon: n, onView: r, onEdit: i, onToggle: a, canManage: o, displayCurrency: s, isToggling: c, isInCart: l, cartQuantity: d, onAddToCart: g, onUpdateQuantity: b, onRemoveFromCart: C }) => {
482
- let w = u(() => x(n.features || []), [n.features]);
466
+ }, D = ({ addon: n, onView: r, onEdit: i, onToggle: a, canManage: o, displayCurrency: s, isToggling: c, isInCart: l, cartQuantity: d, onAddToCart: g, onUpdateQuantity: b, onRemoveFromCart: x }) => {
467
+ let S = u(() => C(n.features || []), [n.features]);
483
468
  return /* @__PURE__ */ y("div", {
484
469
  className: `flex items-center gap-4 p-4 border rounded-card shadow-[var(--shadow-elevation-1)] transition-all duration-200 hover:border-border-strong hover:shadow-[var(--shadow-elevation-2)] ${n.isActive ? l ? "border-action-primary-bg bg-[var(--color-accent-soft)]" : "border-border-subtle bg-bg-surface" : "border-dashed border-text-muted/30 bg-bg-sunken/30"}`,
485
470
  children: [
@@ -523,9 +508,9 @@ var C = () => {
523
508
  }), /* @__PURE__ */ y("p", {
524
509
  className: "text-sm text-text-muted",
525
510
  children: [
526
- w.length,
511
+ S.length,
527
512
  " quota",
528
- w.length === 1 ? "" : "s"
513
+ S.length === 1 ? "" : "s"
529
514
  ]
530
515
  })]
531
516
  }),
@@ -534,7 +519,7 @@ var C = () => {
534
519
  children: [/* @__PURE__ */ v("div", {
535
520
  className: "font-semibold text-text-primary",
536
521
  children: (() => {
537
- let { price: t, currency: r } = S(n, s);
522
+ let { price: t, currency: r } = w(n, s);
538
523
  return e(t, r);
539
524
  })()
540
525
  }), /* @__PURE__ */ y("div", {
@@ -563,7 +548,7 @@ var C = () => {
563
548
  }),
564
549
  /* @__PURE__ */ v("button", {
565
550
  type: "button",
566
- onClick: () => C(n.id),
551
+ onClick: () => x(n.id),
567
552
  className: "p-1.5 rounded text-status-error-text hover:bg-status-error-bg-subtle transition-colors ml-1",
568
553
  title: "Remove from cart",
569
554
  children: /* @__PURE__ */ v(h, { className: "size-4" })
@@ -597,7 +582,7 @@ var C = () => {
597
582
  })
598
583
  ]
599
584
  });
600
- }, E = ({ displayCurrency: n }) => {
585
+ }, O = ({ displayCurrency: n }) => {
601
586
  let r = o(), { items: i, isCartOpen: s, toggleCart: c, closeCart: l, removeFromCart: u, updateQuantity: d, clearCart: b } = a(), x = i.reduce((e, t) => e + t.quantity, 0);
602
587
  return i.length === 0 && !s ? null : /* @__PURE__ */ y(_, { children: [!s && i.length > 0 && /* @__PURE__ */ y("button", {
603
588
  type: "button",
@@ -616,7 +601,7 @@ var C = () => {
616
601
  /* @__PURE__ */ v("span", {
617
602
  className: "px-2 py-0.5 bg-[var(--color-accent-soft)] rounded-full text-sm",
618
603
  children: e(i.reduce((e, { addon: t, quantity: r }) => {
619
- let { price: i } = S(t, n);
604
+ let { price: i } = w(t, n);
620
605
  return e + i * r;
621
606
  }, 0), n)
622
607
  })
@@ -684,7 +669,7 @@ var C = () => {
684
669
  className: "text-sm text-text-muted",
685
670
  children: [
686
671
  (() => {
687
- let { price: t, currency: i } = S(r, n);
672
+ let { price: t, currency: i } = w(r, n);
688
673
  return e(t, i);
689
674
  })(),
690
675
  " ",
@@ -719,7 +704,7 @@ var C = () => {
719
704
  children: /* @__PURE__ */ v("p", {
720
705
  className: "font-medium text-text-primary",
721
706
  children: (() => {
722
- let { price: t, currency: a } = S(r, n);
707
+ let { price: t, currency: a } = w(r, n);
723
708
  return e(t * i, a);
724
709
  })()
725
710
  })
@@ -743,7 +728,7 @@ var C = () => {
743
728
  }), /* @__PURE__ */ v("span", {
744
729
  className: "text-text-primary",
745
730
  children: e(i.reduce((e, { addon: t, quantity: r }) => {
746
- let { price: i } = S(t, n);
731
+ let { price: i } = w(t, n);
747
732
  return e + i * r;
748
733
  }, 0), n)
749
734
  })]
@@ -769,6 +754,6 @@ var C = () => {
769
754
  })] });
770
755
  };
771
756
  //#endregion
772
- export { C as AddonsListPage };
757
+ export { T as AddonsListPage };
773
758
 
774
759
  //# sourceMappingURL=AddonsListPage.js.map