@burdenoff/microfe-billing 2026.528.1 → 2026.529.1

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.
@@ -4,21 +4,22 @@ import "../../../shared/components/index.js";
4
4
  import { PricingModel as n } from "../../../shared/types/graphql.js";
5
5
  import { formatCurrency as r, formatPlanDuration as i, formatPlanDurationLabel as a } from "../../../shared/utils/format.js";
6
6
  import { isServerError as o } from "../../../shared/utils/error.js";
7
+ import { getPlanFeatureQuantity as s } from "../../../shared/utils/planFeatureQuantity.js";
7
8
  import "../../../shared/utils/index.js";
8
- import { useBillingPermissions as s } from "../../../hooks/useBillingPermissions.js";
9
- import { useBillingNavigate as c } from "../../../hooks/useBillingNavigate.js";
10
- import { getDisplayPrice as l, useDefaultBillingCurrency as u } from "../../../hooks/useDefaultBillingCurrency.js";
11
- import { usePlanMutations as d, usePlans as f } from "../hooks/usePlans.js";
9
+ import { useBillingPermissions as c } from "../../../hooks/useBillingPermissions.js";
10
+ import { useBillingNavigate as l } from "../../../hooks/useBillingNavigate.js";
11
+ import { getDisplayPrice as u, useDefaultBillingCurrency as d } from "../../../hooks/useDefaultBillingCurrency.js";
12
+ import { usePlanMutations as f, usePlans as p } from "../hooks/usePlans.js";
12
13
  import "../hooks/index.js";
13
- import { useMemo as p, useState as m } from "react";
14
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
15
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { useMemo as m, useState as h } from "react";
15
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
16
+ import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
17
  //#region src/billing/modules/plans/pages/PlansListPage.tsx
17
- function v(e) {
18
+ function y(e) {
18
19
  let t = /* @__PURE__ */ new Map();
19
20
  for (let n of e) {
20
21
  if (!n.quota) continue;
21
- let e = n.quota.id, r = n.quota.limits?.value ?? 0, i = t.get(e);
22
+ let e = n.quota.id, r = s(n), i = t.get(e);
22
23
  i ? i.totalValue += r : t.set(e, {
23
24
  quotaId: e,
24
25
  name: n.quota.name ?? "Unknown Quota",
@@ -27,15 +28,15 @@ function v(e) {
27
28
  }
28
29
  return Array.from(t.values());
29
30
  }
30
- var y = () => {
31
- let { t: n } = _(), r = (e, t) => {
31
+ var b = () => {
32
+ let { t: n } = v(), r = (e, t) => {
32
33
  let r = n(e);
33
34
  return r === e ? t : r;
34
- }, i = c(), a = s(), { plans: l, isLoading: u, error: p, refetch: v } = f(), { togglePlan: y, isToggling: S } = d(), [C, w] = m("grid"), [T, E] = m(!1), [D, O] = m("all");
35
- if (!a.canViewPlans) return /* @__PURE__ */ h(e, { message: r("billing.plans.noViewPermission", "You don't have permission to view pricing plans.") });
36
- let k = l.filter((e) => !(!T && !e.isActive || D !== "all" && e.duration !== D)), A = async (e) => {
35
+ }, i = l(), a = c(), { plans: s, isLoading: u, error: d, refetch: m } = p(), { togglePlan: y, isToggling: b } = f(), [C, w] = h("grid"), [T, E] = h(!1), [D, O] = h("all");
36
+ if (!a.canViewPlans) return /* @__PURE__ */ g(e, { message: r("billing.plans.noViewPermission", "You don't have permission to view pricing plans.") });
37
+ let k = s.filter((e) => !(!T && !e.isActive || D !== "all" && e.duration !== D)), A = async (e) => {
37
38
  if (a.canManagePlans) try {
38
- await y(e.id, !e.isActive), await v();
39
+ await y(e.id, !e.isActive), await m();
39
40
  } catch (e) {
40
41
  console.error("Failed to toggle plan:", e);
41
42
  }
@@ -44,52 +45,52 @@ var y = () => {
44
45
  }, M = (e) => {
45
46
  i(`/plans/${e.id}`);
46
47
  };
47
- return u && l.length === 0 ? /* @__PURE__ */ g("div", {
48
+ return u && s.length === 0 ? /* @__PURE__ */ _("div", {
48
49
  className: "space-y-6 p-6",
49
- children: [/* @__PURE__ */ h("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ h("div", {
50
+ children: [/* @__PURE__ */ g("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ g("div", {
50
51
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
51
52
  children: [
52
53
  1,
53
54
  2,
54
55
  3
55
- ].map((e) => /* @__PURE__ */ g("div", {
56
+ ].map((e) => /* @__PURE__ */ _("div", {
56
57
  className: "border border-border rounded-lg p-6 space-y-4",
57
58
  children: [
58
- /* @__PURE__ */ h("div", { className: "h-6 w-24 bg-muted animate-pulse rounded" }),
59
- /* @__PURE__ */ h("div", { className: "h-8 w-32 bg-muted animate-pulse rounded" }),
60
- /* @__PURE__ */ h("div", {
59
+ /* @__PURE__ */ g("div", { className: "h-6 w-24 bg-muted animate-pulse rounded" }),
60
+ /* @__PURE__ */ g("div", { className: "h-8 w-32 bg-muted animate-pulse rounded" }),
61
+ /* @__PURE__ */ g("div", {
61
62
  className: "space-y-2",
62
63
  children: [
63
64
  1,
64
65
  2,
65
66
  3,
66
67
  4
67
- ].map((e) => /* @__PURE__ */ h("div", { className: "h-4 w-full bg-muted animate-pulse rounded" }, e))
68
+ ].map((e) => /* @__PURE__ */ g("div", { className: "h-4 w-full bg-muted animate-pulse rounded" }, e))
68
69
  })
69
70
  ]
70
71
  }, e))
71
72
  })]
72
- }) : p ? o(p) ? /* @__PURE__ */ h("div", {
73
+ }) : d ? o(d) ? /* @__PURE__ */ g("div", {
73
74
  className: "p-6",
74
- children: /* @__PURE__ */ h(t, {
75
+ children: /* @__PURE__ */ g(t, {
75
76
  title: r("billing.plans.serverUnavailable", "Server Unavailable"),
76
77
  message: r("billing.plans.serverUnavailableMessage", "Unable to load pricing plans. The server might be down or experiencing issues."),
77
- onRetry: () => v(),
78
+ onRetry: () => m(),
78
79
  showRetry: !0
79
80
  })
80
- }) : /* @__PURE__ */ h("div", {
81
+ }) : /* @__PURE__ */ g("div", {
81
82
  className: "flex items-center justify-center h-full min-h-[400px]",
82
- children: /* @__PURE__ */ g("div", {
83
+ children: /* @__PURE__ */ _("div", {
83
84
  className: "text-center space-y-4",
84
85
  children: [
85
- /* @__PURE__ */ h("div", {
86
+ /* @__PURE__ */ g("div", {
86
87
  className: "size-12 mx-auto rounded-full bg-destructive/10 flex items-center justify-center",
87
- children: /* @__PURE__ */ h("svg", {
88
+ children: /* @__PURE__ */ g("svg", {
88
89
  className: "size-6 text-destructive",
89
90
  fill: "none",
90
91
  viewBox: "0 0 24 24",
91
92
  stroke: "currentColor",
92
- children: /* @__PURE__ */ h("path", {
93
+ children: /* @__PURE__ */ g("path", {
93
94
  strokeLinecap: "round",
94
95
  strokeLinejoin: "round",
95
96
  strokeWidth: 2,
@@ -97,43 +98,43 @@ var y = () => {
97
98
  })
98
99
  })
99
100
  }),
100
- /* @__PURE__ */ h("h2", {
101
+ /* @__PURE__ */ g("h2", {
101
102
  className: "text-lg font-semibold text-foreground",
102
103
  children: r("billing.plans.failedToLoad", "Failed to load plans")
103
104
  }),
104
- /* @__PURE__ */ h("p", {
105
+ /* @__PURE__ */ g("p", {
105
106
  className: "text-sm text-muted-foreground",
106
- children: p.message
107
+ children: d.message
107
108
  }),
108
- /* @__PURE__ */ h("button", {
109
+ /* @__PURE__ */ g("button", {
109
110
  type: "button",
110
- onClick: () => v(),
111
+ onClick: () => m(),
111
112
  className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
112
113
  children: "Try Again"
113
114
  })
114
115
  ]
115
116
  })
116
- }) : /* @__PURE__ */ g("div", {
117
+ }) : /* @__PURE__ */ _("div", {
117
118
  className: "space-y-6 p-6",
118
119
  children: [
119
- /* @__PURE__ */ g("div", {
120
+ /* @__PURE__ */ _("div", {
120
121
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
121
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
122
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
122
123
  className: "text-2xl font-bold text-foreground",
123
124
  children: r("billing.plans.title", "Pricing Plans")
124
- }), /* @__PURE__ */ h("p", {
125
+ }), /* @__PURE__ */ g("p", {
125
126
  className: "text-sm text-muted-foreground mt-1",
126
127
  children: r("billing.plans.subtitle", "Choose the plan that best fits your needs")
127
- })] }), a.canManagePlans && /* @__PURE__ */ g("button", {
128
+ })] }), a.canManagePlans && /* @__PURE__ */ _("button", {
128
129
  type: "button",
129
130
  onClick: () => i("/plans/new"),
130
131
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
131
- children: [/* @__PURE__ */ h("svg", {
132
+ children: [/* @__PURE__ */ g("svg", {
132
133
  className: "size-4",
133
134
  fill: "none",
134
135
  viewBox: "0 0 24 24",
135
136
  stroke: "currentColor",
136
- children: /* @__PURE__ */ h("path", {
137
+ children: /* @__PURE__ */ g("path", {
137
138
  strokeLinecap: "round",
138
139
  strokeLinejoin: "round",
139
140
  strokeWidth: 2,
@@ -142,25 +143,25 @@ var y = () => {
142
143
  }), "Create Plan"]
143
144
  })]
144
145
  }),
145
- /* @__PURE__ */ g("div", {
146
+ /* @__PURE__ */ _("div", {
146
147
  className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border",
147
148
  children: [
148
- /* @__PURE__ */ g("div", {
149
+ /* @__PURE__ */ _("div", {
149
150
  className: "inline-flex rounded-lg border border-border p-1 bg-muted/50",
150
151
  children: [
151
- /* @__PURE__ */ h("button", {
152
+ /* @__PURE__ */ g("button", {
152
153
  type: "button",
153
154
  onClick: () => O("all"),
154
155
  className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${D === "all" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
155
156
  children: "All"
156
157
  }),
157
- /* @__PURE__ */ h("button", {
158
+ /* @__PURE__ */ g("button", {
158
159
  type: "button",
159
160
  onClick: () => O("monthly"),
160
161
  className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${D === "monthly" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
161
162
  children: "Monthly"
162
163
  }),
163
- /* @__PURE__ */ h("button", {
164
+ /* @__PURE__ */ g("button", {
164
165
  type: "button",
165
166
  onClick: () => O("yearly"),
166
167
  className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${D === "yearly" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
@@ -168,48 +169,48 @@ var y = () => {
168
169
  })
169
170
  ]
170
171
  }),
171
- a.canManagePlans && /* @__PURE__ */ g("label", {
172
+ a.canManagePlans && /* @__PURE__ */ _("label", {
172
173
  className: "flex items-center gap-2 text-sm cursor-pointer",
173
- children: [/* @__PURE__ */ h("input", {
174
+ children: [/* @__PURE__ */ g("input", {
174
175
  type: "checkbox",
175
176
  checked: T,
176
177
  onChange: (e) => E(e.target.checked),
177
178
  className: "size-4 rounded border-border text-primary focus:ring-primary"
178
- }), /* @__PURE__ */ h("span", {
179
+ }), /* @__PURE__ */ g("span", {
179
180
  className: "text-muted-foreground",
180
181
  children: r("billing.plans.showInactive", "Show inactive plans")
181
182
  })]
182
183
  }),
183
- /* @__PURE__ */ g("div", {
184
+ /* @__PURE__ */ _("div", {
184
185
  className: "ml-auto inline-flex rounded-lg border border-border p-1 bg-muted/50",
185
- children: [/* @__PURE__ */ h("button", {
186
+ children: [/* @__PURE__ */ g("button", {
186
187
  type: "button",
187
188
  onClick: () => w("grid"),
188
189
  className: `p-1.5 rounded-md transition-colors ${C === "grid" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
189
190
  title: "Grid view",
190
- children: /* @__PURE__ */ h("svg", {
191
+ children: /* @__PURE__ */ g("svg", {
191
192
  className: "size-4",
192
193
  fill: "none",
193
194
  viewBox: "0 0 24 24",
194
195
  stroke: "currentColor",
195
- children: /* @__PURE__ */ h("path", {
196
+ children: /* @__PURE__ */ g("path", {
196
197
  strokeLinecap: "round",
197
198
  strokeLinejoin: "round",
198
199
  strokeWidth: 2,
199
200
  d: "M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
200
201
  })
201
202
  })
202
- }), /* @__PURE__ */ h("button", {
203
+ }), /* @__PURE__ */ g("button", {
203
204
  type: "button",
204
205
  onClick: () => w("list"),
205
206
  className: `p-1.5 rounded-md transition-colors ${C === "list" ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
206
207
  title: "List view",
207
- children: /* @__PURE__ */ h("svg", {
208
+ children: /* @__PURE__ */ g("svg", {
208
209
  className: "size-4",
209
210
  fill: "none",
210
211
  viewBox: "0 0 24 24",
211
212
  stroke: "currentColor",
212
- children: /* @__PURE__ */ h("path", {
213
+ children: /* @__PURE__ */ g("path", {
213
214
  strokeLinecap: "round",
214
215
  strokeLinejoin: "round",
215
216
  strokeWidth: 2,
@@ -220,17 +221,17 @@ var y = () => {
220
221
  })
221
222
  ]
222
223
  }),
223
- k.length === 0 ? /* @__PURE__ */ g("div", {
224
+ k.length === 0 ? /* @__PURE__ */ _("div", {
224
225
  className: "flex flex-col items-center justify-center py-12 border border-dashed border-border rounded-lg",
225
226
  children: [
226
- /* @__PURE__ */ h("div", {
227
+ /* @__PURE__ */ g("div", {
227
228
  className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4",
228
- children: /* @__PURE__ */ h("svg", {
229
+ children: /* @__PURE__ */ g("svg", {
229
230
  className: "size-6 text-muted-foreground",
230
231
  fill: "none",
231
232
  viewBox: "0 0 24 24",
232
233
  stroke: "currentColor",
233
- children: /* @__PURE__ */ h("path", {
234
+ children: /* @__PURE__ */ g("path", {
234
235
  strokeLinecap: "round",
235
236
  strokeLinejoin: "round",
236
237
  strokeWidth: 2,
@@ -238,68 +239,68 @@ var y = () => {
238
239
  })
239
240
  })
240
241
  }),
241
- /* @__PURE__ */ h("h3", {
242
+ /* @__PURE__ */ g("h3", {
242
243
  className: "text-lg font-medium text-foreground",
243
244
  children: r("billing.plans.noPlansFound", "No plans found")
244
245
  }),
245
- /* @__PURE__ */ h("p", {
246
+ /* @__PURE__ */ g("p", {
246
247
  className: "text-sm text-muted-foreground mt-1",
247
248
  children: T ? r("billing.plans.noPlansFiltered", "No plans match your current filters.") : r("billing.plans.noActivePlans", "There are no active plans available.")
248
249
  }),
249
- a.canManagePlans && /* @__PURE__ */ h("button", {
250
+ a.canManagePlans && /* @__PURE__ */ g("button", {
250
251
  type: "button",
251
252
  onClick: () => i("/plans/new"),
252
253
  className: "mt-4 px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
253
254
  children: r("billing.plans.createFirstPlan", "Create your first plan")
254
255
  })
255
256
  ]
256
- }) : C === "grid" ? /* @__PURE__ */ h("div", {
257
+ }) : C === "grid" ? /* @__PURE__ */ g("div", {
257
258
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",
258
- children: k.map((e) => /* @__PURE__ */ h(b, {
259
+ children: k.map((e) => /* @__PURE__ */ g(x, {
259
260
  plan: e,
260
261
  onSelect: j,
261
262
  onView: M,
262
263
  onToggle: A,
263
264
  canSelect: a.canCreateSubscription,
264
265
  canManage: a.canManagePlans,
265
- isToggling: S
266
+ isToggling: b
266
267
  }, e.id))
267
- }) : /* @__PURE__ */ h("div", {
268
+ }) : /* @__PURE__ */ g("div", {
268
269
  className: "space-y-3",
269
- children: k.map((e) => /* @__PURE__ */ h(x, {
270
+ children: k.map((e) => /* @__PURE__ */ g(S, {
270
271
  plan: e,
271
272
  onSelect: j,
272
273
  onView: M,
273
274
  onToggle: A,
274
275
  canSelect: a.canCreateSubscription,
275
276
  canManage: a.canManagePlans,
276
- isToggling: S
277
+ isToggling: b
277
278
  }, e.id))
278
279
  })
279
280
  ]
280
281
  });
281
- }, b = ({ plan: e, onSelect: t, onView: o, onToggle: s, canSelect: c, canManage: d, isToggling: f }) => {
282
- let m = u(), _ = p(() => v(e.features || []), [e.features]);
283
- return /* @__PURE__ */ g("div", {
282
+ }, x = ({ plan: e, onSelect: t, onView: o, onToggle: s, canSelect: c, canManage: l, isToggling: f }) => {
283
+ let p = d(), h = m(() => y(e.features || []), [e.features]);
284
+ return /* @__PURE__ */ _("div", {
284
285
  className: `relative border rounded-lg p-6 transition-all hover:shadow-md flex flex-col h-full ${e.isActive ? "border-border bg-card" : "border-dashed border-muted-foreground/30 bg-muted/30"}`,
285
286
  children: [
286
- !e.isActive && /* @__PURE__ */ h("span", {
287
+ !e.isActive && /* @__PURE__ */ g("span", {
287
288
  className: "absolute top-4 right-4 px-2 py-1 text-xs font-medium bg-muted text-muted-foreground rounded",
288
289
  children: "Inactive"
289
290
  }),
290
- /* @__PURE__ */ g("div", {
291
+ /* @__PURE__ */ _("div", {
291
292
  className: "mb-4",
292
- children: [/* @__PURE__ */ h("h3", {
293
+ children: [/* @__PURE__ */ g("h3", {
293
294
  className: "text-xl font-bold text-foreground",
294
295
  children: e.name
295
- }), /* @__PURE__ */ h("span", {
296
+ }), /* @__PURE__ */ g("span", {
296
297
  className: "text-sm text-muted-foreground",
297
298
  children: a(e.duration)
298
299
  })]
299
300
  }),
300
- /* @__PURE__ */ g("div", {
301
+ /* @__PURE__ */ _("div", {
301
302
  className: "flex items-baseline gap-1 mb-1",
302
- children: [/* @__PURE__ */ h("span", {
303
+ children: [/* @__PURE__ */ g("span", {
303
304
  className: "text-3xl font-bold text-foreground",
304
305
  children: (() => {
305
306
  let t = e.pricingModel === n.PER_SEAT && e.pricePerSeat ? {
@@ -308,68 +309,68 @@ var y = () => {
308
309
  } : {
309
310
  price: e.price,
310
311
  currency: e.currency
311
- }, { price: i, currency: a } = l(t.price, t.currency, e.currencyPrices, m);
312
+ }, { price: i, currency: a } = u(t.price, t.currency, e.currencyPrices, p);
312
313
  return r(i, a);
313
314
  })()
314
- }), /* @__PURE__ */ g("span", {
315
+ }), /* @__PURE__ */ _("span", {
315
316
  className: "text-muted-foreground",
316
317
  children: ["/ ", i(e.duration)]
317
318
  })]
318
319
  }),
319
- e.pricingModel === n.PER_SEAT && /* @__PURE__ */ g("p", {
320
+ e.pricingModel === n.PER_SEAT && /* @__PURE__ */ _("p", {
320
321
  className: "text-xs text-muted-foreground mb-4",
321
322
  children: ["per seat", e.minSeats ? ` · min ${e.minSeats} seat${e.minSeats === 1 ? "" : "s"}` : ""]
322
323
  }),
323
- e.pricingModel !== n.PER_SEAT && /* @__PURE__ */ h("div", { className: "mb-6" }),
324
- _.length > 0 && /* @__PURE__ */ g("ul", {
324
+ e.pricingModel !== n.PER_SEAT && /* @__PURE__ */ g("div", { className: "mb-6" }),
325
+ h.length > 0 && /* @__PURE__ */ _("ul", {
325
326
  className: "space-y-2 mb-6",
326
- children: [_.slice(0, 5).map((e) => /* @__PURE__ */ g("li", {
327
+ children: [h.slice(0, 5).map((e) => /* @__PURE__ */ _("li", {
327
328
  className: "flex items-center justify-between text-sm",
328
- children: [/* @__PURE__ */ g("div", {
329
+ children: [/* @__PURE__ */ _("div", {
329
330
  className: "flex items-center gap-2",
330
- children: [/* @__PURE__ */ h("svg", {
331
+ children: [/* @__PURE__ */ g("svg", {
331
332
  className: "size-5 text-status-success-text shrink-0",
332
333
  fill: "none",
333
334
  viewBox: "0 0 24 24",
334
335
  stroke: "currentColor",
335
- children: /* @__PURE__ */ h("path", {
336
+ children: /* @__PURE__ */ g("path", {
336
337
  strokeLinecap: "round",
337
338
  strokeLinejoin: "round",
338
339
  strokeWidth: 2,
339
340
  d: "M5 13l4 4L19 7"
340
341
  })
341
- }), /* @__PURE__ */ h("span", {
342
+ }), /* @__PURE__ */ g("span", {
342
343
  className: "text-foreground",
343
344
  children: e.name
344
345
  })]
345
- }), /* @__PURE__ */ h("span", {
346
+ }), /* @__PURE__ */ g("span", {
346
347
  className: "font-medium text-foreground",
347
348
  children: e.totalValue.toLocaleString()
348
349
  })]
349
- }, e.quotaId)), _.length > 5 && /* @__PURE__ */ g("li", {
350
+ }, e.quotaId)), h.length > 5 && /* @__PURE__ */ _("li", {
350
351
  className: "text-sm text-muted-foreground pl-7",
351
352
  children: [
352
353
  "+",
353
- _.length - 5,
354
+ h.length - 5,
354
355
  " more quotas"
355
356
  ]
356
357
  })]
357
358
  }),
358
- /* @__PURE__ */ g("div", {
359
+ /* @__PURE__ */ _("div", {
359
360
  className: "space-y-2 pt-4 border-t border-border mt-auto",
360
- children: [c && e.isActive && /* @__PURE__ */ h("button", {
361
+ children: [c && e.isActive && /* @__PURE__ */ g("button", {
361
362
  type: "button",
362
363
  onClick: () => t(e),
363
364
  className: "w-full px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
364
365
  children: "Select Plan"
365
- }), /* @__PURE__ */ g("div", {
366
+ }), /* @__PURE__ */ _("div", {
366
367
  className: "flex gap-2",
367
- children: [/* @__PURE__ */ h("button", {
368
+ children: [/* @__PURE__ */ g("button", {
368
369
  type: "button",
369
370
  onClick: () => o(e),
370
371
  className: "flex-1 px-4 py-2 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
371
372
  children: "View Details"
372
- }), d && /* @__PURE__ */ h("button", {
373
+ }), l && /* @__PURE__ */ g("button", {
373
374
  type: "button",
374
375
  onClick: () => s(e),
375
376
  disabled: f,
@@ -380,23 +381,23 @@ var y = () => {
380
381
  })
381
382
  ]
382
383
  });
383
- }, x = ({ plan: e, onSelect: t, onView: n, onToggle: a, canSelect: o, canManage: s, isToggling: c }) => {
384
- let d = u(), f = p(() => v(e.features || []), [e.features]);
385
- return /* @__PURE__ */ g("div", {
384
+ }, S = ({ plan: e, onSelect: t, onView: n, onToggle: a, canSelect: o, canManage: s, isToggling: c }) => {
385
+ let l = d(), f = m(() => y(e.features || []), [e.features]);
386
+ return /* @__PURE__ */ _("div", {
386
387
  className: `flex items-center gap-4 p-4 border rounded-lg transition-all hover:shadow-sm ${e.isActive ? "border-border bg-card" : "border-dashed border-muted-foreground/30 bg-muted/30"}`,
387
388
  children: [
388
- /* @__PURE__ */ g("div", {
389
+ /* @__PURE__ */ _("div", {
389
390
  className: "flex-1 min-w-0",
390
- children: [/* @__PURE__ */ g("div", {
391
+ children: [/* @__PURE__ */ _("div", {
391
392
  className: "flex items-center gap-2",
392
- children: [/* @__PURE__ */ h("h3", {
393
+ children: [/* @__PURE__ */ g("h3", {
393
394
  className: "font-semibold text-foreground truncate",
394
395
  children: e.name
395
- }), !e.isActive && /* @__PURE__ */ h("span", {
396
+ }), !e.isActive && /* @__PURE__ */ g("span", {
396
397
  className: "px-2 py-0.5 text-xs font-medium bg-muted text-muted-foreground rounded",
397
398
  children: "Inactive"
398
399
  })]
399
- }), /* @__PURE__ */ g("p", {
400
+ }), /* @__PURE__ */ _("p", {
400
401
  className: "text-sm text-muted-foreground",
401
402
  children: [
402
403
  f.length,
@@ -406,35 +407,35 @@ var y = () => {
406
407
  ]
407
408
  })]
408
409
  }),
409
- /* @__PURE__ */ g("div", {
410
+ /* @__PURE__ */ _("div", {
410
411
  className: "text-right",
411
- children: [/* @__PURE__ */ h("div", {
412
+ children: [/* @__PURE__ */ g("div", {
412
413
  className: "font-semibold text-foreground",
413
414
  children: (() => {
414
- let { price: t, currency: n } = l(e.price, e.currency, e.currencyPrices, d);
415
+ let { price: t, currency: n } = u(e.price, e.currency, e.currencyPrices, l);
415
416
  return r(t, n);
416
417
  })()
417
- }), /* @__PURE__ */ g("div", {
418
+ }), /* @__PURE__ */ _("div", {
418
419
  className: "text-sm text-muted-foreground",
419
420
  children: ["per ", i(e.duration)]
420
421
  })]
421
422
  }),
422
- /* @__PURE__ */ g("div", {
423
+ /* @__PURE__ */ _("div", {
423
424
  className: "flex items-center gap-2",
424
425
  children: [
425
- o && e.isActive && /* @__PURE__ */ h("button", {
426
+ o && e.isActive && /* @__PURE__ */ g("button", {
426
427
  type: "button",
427
428
  onClick: () => t(e),
428
429
  className: "px-3 py-1.5 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
429
430
  children: "Select"
430
431
  }),
431
- /* @__PURE__ */ h("button", {
432
+ /* @__PURE__ */ g("button", {
432
433
  type: "button",
433
434
  onClick: () => n(e),
434
435
  className: "px-3 py-1.5 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
435
436
  children: "View"
436
437
  }),
437
- s && /* @__PURE__ */ h("button", {
438
+ s && /* @__PURE__ */ g("button", {
438
439
  type: "button",
439
440
  onClick: () => a(e),
440
441
  disabled: c,
@@ -447,6 +448,6 @@ var y = () => {
447
448
  });
448
449
  };
449
450
  //#endregion
450
- export { y as PlansListPage };
451
+ export { b as PlansListPage };
451
452
 
452
453
  //# sourceMappingURL=PlansListPage.js.map