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