@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.
@@ -5,39 +5,40 @@ import { CurrencyPriceOverridesEditor as r } from "../../../shared/components/Cu
5
5
  import "../../../shared/components/index.js";
6
6
  import { PlanDuration as i } from "../../../shared/types/graphql.js";
7
7
  import { isServerError as a } from "../../../shared/utils/error.js";
8
+ import { getPlanFeatureQuantity as o } from "../../../shared/utils/planFeatureQuantity.js";
8
9
  import "../../../shared/utils/index.js";
9
- import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
10
- import { useBillingNavigate as s } from "../../../hooks/useBillingNavigate.js";
11
- import { usePlan as c, usePlanMutations as l } from "../hooks/usePlans.js";
12
- import { useQuotas as u } from "../hooks/useQuotas.js";
10
+ import { useBillingPermissions as s } from "../../../hooks/useBillingPermissions.js";
11
+ import { useBillingNavigate as c } from "../../../hooks/useBillingNavigate.js";
12
+ import { usePlan as l, usePlanMutations as u } from "../hooks/usePlans.js";
13
+ import { useQuotas as d } from "../hooks/useQuotas.js";
13
14
  import "../hooks/index.js";
14
- import { useEffect as d, useState as f } from "react";
15
- import { useParams as p } from "react-router-dom";
16
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
17
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ import { useEffect as f, useState as p } from "react";
16
+ import { useParams as m } from "react-router-dom";
17
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
18
+ import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
19
  //#region src/billing/modules/plans/pages/PlanEditPage.tsx
19
- var v = () => {
20
- let { t: v } = _(), y = (e, t) => {
21
- let n = v(e);
20
+ var y = () => {
21
+ let { t: y } = v(), b = (e, t) => {
22
+ let n = y(e);
22
23
  return n === e ? t : n;
23
- }, { planId: b } = p(), x = s(), S = o(), { plan: C, isLoading: w, error: T, refetch: E } = c(b), { quotas: D, isLoading: O } = u({ onlyActive: !0 }), { updatePlan: k, isUpdating: A } = l(), [j, M] = f(""), [N, P] = f(""), [F, I] = f("USD"), [L, R] = f(i.MONTHLY), [z, B] = f(!0), [V, H] = f([]), [U, W] = f([]), [G, K] = f(null), [q, J] = f(!1);
24
- if (d(() => {
25
- if (C && (M(C.name ?? ""), P(String(C.price ?? "")), I(C.currency ?? "USD"), R(C.duration ?? i.MONTHLY), B(C.isActive ?? !0), C.features && C.features.length > 0)) {
24
+ }, { planId: x } = m(), S = c(), C = s(), { plan: w, isLoading: T, error: E, refetch: D } = l(x), { quotas: O, isLoading: k } = d({ onlyActive: !0 }), { updatePlan: A, isUpdating: j } = u(), [M, N] = p(""), [P, F] = p(""), [I, L] = p("USD"), [R, z] = p(i.MONTHLY), [B, V] = p(!0), [H, U] = p([]), [W, G] = p([]), [K, q] = p(null), [J, Y] = p(!1);
25
+ if (f(() => {
26
+ if (w && (N(w.name ?? ""), F(String(w.price ?? "")), L(w.currency ?? "USD"), z(w.duration ?? i.MONTHLY), V(w.isActive ?? !0), w.features && w.features.length > 0)) {
26
27
  let e = [], t = /* @__PURE__ */ new Map();
27
- for (let e of C.features) if (e.quota?.id) {
28
- let n = e.quota.id, r = e.quota.limits?.value ?? 1;
29
- t.set(n, (t.get(n) ?? 0) + r);
28
+ for (let e of w.features) if (e.quota?.id) {
29
+ let n = e.quota.id, r = o(e) || 1;
30
+ t.set(n, r);
30
31
  }
31
32
  for (let [n, r] of t) e.push({
32
33
  quotaId: n,
33
34
  quantity: r
34
35
  });
35
- H(e);
36
+ U(e);
36
37
  }
37
- }, [C]), !S.canManagePlans) return /* @__PURE__ */ h(e, { message: y("billing.plans.noEditPermission", "You don't have permission to edit plans.") });
38
- if (w || O) return /* @__PURE__ */ g("div", {
38
+ }, [w]), !C.canManagePlans) return /* @__PURE__ */ g(e, { message: b("billing.plans.noEditPermission", "You don't have permission to edit plans.") });
39
+ if (T || k) return /* @__PURE__ */ _("div", {
39
40
  className: "space-y-6 p-6",
40
- children: [/* @__PURE__ */ h("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ h("div", {
41
+ children: [/* @__PURE__ */ g("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ g("div", {
41
42
  className: "max-w-2xl space-y-4",
42
43
  children: [
43
44
  1,
@@ -45,269 +46,269 @@ var v = () => {
45
46
  3,
46
47
  4,
47
48
  5
48
- ].map((e) => /* @__PURE__ */ h("div", { className: "h-16 bg-muted animate-pulse rounded" }, e))
49
+ ].map((e) => /* @__PURE__ */ g("div", { className: "h-16 bg-muted animate-pulse rounded" }, e))
49
50
  })]
50
51
  });
51
- if (T && a(T)) return /* @__PURE__ */ h("div", {
52
+ if (E && a(E)) return /* @__PURE__ */ g("div", {
52
53
  className: "p-6",
53
- children: /* @__PURE__ */ h(n, {
54
- title: y("billing.plans.serverUnavailable", "Server Unavailable"),
55
- message: y("billing.plans.serverUnavailableLoadPlan", "Unable to load plan. The server might be down or experiencing issues."),
56
- onRetry: () => E(),
54
+ children: /* @__PURE__ */ g(n, {
55
+ title: b("billing.plans.serverUnavailable", "Server Unavailable"),
56
+ message: b("billing.plans.serverUnavailableLoadPlan", "Unable to load plan. The server might be down or experiencing issues."),
57
+ onRetry: () => D(),
57
58
  showRetry: !0
58
59
  })
59
60
  });
60
- if (!C) return /* @__PURE__ */ h("div", {
61
+ if (!w) return /* @__PURE__ */ g("div", {
61
62
  className: "flex items-center justify-center h-full min-h-[400px]",
62
- children: /* @__PURE__ */ g("div", {
63
+ children: /* @__PURE__ */ _("div", {
63
64
  className: "text-center space-y-4",
64
- children: [/* @__PURE__ */ h("h2", {
65
+ children: [/* @__PURE__ */ g("h2", {
65
66
  className: "text-lg font-semibold text-foreground",
66
- children: y("billing.plans.planNotFound", "Plan not found")
67
- }), /* @__PURE__ */ h("button", {
67
+ children: b("billing.plans.planNotFound", "Plan not found")
68
+ }), /* @__PURE__ */ g("button", {
68
69
  type: "button",
69
- onClick: () => x("/plans"),
70
+ onClick: () => S("/plans"),
70
71
  className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90",
71
72
  children: "Back to Plans"
72
73
  })]
73
74
  })
74
75
  });
75
- let Y = () => {
76
- H([{
76
+ let X = () => {
77
+ U([{
77
78
  quotaId: "",
78
79
  quantity: 1
79
- }, ...V]);
80
- }, X = (e) => {
81
- H(V.filter((t, n) => n !== e));
82
- }, Z = (e, t, n) => {
83
- let r = [...V];
84
- t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), H(r);
80
+ }, ...H]);
81
+ }, Z = (e) => {
82
+ U(H.filter((t, n) => n !== e));
83
+ }, Q = (e, t, n) => {
84
+ let r = [...H];
85
+ t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), U(r);
85
86
  };
86
- return /* @__PURE__ */ g("div", {
87
+ return /* @__PURE__ */ _("div", {
87
88
  className: "space-y-6 p-6",
88
- children: [/* @__PURE__ */ h(t, {
89
- title: `Edit Plan: ${C.name}`,
90
- description: y("billing.plans.editPlanDesc", "Update the plan details and quota allocations")
91
- }), /* @__PURE__ */ g("form", {
89
+ children: [/* @__PURE__ */ g(t, {
90
+ title: `Edit Plan: ${w.name}`,
91
+ description: b("billing.plans.editPlanDesc", "Update the plan details and quota allocations")
92
+ }), /* @__PURE__ */ _("form", {
92
93
  onSubmit: async (e) => {
93
- if (e.preventDefault(), K(null), J(!1), !j.trim()) {
94
- K("Plan name is required");
94
+ if (e.preventDefault(), q(null), Y(!1), !M.trim()) {
95
+ q("Plan name is required");
95
96
  return;
96
97
  }
97
- if (!N || isNaN(Number(N)) || Number(N) < 0) {
98
- K("Valid price is required");
98
+ if (!P || isNaN(Number(P)) || Number(P) < 0) {
99
+ q("Valid price is required");
99
100
  return;
100
101
  }
101
- if (V.length === 0) {
102
- K("At least one quota is required");
102
+ if (H.length === 0) {
103
+ q("At least one quota is required");
103
104
  return;
104
105
  }
105
- if (V.filter((e) => e.quotaId === "").length > 0) {
106
- K("Please select a quota for all allocations");
106
+ if (H.filter((e) => e.quotaId === "").length > 0) {
107
+ q("Please select a quota for all allocations");
107
108
  return;
108
109
  }
109
110
  let t = {
110
- id: b,
111
- name: j.trim(),
112
- price: Number(N),
113
- currency: F,
114
- duration: L,
115
- isActive: z,
116
- quotas: V.map((e) => ({
111
+ id: x,
112
+ name: M.trim(),
113
+ price: Number(P),
114
+ currency: I,
115
+ duration: R,
116
+ isActive: B,
117
+ quotas: H.map((e) => ({
117
118
  quotaId: e.quotaId,
118
119
  quantity: e.quantity
119
120
  })),
120
- ...U.length > 0 ? { currencyPriceOverrides: U } : {}
121
+ ...W.length > 0 ? { currencyPriceOverrides: W } : {}
121
122
  };
122
123
  try {
123
- await k(t), J(!0), setTimeout(() => x(`/plans/${b}`), 1500);
124
+ await A(t), Y(!0), setTimeout(() => S(`/plans/${x}`), 1500);
124
125
  } catch (e) {
125
- K(e instanceof Error ? e.message : "Failed to update plan");
126
+ q(e instanceof Error ? e.message : "Failed to update plan");
126
127
  }
127
128
  },
128
129
  className: "space-y-6",
129
130
  children: [
130
- G && /* @__PURE__ */ h("div", {
131
+ K && /* @__PURE__ */ g("div", {
131
132
  className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
132
- children: /* @__PURE__ */ h("p", {
133
+ children: /* @__PURE__ */ g("p", {
133
134
  className: "text-sm text-status-error-text",
134
- children: G
135
+ children: K
135
136
  })
136
137
  }),
137
- q && /* @__PURE__ */ h("div", {
138
+ J && /* @__PURE__ */ g("div", {
138
139
  className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
139
- children: /* @__PURE__ */ h("p", {
140
+ children: /* @__PURE__ */ g("p", {
140
141
  className: "text-sm text-status-success-text",
141
- children: y("billing.plans.updateSuccess", "Plan updated successfully! Redirecting...")
142
+ children: b("billing.plans.updateSuccess", "Plan updated successfully! Redirecting...")
142
143
  })
143
144
  }),
144
- /* @__PURE__ */ g("div", {
145
+ /* @__PURE__ */ _("div", {
145
146
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
146
- children: [/* @__PURE__ */ g("div", {
147
+ children: [/* @__PURE__ */ _("div", {
147
148
  className: "border border-border rounded-lg bg-card overflow-hidden h-fit",
148
- children: [/* @__PURE__ */ h("div", {
149
+ children: [/* @__PURE__ */ g("div", {
149
150
  className: "p-4 border-b border-border bg-muted/30",
150
- children: /* @__PURE__ */ h("h2", {
151
+ children: /* @__PURE__ */ g("h2", {
151
152
  className: "font-semibold text-foreground",
152
- children: y("billing.plans.basicInfo", "Basic Information")
153
+ children: b("billing.plans.basicInfo", "Basic Information")
153
154
  })
154
- }), /* @__PURE__ */ g("div", {
155
+ }), /* @__PURE__ */ _("div", {
155
156
  className: "p-4 space-y-4",
156
157
  children: [
157
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
158
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
158
159
  htmlFor: "name",
159
160
  className: "block text-sm font-medium text-foreground mb-1",
160
- children: [y("billing.plans.planNameLabel", "Plan Name"), " *"]
161
- }), /* @__PURE__ */ h("input", {
161
+ children: [b("billing.plans.planNameLabel", "Plan Name"), " *"]
162
+ }), /* @__PURE__ */ g("input", {
162
163
  id: "name",
163
164
  type: "text",
164
- value: j,
165
- onChange: (e) => M(e.target.value),
165
+ value: M,
166
+ onChange: (e) => N(e.target.value),
166
167
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
167
- placeholder: y("billing.plans.planNamePlaceholder", "e.g., Pro Plan"),
168
+ placeholder: b("billing.plans.planNamePlaceholder", "e.g., Pro Plan"),
168
169
  required: !0
169
170
  })] }),
170
- /* @__PURE__ */ g("div", {
171
+ /* @__PURE__ */ _("div", {
171
172
  className: "grid grid-cols-2 gap-4",
172
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
173
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
173
174
  htmlFor: "price",
174
175
  className: "block text-sm font-medium text-foreground mb-1",
175
- children: [y("billing.plans.priceLabel", "Price"), " *"]
176
- }), /* @__PURE__ */ h("input", {
176
+ children: [b("billing.plans.priceLabel", "Price"), " *"]
177
+ }), /* @__PURE__ */ g("input", {
177
178
  id: "price",
178
179
  type: "number",
179
180
  step: "0.01",
180
181
  min: "0",
181
- value: N,
182
- onChange: (e) => P(e.target.value),
182
+ value: P,
183
+ onChange: (e) => F(e.target.value),
183
184
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
184
185
  placeholder: "49.99",
185
186
  required: !0
186
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
187
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
187
188
  htmlFor: "currency",
188
189
  className: "block text-sm font-medium text-foreground mb-1",
189
- children: [y("billing.plans.currencyLabel", "Currency"), " *"]
190
- }), /* @__PURE__ */ g("select", {
190
+ children: [b("billing.plans.currencyLabel", "Currency"), " *"]
191
+ }), /* @__PURE__ */ _("select", {
191
192
  id: "currency",
192
- value: F,
193
- onChange: (e) => I(e.target.value),
193
+ value: I,
194
+ onChange: (e) => L(e.target.value),
194
195
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
195
196
  children: [
196
- /* @__PURE__ */ h("option", {
197
+ /* @__PURE__ */ g("option", {
197
198
  value: "USD",
198
199
  children: "USD ($)"
199
200
  }),
200
- /* @__PURE__ */ h("option", {
201
+ /* @__PURE__ */ g("option", {
201
202
  value: "EUR",
202
203
  children: "EUR"
203
204
  }),
204
- /* @__PURE__ */ h("option", {
205
+ /* @__PURE__ */ g("option", {
205
206
  value: "GBP",
206
207
  children: "GBP"
207
208
  }),
208
- /* @__PURE__ */ h("option", {
209
+ /* @__PURE__ */ g("option", {
209
210
  value: "INR",
210
211
  children: "INR"
211
212
  }),
212
- /* @__PURE__ */ h("option", {
213
+ /* @__PURE__ */ g("option", {
213
214
  value: "AUD",
214
215
  children: "AUD"
215
216
  }),
216
- /* @__PURE__ */ h("option", {
217
+ /* @__PURE__ */ g("option", {
217
218
  value: "CAD",
218
219
  children: "CAD"
219
220
  }),
220
- /* @__PURE__ */ h("option", {
221
+ /* @__PURE__ */ g("option", {
221
222
  value: "JPY",
222
223
  children: "JPY"
223
224
  }),
224
- /* @__PURE__ */ h("option", {
225
+ /* @__PURE__ */ g("option", {
225
226
  value: "SGD",
226
227
  children: "SGD"
227
228
  })
228
229
  ]
229
230
  })] })]
230
231
  }),
231
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
232
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
232
233
  htmlFor: "duration",
233
234
  className: "block text-sm font-medium text-foreground mb-1",
234
- children: [y("billing.plans.billingPeriodLabel", "Billing Period"), " *"]
235
- }), /* @__PURE__ */ g("select", {
235
+ children: [b("billing.plans.billingPeriodLabel", "Billing Period"), " *"]
236
+ }), /* @__PURE__ */ _("select", {
236
237
  id: "duration",
237
- value: L,
238
- onChange: (e) => R(e.target.value),
238
+ value: R,
239
+ onChange: (e) => z(e.target.value),
239
240
  className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary",
240
- children: [/* @__PURE__ */ h("option", {
241
+ children: [/* @__PURE__ */ g("option", {
241
242
  value: i.MONTHLY,
242
243
  children: "Monthly"
243
- }), /* @__PURE__ */ h("option", {
244
+ }), /* @__PURE__ */ g("option", {
244
245
  value: i.YEARLY,
245
246
  children: "Yearly"
246
247
  })]
247
248
  })] }),
248
- /* @__PURE__ */ g("div", {
249
+ /* @__PURE__ */ _("div", {
249
250
  className: "flex items-center gap-3",
250
- children: [/* @__PURE__ */ h("input", {
251
+ children: [/* @__PURE__ */ g("input", {
251
252
  id: "isActive",
252
253
  type: "checkbox",
253
- checked: z,
254
- onChange: (e) => B(e.target.checked),
254
+ checked: B,
255
+ onChange: (e) => V(e.target.checked),
255
256
  className: "size-4 rounded border-border text-primary focus:ring-primary"
256
- }), /* @__PURE__ */ h("label", {
257
+ }), /* @__PURE__ */ g("label", {
257
258
  htmlFor: "isActive",
258
259
  className: "text-sm font-medium text-foreground",
259
- children: y("billing.plans.planIsActive", "Plan is active")
260
+ children: b("billing.plans.planIsActive", "Plan is active")
260
261
  })]
261
262
  })
262
263
  ]
263
264
  })]
264
- }), /* @__PURE__ */ g("div", {
265
+ }), /* @__PURE__ */ _("div", {
265
266
  className: "border border-border rounded-lg bg-card overflow-hidden h-fit",
266
- children: [/* @__PURE__ */ g("div", {
267
+ children: [/* @__PURE__ */ _("div", {
267
268
  className: "p-4 border-b border-border bg-muted/30 flex items-center justify-between",
268
- children: [/* @__PURE__ */ h("h2", {
269
+ children: [/* @__PURE__ */ g("h2", {
269
270
  className: "font-semibold text-foreground",
270
- children: y("billing.plans.quotaAllocations", "Quota Allocations")
271
- }), /* @__PURE__ */ h("button", {
271
+ children: b("billing.plans.quotaAllocations", "Quota Allocations")
272
+ }), /* @__PURE__ */ g("button", {
272
273
  type: "button",
273
- onClick: Y,
274
+ onClick: X,
274
275
  className: "px-3 py-1 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",
275
276
  children: "+ Add Quota"
276
277
  })]
277
- }), /* @__PURE__ */ h("div", {
278
+ }), /* @__PURE__ */ g("div", {
278
279
  className: "p-4 space-y-3",
279
- children: V.length === 0 ? /* @__PURE__ */ h("p", {
280
+ children: H.length === 0 ? /* @__PURE__ */ g("p", {
280
281
  className: "text-sm text-muted-foreground",
281
- children: y("billing.plans.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
282
- }) : V.map((e, t) => {
283
- let n = D.find((t) => t.id === e.quotaId), r = n?.limits, i = r?.value ?? 0, a = r?.type ?? "unknown", o = i * e.quantity;
284
- return /* @__PURE__ */ g("div", {
282
+ children: b("billing.plans.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
283
+ }) : H.map((e, t) => {
284
+ let n = O.find((t) => t.id === e.quotaId), r = n?.limits, i = r?.value ?? 0, a = r?.type ?? "unknown", o = i * e.quantity;
285
+ return /* @__PURE__ */ _("div", {
285
286
  className: "p-3 border border-border rounded-lg bg-muted/20 space-y-3",
286
- children: [/* @__PURE__ */ g("div", {
287
+ children: [/* @__PURE__ */ _("div", {
287
288
  className: "flex items-center gap-3",
288
- children: [/* @__PURE__ */ g("select", {
289
+ children: [/* @__PURE__ */ _("select", {
289
290
  value: e.quotaId,
290
- onChange: (e) => Z(t, "quotaId", e.target.value),
291
+ onChange: (e) => Q(t, "quotaId", e.target.value),
291
292
  className: `flex-1 px-3 py-2 border border-border rounded-md bg-background focus:outline-none focus:ring-2 focus:ring-primary ${e.quotaId === "" ? "text-muted-foreground" : "text-foreground"}`,
292
- children: [/* @__PURE__ */ h("option", {
293
+ children: [/* @__PURE__ */ g("option", {
293
294
  value: "",
294
295
  disabled: !0,
295
- children: y("billing.plans.selectQuota", "Select a quota...")
296
- }), D.map((e) => /* @__PURE__ */ h("option", {
296
+ children: b("billing.plans.selectQuota", "Select a quota...")
297
+ }), O.map((e) => /* @__PURE__ */ g("option", {
297
298
  value: e.id,
298
299
  children: e.name
299
300
  }, e.id))]
300
- }), /* @__PURE__ */ h("button", {
301
+ }), /* @__PURE__ */ g("button", {
301
302
  type: "button",
302
- onClick: () => X(t),
303
+ onClick: () => Z(t),
303
304
  className: "p-2 text-status-error-text hover:bg-status-error-bg-subtle rounded-md transition-colors",
304
305
  title: "Remove quota",
305
- children: /* @__PURE__ */ h("svg", {
306
+ children: /* @__PURE__ */ g("svg", {
306
307
  className: "size-5",
307
308
  fill: "none",
308
309
  viewBox: "0 0 24 24",
309
310
  stroke: "currentColor",
310
- children: /* @__PURE__ */ h("path", {
311
+ children: /* @__PURE__ */ g("path", {
311
312
  strokeLinecap: "round",
312
313
  strokeLinejoin: "round",
313
314
  strokeWidth: 2,
@@ -315,49 +316,49 @@ var v = () => {
315
316
  })
316
317
  })
317
318
  })]
318
- }), n && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
319
+ }), n && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
319
320
  className: "flex items-center justify-between text-sm",
320
- children: /* @__PURE__ */ g("div", {
321
+ children: /* @__PURE__ */ _("div", {
321
322
  className: "text-muted-foreground",
322
323
  children: [
323
- /* @__PURE__ */ g("span", {
324
+ /* @__PURE__ */ _("span", {
324
325
  className: "capitalize",
325
326
  children: ["Type: ", a]
326
327
  }),
327
- /* @__PURE__ */ h("span", {
328
+ /* @__PURE__ */ g("span", {
328
329
  className: "mx-2",
329
330
  children: "•"
330
331
  }),
331
- /* @__PURE__ */ g("span", { children: [
332
+ /* @__PURE__ */ _("span", { children: [
332
333
  "Value per unit:",
333
334
  " ",
334
- /* @__PURE__ */ h("span", {
335
+ /* @__PURE__ */ g("span", {
335
336
  className: "font-medium text-foreground",
336
337
  children: i.toLocaleString()
337
338
  })
338
339
  ] })
339
340
  ]
340
341
  })
341
- }), /* @__PURE__ */ g("div", {
342
+ }), /* @__PURE__ */ _("div", {
342
343
  className: "flex items-center gap-4",
343
- children: [/* @__PURE__ */ g("div", {
344
+ children: [/* @__PURE__ */ _("div", {
344
345
  className: "flex items-center gap-2",
345
- children: [/* @__PURE__ */ g("label", {
346
+ children: [/* @__PURE__ */ _("label", {
346
347
  className: "text-sm text-muted-foreground",
347
- children: [y("billing.plans.quantity", "Quantity"), ":"]
348
- }), /* @__PURE__ */ h("input", {
348
+ children: [b("billing.plans.quantity", "Quantity"), ":"]
349
+ }), /* @__PURE__ */ g("input", {
349
350
  type: "number",
350
351
  min: "1",
351
352
  value: e.quantity,
352
- onChange: (e) => Z(t, "quantity", e.target.value),
353
+ onChange: (e) => Q(t, "quantity", e.target.value),
353
354
  className: "w-24 px-3 py-1.5 border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary text-center"
354
355
  })]
355
- }), /* @__PURE__ */ g("div", {
356
+ }), /* @__PURE__ */ _("div", {
356
357
  className: "flex items-center gap-2 text-sm",
357
- children: [/* @__PURE__ */ h("span", {
358
+ children: [/* @__PURE__ */ g("span", {
358
359
  className: "text-muted-foreground",
359
360
  children: "="
360
- }), /* @__PURE__ */ g("span", {
361
+ }), /* @__PURE__ */ _("span", {
361
362
  className: "font-semibold text-status-success-text",
362
363
  children: [o.toLocaleString(), " total"]
363
364
  })]
@@ -368,20 +369,20 @@ var v = () => {
368
369
  })]
369
370
  })]
370
371
  }),
371
- /* @__PURE__ */ h(r, {
372
- overrides: U,
373
- onChange: W
372
+ /* @__PURE__ */ g(r, {
373
+ overrides: W,
374
+ onChange: G
374
375
  }),
375
- /* @__PURE__ */ g("div", {
376
+ /* @__PURE__ */ _("div", {
376
377
  className: "flex items-center gap-3 pt-4",
377
- children: [/* @__PURE__ */ h("button", {
378
+ children: [/* @__PURE__ */ g("button", {
378
379
  type: "submit",
379
- disabled: A,
380
+ disabled: j,
380
381
  className: "px-6 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors disabled:opacity-50",
381
- children: A ? y("billing.plans.saving", "Saving...") : y("billing.plans.saveChanges", "Save Changes")
382
- }), /* @__PURE__ */ h("button", {
382
+ children: j ? b("billing.plans.saving", "Saving...") : b("billing.plans.saveChanges", "Save Changes")
383
+ }), /* @__PURE__ */ g("button", {
383
384
  type: "button",
384
- onClick: () => x(`/plans/${b}`),
385
+ onClick: () => S(`/plans/${x}`),
385
386
  className: "px-6 py-2 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
386
387
  children: "Cancel"
387
388
  })]
@@ -391,6 +392,6 @@ var v = () => {
391
392
  });
392
393
  };
393
394
  //#endregion
394
- export { v as PlanEditPage };
395
+ export { y as PlanEditPage };
395
396
 
396
397
  //# sourceMappingURL=PlanEditPage.js.map