@burdenoff/microfe-billing 2026.1116.1 → 2026.1119.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.
Files changed (62) hide show
  1. package/dist/billing/modules/addons/pages/AddonCreatePage.js +143 -143
  2. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonEditPage.js +170 -170
  4. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  5. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +148 -148
  6. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  7. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +115 -115
  8. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
  9. package/dist/billing/modules/billing/pages/InvoicesListPage.js +136 -136
  10. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  11. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +129 -129
  12. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
  13. package/dist/billing/modules/billing/pages/RefundsPage.js +325 -325
  14. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  15. package/dist/billing/modules/billing/pages/UserRefundsPage.js +149 -149
  16. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  17. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +99 -98
  18. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  19. package/dist/billing/modules/checkout/components/StoreShippingSection.js +125 -124
  20. package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
  21. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +61 -60
  22. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  23. package/dist/billing/modules/coupons/pages/CouponsListPage.js +177 -177
  24. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  25. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +231 -231
  26. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  27. package/dist/billing/modules/coupons/pages/EditCouponPage.js +139 -139
  28. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  29. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +54 -54
  30. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  31. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +65 -65
  32. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  33. package/dist/billing/modules/credits/pages/CreditsPage.js +95 -95
  34. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  35. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +232 -231
  36. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  37. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +328 -328
  38. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  39. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +57 -57
  40. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  41. package/dist/billing/modules/earnings/pages/EarningsPage.js +53 -53
  42. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  43. package/dist/billing/modules/earnings/pages/PayoutsPage.js +100 -100
  44. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  45. package/dist/billing/modules/plans/pages/PlanCreatePage.js +150 -150
  46. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  47. package/dist/billing/modules/plans/pages/PlanEditPage.js +125 -125
  48. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  49. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +113 -113
  50. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  51. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +132 -132
  52. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  53. package/dist/billing/modules/settings/pages/SettingsPage.js +101 -101
  54. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  55. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +125 -125
  56. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  57. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +51 -50
  58. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
  59. package/dist/billing/modules/usage/pages/UsagePage.js +107 -107
  60. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  61. package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
  62. package/package.json +2 -2
@@ -9,19 +9,19 @@ import { usePlanMutations as a } from "../hooks/usePlans.js";
9
9
  import { useQuotas as o } from "../hooks/useQuotas.js";
10
10
  import { PlanDuration as s } from "../../../shared/types/graphql.js";
11
11
  import { useState as c } from "react";
12
- import { PagePurpose as l } from "@burdenoff/fe-libs/ui";
13
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
14
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { PagePurpose as l, ThemedSelect as u } from "@burdenoff/fe-libs/ui";
13
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
14
+ import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
15
  // src/billing/modules/plans/pages/PlanCreatePage.tsx
16
- var m = () => {
17
- let { t: m } = p(), h = (e, t) => {
18
- let n = m(e);
16
+ var h = () => {
17
+ let { t: h } = m(), g = (e, t) => {
18
+ let n = h(e);
19
19
  return n === e ? t : n;
20
- }, g = r(), _ = i(), { quotas: v, isLoading: y } = o({ onlyActive: !0 }), { createPlan: b, isCreating: x } = a(), [S, C] = c(""), [w, T] = c(""), [E, D] = c("USD"), [O, k] = c(s.MONTHLY), [A, j] = c(""), [M, N] = c(!0), [P, F] = c([]), [I, L] = c([]), [R, z] = c(null), [B, V] = c(!1);
21
- if (!_.canManagePlans) return /* @__PURE__ */ d(e, { message: h("billing.plans.noCreatePermission", "You don't have permission to create plans.") });
22
- if (y) return /* @__PURE__ */ f("div", {
20
+ }, _ = r(), v = i(), { quotas: y, isLoading: b } = o({ onlyActive: !0 }), { createPlan: x, isCreating: S } = a(), [C, w] = c(""), [T, E] = c(""), [D, O] = c("USD"), [k, A] = c(s.MONTHLY), [j, M] = c(""), [N, P] = c(!0), [F, I] = c([]), [L, R] = c([]), [z, B] = c(null), [V, H] = c(!1);
21
+ if (!v.canManagePlans) return /* @__PURE__ */ f(e, { message: g("billing.plans.noCreatePermission", "You don't have permission to create plans.") });
22
+ if (b) return /* @__PURE__ */ p("div", {
23
23
  className: "space-y-6 p-6",
24
- children: [/* @__PURE__ */ d("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ d("div", {
24
+ children: [/* @__PURE__ */ f("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ f("div", {
25
25
  className: "max-w-2xl space-y-4",
26
26
  children: [
27
27
  1,
@@ -29,279 +29,279 @@ var m = () => {
29
29
  3,
30
30
  4,
31
31
  5
32
- ].map((e) => /* @__PURE__ */ d("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
32
+ ].map((e) => /* @__PURE__ */ f("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
33
33
  })]
34
34
  });
35
- let H = () => {
36
- F([{
35
+ let U = () => {
36
+ I([{
37
37
  quotaId: "",
38
38
  quantity: 1
39
- }, ...P]);
40
- }, U = (e) => {
41
- F(P.filter((t, n) => n !== e));
42
- }, W = (e, t, n) => {
43
- let r = [...P];
44
- t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), F(r);
39
+ }, ...F]);
40
+ }, W = (e) => {
41
+ I(F.filter((t, n) => n !== e));
42
+ }, G = (e, t, n) => {
43
+ let r = [...F];
44
+ t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), I(r);
45
45
  };
46
- return /* @__PURE__ */ f("div", {
46
+ return /* @__PURE__ */ p("div", {
47
47
  className: "space-y-6 p-6",
48
48
  children: [
49
- /* @__PURE__ */ d(t, {
50
- title: h("billing.plans.createNewPlan", "Create New Plan"),
51
- description: h("billing.plans.createNewPlanDesc", "Set up a new pricing plan with quotas")
49
+ /* @__PURE__ */ f(t, {
50
+ title: g("billing.plans.createNewPlan", "Create New Plan"),
51
+ description: g("billing.plans.createNewPlanDesc", "Set up a new pricing plan with quotas")
52
52
  }),
53
- /* @__PURE__ */ d(l, { children: h("billing.plans.createPurpose", "Define a new subscription tier customers can buy — its price and billing period, optional per-currency and per-seat pricing, and the quotas it includes. Once active, it appears on the Plans page for purchase.") }),
54
- /* @__PURE__ */ f("form", {
53
+ /* @__PURE__ */ f(l, { children: g("billing.plans.createPurpose", "Define a new subscription tier customers can buy — its price and billing period, optional per-currency and per-seat pricing, and the quotas it includes. Once active, it appears on the Plans page for purchase.") }),
54
+ /* @__PURE__ */ p("form", {
55
55
  onSubmit: async (e) => {
56
- if (e.preventDefault(), z(null), V(!1), !S.trim()) {
57
- z("Plan name is required");
56
+ if (e.preventDefault(), B(null), H(!1), !C.trim()) {
57
+ B("Plan name is required");
58
58
  return;
59
59
  }
60
- if (!w || isNaN(Number(w)) || Number(w) < 0) {
61
- z("Valid price is required");
60
+ if (!T || isNaN(Number(T)) || Number(T) < 0) {
61
+ B("Valid price is required");
62
62
  return;
63
63
  }
64
- if (!A.trim()) {
65
- z("Product ID is required");
64
+ if (!j.trim()) {
65
+ B("Product ID is required");
66
66
  return;
67
67
  }
68
- if (P.length === 0) {
69
- z("At least one quota is required");
68
+ if (F.length === 0) {
69
+ B("At least one quota is required");
70
70
  return;
71
71
  }
72
- if (P.filter((e) => e.quotaId === "").length > 0) {
73
- z("Please select a quota for all allocations");
72
+ if (F.filter((e) => e.quotaId === "").length > 0) {
73
+ B("Please select a quota for all allocations");
74
74
  return;
75
75
  }
76
76
  let t = {
77
- name: S.trim(),
78
- price: Number(w),
79
- currency: E,
80
- duration: O,
81
- productId: A.trim(),
82
- isPurchasable: M,
83
- quotas: P.map((e) => ({
77
+ name: C.trim(),
78
+ price: Number(T),
79
+ currency: D,
80
+ duration: k,
81
+ productId: j.trim(),
82
+ isPurchasable: N,
83
+ quotas: F.map((e) => ({
84
84
  quotaId: e.quotaId,
85
85
  quantity: e.quantity
86
86
  })),
87
- ...I.length > 0 ? { currencyPriceOverrides: I } : {}
87
+ ...L.length > 0 ? { currencyPriceOverrides: L } : {}
88
88
  };
89
89
  try {
90
- await b(t), V(!0), setTimeout(() => g("/plans"), 1500);
90
+ await x(t), H(!0), setTimeout(() => _("/plans"), 1500);
91
91
  } catch (e) {
92
- z(e instanceof Error ? e.message : "Failed to create plan");
92
+ B(e instanceof Error ? e.message : "Failed to create plan");
93
93
  }
94
94
  },
95
95
  className: "space-y-6",
96
96
  children: [
97
- R && /* @__PURE__ */ d("div", {
97
+ z && /* @__PURE__ */ f("div", {
98
98
  className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
99
- children: /* @__PURE__ */ d("p", {
99
+ children: /* @__PURE__ */ f("p", {
100
100
  className: "text-sm text-status-error-text",
101
- children: R
101
+ children: z
102
102
  })
103
103
  }),
104
- B && /* @__PURE__ */ d("div", {
104
+ V && /* @__PURE__ */ f("div", {
105
105
  className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
106
- children: /* @__PURE__ */ d("p", {
106
+ children: /* @__PURE__ */ f("p", {
107
107
  className: "text-sm text-status-success-text",
108
- children: h("billing.plans.createSuccess", "Plan created successfully! Redirecting...")
108
+ children: g("billing.plans.createSuccess", "Plan created successfully! Redirecting...")
109
109
  })
110
110
  }),
111
- /* @__PURE__ */ f("div", {
111
+ /* @__PURE__ */ p("div", {
112
112
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
113
- children: [/* @__PURE__ */ f("div", {
113
+ children: [/* @__PURE__ */ p("div", {
114
114
  className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
115
- children: [/* @__PURE__ */ d("div", {
115
+ children: [/* @__PURE__ */ f("div", {
116
116
  className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
117
- children: /* @__PURE__ */ d("h2", {
117
+ children: /* @__PURE__ */ f("h2", {
118
118
  className: "font-semibold text-text-primary",
119
- children: h("billing.plans.basicInfo", "Basic Information")
119
+ children: g("billing.plans.basicInfo", "Basic Information")
120
120
  })
121
- }), /* @__PURE__ */ f("div", {
121
+ }), /* @__PURE__ */ p("div", {
122
122
  className: "p-4 space-y-4",
123
123
  children: [
124
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
124
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
125
125
  htmlFor: "name",
126
126
  className: "block text-sm font-medium text-text-primary mb-1",
127
- children: [h("billing.plans.planNameLabel", "Plan Name"), " *"]
128
- }), /* @__PURE__ */ d("input", {
127
+ children: [g("billing.plans.planNameLabel", "Plan Name"), " *"]
128
+ }), /* @__PURE__ */ f("input", {
129
129
  id: "name",
130
130
  type: "text",
131
- value: S,
132
- onChange: (e) => C(e.target.value),
131
+ value: C,
132
+ onChange: (e) => w(e.target.value),
133
133
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
134
- placeholder: h("billing.plans.planNamePlaceholder", "e.g., Pro Plan"),
134
+ placeholder: g("billing.plans.planNamePlaceholder", "e.g., Pro Plan"),
135
135
  required: !0
136
136
  })] }),
137
- /* @__PURE__ */ f("div", { children: [
138
- /* @__PURE__ */ f("label", {
137
+ /* @__PURE__ */ p("div", { children: [
138
+ /* @__PURE__ */ p("label", {
139
139
  htmlFor: "productId",
140
140
  className: "block text-sm font-medium text-text-primary mb-1",
141
- children: [h("billing.plans.productId", "Product ID"), " *"]
141
+ children: [g("billing.plans.productId", "Product ID"), " *"]
142
142
  }),
143
- /* @__PURE__ */ d("input", {
143
+ /* @__PURE__ */ f("input", {
144
144
  id: "productId",
145
145
  type: "text",
146
- value: A,
147
- onChange: (e) => j(e.target.value),
146
+ value: j,
147
+ onChange: (e) => M(e.target.value),
148
148
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
149
- placeholder: h("billing.plans.productIdPlaceholder", "e.g., prod_abc123"),
149
+ placeholder: g("billing.plans.productIdPlaceholder", "e.g., prod_abc123"),
150
150
  required: !0
151
151
  }),
152
- /* @__PURE__ */ d("p", {
152
+ /* @__PURE__ */ f("p", {
153
153
  className: "text-xs text-text-muted mt-1",
154
- children: h("billing.plans.productIdDesc", "The product this plan belongs to")
154
+ children: g("billing.plans.productIdDesc", "The product this plan belongs to")
155
155
  })
156
156
  ] }),
157
- /* @__PURE__ */ f("div", {
157
+ /* @__PURE__ */ p("div", {
158
158
  className: "grid grid-cols-2 gap-4",
159
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
159
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
160
160
  htmlFor: "price",
161
161
  className: "block text-sm font-medium text-text-primary mb-1",
162
- children: [h("billing.plans.priceLabel", "Price"), " *"]
163
- }), /* @__PURE__ */ d("input", {
162
+ children: [g("billing.plans.priceLabel", "Price"), " *"]
163
+ }), /* @__PURE__ */ f("input", {
164
164
  id: "price",
165
165
  type: "number",
166
166
  step: "0.01",
167
167
  min: "0",
168
- value: w,
169
- onChange: (e) => T(e.target.value),
168
+ value: T,
169
+ onChange: (e) => E(e.target.value),
170
170
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
171
171
  placeholder: "49.99",
172
172
  required: !0
173
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
173
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
174
174
  htmlFor: "currency",
175
175
  className: "block text-sm font-medium text-text-primary mb-1",
176
- children: [h("billing.plans.currencyLabel", "Currency"), " *"]
177
- }), /* @__PURE__ */ f("select", {
176
+ children: [g("billing.plans.currencyLabel", "Currency"), " *"]
177
+ }), /* @__PURE__ */ p(u, {
178
178
  id: "currency",
179
- value: E,
180
- onChange: (e) => D(e.target.value),
179
+ value: D,
180
+ onChange: (e) => O(e.target.value),
181
181
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
182
182
  children: [
183
- /* @__PURE__ */ d("option", {
183
+ /* @__PURE__ */ f("option", {
184
184
  value: "USD",
185
185
  children: "USD ($)"
186
186
  }),
187
- /* @__PURE__ */ d("option", {
187
+ /* @__PURE__ */ f("option", {
188
188
  value: "EUR",
189
189
  children: "EUR"
190
190
  }),
191
- /* @__PURE__ */ d("option", {
191
+ /* @__PURE__ */ f("option", {
192
192
  value: "GBP",
193
193
  children: "GBP"
194
194
  }),
195
- /* @__PURE__ */ d("option", {
195
+ /* @__PURE__ */ f("option", {
196
196
  value: "INR",
197
197
  children: "INR"
198
198
  }),
199
- /* @__PURE__ */ d("option", {
199
+ /* @__PURE__ */ f("option", {
200
200
  value: "AUD",
201
201
  children: "AUD"
202
202
  }),
203
- /* @__PURE__ */ d("option", {
203
+ /* @__PURE__ */ f("option", {
204
204
  value: "CAD",
205
205
  children: "CAD"
206
206
  }),
207
- /* @__PURE__ */ d("option", {
207
+ /* @__PURE__ */ f("option", {
208
208
  value: "JPY",
209
209
  children: "JPY"
210
210
  }),
211
- /* @__PURE__ */ d("option", {
211
+ /* @__PURE__ */ f("option", {
212
212
  value: "SGD",
213
213
  children: "SGD"
214
214
  })
215
215
  ]
216
216
  })] })]
217
217
  }),
218
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
218
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
219
219
  htmlFor: "duration",
220
220
  className: "block text-sm font-medium text-text-primary mb-1",
221
- children: [h("billing.plans.billingPeriodLabel", "Billing Period"), " *"]
222
- }), /* @__PURE__ */ f("select", {
221
+ children: [g("billing.plans.billingPeriodLabel", "Billing Period"), " *"]
222
+ }), /* @__PURE__ */ p(u, {
223
223
  id: "duration",
224
- value: O,
225
- onChange: (e) => k(e.target.value),
224
+ value: k,
225
+ onChange: (e) => A(e.target.value),
226
226
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
227
- children: [/* @__PURE__ */ d("option", {
227
+ children: [/* @__PURE__ */ f("option", {
228
228
  value: s.MONTHLY,
229
229
  children: "Monthly"
230
- }), /* @__PURE__ */ d("option", {
230
+ }), /* @__PURE__ */ f("option", {
231
231
  value: s.YEARLY,
232
232
  children: "Yearly"
233
233
  })]
234
234
  })] }),
235
- /* @__PURE__ */ f("div", {
235
+ /* @__PURE__ */ p("div", {
236
236
  className: "flex items-start justify-between gap-4 pt-1",
237
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
237
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
238
238
  className: "text-sm font-medium text-text-primary",
239
- children: h("billing.plans.isPurchasableLabel", "Publicly purchasable")
240
- }), /* @__PURE__ */ d("p", {
239
+ children: g("billing.plans.isPurchasableLabel", "Publicly purchasable")
240
+ }), /* @__PURE__ */ f("p", {
241
241
  className: "text-xs text-text-muted mt-0.5",
242
- children: M ? h("billing.plans.isPurchasableOn", "Visible on pricing page — users can subscribe directly.") : h("billing.plans.isPurchasableOff", "Internal / custom plan — hidden from pricing page, assign via API only.")
243
- })] }), /* @__PURE__ */ d("button", {
242
+ children: N ? g("billing.plans.isPurchasableOn", "Visible on pricing page — users can subscribe directly.") : g("billing.plans.isPurchasableOff", "Internal / custom plan — hidden from pricing page, assign via API only.")
243
+ })] }), /* @__PURE__ */ f("button", {
244
244
  type: "button",
245
245
  role: "switch",
246
- "aria-checked": M,
247
- onClick: () => N((e) => !e),
248
- className: `relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:ring-offset-2 ${M ? "bg-action-primary-bg" : "bg-text-muted/30"}`,
249
- children: /* @__PURE__ */ d("span", { className: `inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow transition-transform ${M ? "translate-x-5" : "translate-x-0"}` })
246
+ "aria-checked": N,
247
+ onClick: () => P((e) => !e),
248
+ className: `relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:ring-offset-2 ${N ? "bg-action-primary-bg" : "bg-text-muted/30"}`,
249
+ children: /* @__PURE__ */ f("span", { className: `inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow transition-transform ${N ? "translate-x-5" : "translate-x-0"}` })
250
250
  })]
251
251
  })
252
252
  ]
253
253
  })]
254
- }), /* @__PURE__ */ f("div", {
254
+ }), /* @__PURE__ */ p("div", {
255
255
  className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
256
- children: [/* @__PURE__ */ f("div", {
256
+ children: [/* @__PURE__ */ p("div", {
257
257
  className: "p-4 border-b border-border-subtle bg-bg-sunken/30 flex items-center justify-between",
258
- children: [/* @__PURE__ */ f("h2", {
258
+ children: [/* @__PURE__ */ p("h2", {
259
259
  className: "font-semibold text-text-primary",
260
- children: [h("billing.plans.quotaAllocations", "Quota Allocations"), " *"]
261
- }), /* @__PURE__ */ d("button", {
260
+ children: [g("billing.plans.quotaAllocations", "Quota Allocations"), " *"]
261
+ }), /* @__PURE__ */ f("button", {
262
262
  type: "button",
263
- onClick: H,
264
- disabled: v.length === 0,
263
+ onClick: U,
264
+ disabled: y.length === 0,
265
265
  className: "px-3 py-1 text-sm font-medium text-text-link hover:bg-[var(--color-accent-soft)] rounded-md transition-colors disabled:opacity-50",
266
266
  children: "+ Add Quota"
267
267
  })]
268
- }), /* @__PURE__ */ d("div", {
268
+ }), /* @__PURE__ */ f("div", {
269
269
  className: "p-4 space-y-3",
270
- children: v.length === 0 ? /* @__PURE__ */ d("p", {
270
+ children: y.length === 0 ? /* @__PURE__ */ f("p", {
271
271
  className: "text-sm text-text-muted",
272
- children: h("billing.plans.noQuotasAvailable", "No quotas available. Please create quotas first.")
273
- }) : P.length === 0 ? /* @__PURE__ */ d("p", {
272
+ children: g("billing.plans.noQuotasAvailable", "No quotas available. Please create quotas first.")
273
+ }) : F.length === 0 ? /* @__PURE__ */ f("p", {
274
274
  className: "text-sm text-text-muted",
275
- children: h("billing.plans.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
276
- }) : P.map((e, t) => {
277
- let n = v.find((t) => t.id === e.quotaId), r = n?.limits?.type ?? "unknown";
278
- return /* @__PURE__ */ f("div", {
275
+ children: g("billing.plans.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
276
+ }) : F.map((e, t) => {
277
+ let n = y.find((t) => t.id === e.quotaId), r = n?.limits?.type ?? "unknown";
278
+ return /* @__PURE__ */ p("div", {
279
279
  className: "p-3 border border-border-subtle rounded-lg bg-bg-sunken/20 space-y-3",
280
- children: [/* @__PURE__ */ f("div", {
280
+ children: [/* @__PURE__ */ p("div", {
281
281
  className: "flex items-center gap-3",
282
- children: [/* @__PURE__ */ f("select", {
282
+ children: [/* @__PURE__ */ p(u, {
283
283
  value: e.quotaId,
284
- onChange: (e) => W(t, "quotaId", e.target.value),
284
+ onChange: (e) => G(t, "quotaId", e.target.value),
285
285
  className: `flex-1 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${e.quotaId === "" ? "text-text-muted" : "text-text-primary"}`,
286
- children: [/* @__PURE__ */ d("option", {
286
+ children: [/* @__PURE__ */ f("option", {
287
287
  value: "",
288
288
  disabled: !0,
289
- children: h("billing.plans.selectQuota", "Select a quota...")
290
- }), v.map((e) => /* @__PURE__ */ d("option", {
289
+ children: g("billing.plans.selectQuota", "Select a quota...")
290
+ }), y.map((e) => /* @__PURE__ */ f("option", {
291
291
  value: e.id,
292
292
  children: e.name
293
293
  }, e.id))]
294
- }), /* @__PURE__ */ d("button", {
294
+ }), /* @__PURE__ */ f("button", {
295
295
  type: "button",
296
- onClick: () => U(t),
296
+ onClick: () => W(t),
297
297
  className: "p-2 text-status-error-text hover:bg-status-error-bg-subtle rounded-md transition-colors",
298
298
  title: "Remove quota",
299
- children: /* @__PURE__ */ d("svg", {
299
+ children: /* @__PURE__ */ f("svg", {
300
300
  className: "size-5",
301
301
  fill: "none",
302
302
  viewBox: "0 0 24 24",
303
303
  stroke: "currentColor",
304
- children: /* @__PURE__ */ d("path", {
304
+ children: /* @__PURE__ */ f("path", {
305
305
  strokeLinecap: "round",
306
306
  strokeLinejoin: "round",
307
307
  strokeWidth: 2,
@@ -309,22 +309,22 @@ var m = () => {
309
309
  })
310
310
  })
311
311
  })]
312
- }), n && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
312
+ }), n && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
313
313
  className: "flex items-center justify-between text-sm",
314
- children: /* @__PURE__ */ f("span", {
314
+ children: /* @__PURE__ */ p("span", {
315
315
  className: "capitalize text-text-muted",
316
316
  children: ["Type: ", r]
317
317
  })
318
- }), /* @__PURE__ */ f("div", {
318
+ }), /* @__PURE__ */ p("div", {
319
319
  className: "flex items-center gap-2",
320
- children: [/* @__PURE__ */ f("label", {
320
+ children: [/* @__PURE__ */ p("label", {
321
321
  className: "text-sm text-text-muted",
322
- children: [h("billing.plans.limit", "Limit"), ":"]
323
- }), /* @__PURE__ */ d("input", {
322
+ children: [g("billing.plans.limit", "Limit"), ":"]
323
+ }), /* @__PURE__ */ f("input", {
324
324
  type: "number",
325
325
  min: "1",
326
326
  value: e.quantity,
327
- onChange: (e) => W(t, "quantity", e.target.value),
327
+ onChange: (e) => G(t, "quantity", e.target.value),
328
328
  className: "w-36 px-3 py-1.5 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-center"
329
329
  })]
330
330
  })] })]
@@ -333,20 +333,20 @@ var m = () => {
333
333
  })]
334
334
  })]
335
335
  }),
336
- /* @__PURE__ */ d(n, {
337
- overrides: I,
338
- onChange: L
336
+ /* @__PURE__ */ f(n, {
337
+ overrides: L,
338
+ onChange: R
339
339
  }),
340
- /* @__PURE__ */ f("div", {
340
+ /* @__PURE__ */ p("div", {
341
341
  className: "flex items-center gap-3 pt-4",
342
- children: [/* @__PURE__ */ d("button", {
342
+ children: [/* @__PURE__ */ f("button", {
343
343
  type: "submit",
344
- disabled: x || v.length === 0,
344
+ disabled: S || y.length === 0,
345
345
  className: "px-6 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
346
- children: x ? h("billing.plans.creating", "Creating...") : h("billing.plans.createPlanBtn", "Create Plan")
347
- }), /* @__PURE__ */ d("button", {
346
+ children: S ? g("billing.plans.creating", "Creating...") : g("billing.plans.createPlanBtn", "Create Plan")
347
+ }), /* @__PURE__ */ f("button", {
348
348
  type: "button",
349
- onClick: () => g("/plans"),
349
+ onClick: () => _("/plans"),
350
350
  className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
351
351
  children: "Cancel"
352
352
  })]
@@ -356,6 +356,6 @@ var m = () => {
356
356
  ]
357
357
  });
358
358
  };
359
- export { m as PlanCreatePage };
359
+ export { h as PlanCreatePage };
360
360
 
361
361
  //# sourceMappingURL=PlanCreatePage.js.map