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