@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.3

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 (105) hide show
  1. package/dist/billing/BillingRoot.js +83 -77
  2. package/dist/billing/BillingRoot.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
  6. package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
  7. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
  8. package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
  9. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
  10. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  11. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
  12. package/dist/billing/modules/billing/hooks/index.js +5 -5
  13. package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
  14. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  15. package/dist/billing/modules/billing/index.js +14 -14
  16. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
  20. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
  22. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
  31. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  32. package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
  33. package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
  34. package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
  35. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
  36. package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
  37. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  38. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
  39. package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
  42. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
  43. package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
  44. package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
  45. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  46. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
  47. package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
  48. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
  49. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  51. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
  52. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
  53. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  54. package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
  55. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  56. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
  57. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  58. package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
  59. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  60. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
  61. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
  63. package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
  64. package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
  65. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  66. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
  67. package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
  68. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
  69. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
  70. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
  71. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
  72. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
  73. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
  74. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
  75. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
  76. package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
  77. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  78. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
  79. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  80. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
  81. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
  82. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  83. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
  84. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
  85. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  86. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
  87. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
  88. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
  89. package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
  90. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
  91. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
  92. package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
  93. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  94. package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
  95. package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
  96. package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
  97. package/dist/billing/shared/components/EmptyState.js +3 -3
  98. package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
  99. package/dist/billing/shared/ui/MetricCard.js +13 -13
  100. package/dist/billing/shared/utils/format.js +16 -4
  101. package/dist/billing/shared/utils/format.js.map +1 -1
  102. package/dist/billing/shared/utils/index.js +8 -8
  103. package/dist/generated/global-operations.js +294 -286
  104. package/dist/generated/global-operations.js.map +1 -1
  105. 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 { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
13
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
- import { PagePurpose as p } from "@burdenoff/fe-libs/ui";
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";
15
15
  // src/billing/modules/plans/pages/PlanCreatePage.tsx
16
16
  var m = () => {
17
- let { t: m } = f(), h = (e, t) => {
17
+ let { t: m } = p(), h = (e, t) => {
18
18
  let n = m(e);
19
19
  return n === e ? t : n;
20
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__ */ u(e, { message: h("billing.plans.noCreatePermission", "You don't have permission to create plans.") });
22
- if (y) return /* @__PURE__ */ d("div", {
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", {
23
23
  className: "space-y-6 p-6",
24
- children: [/* @__PURE__ */ u("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ u("div", {
24
+ children: [/* @__PURE__ */ d("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ d("div", {
25
25
  className: "max-w-2xl space-y-4",
26
26
  children: [
27
27
  1,
@@ -29,7 +29,7 @@ var m = () => {
29
29
  3,
30
30
  4,
31
31
  5
32
- ].map((e) => /* @__PURE__ */ u("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
32
+ ].map((e) => /* @__PURE__ */ d("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
33
33
  })]
34
34
  });
35
35
  let H = () => {
@@ -43,15 +43,15 @@ var m = () => {
43
43
  let r = [...P];
44
44
  t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), F(r);
45
45
  };
46
- return /* @__PURE__ */ d("div", {
46
+ return /* @__PURE__ */ f("div", {
47
47
  className: "space-y-6 p-6",
48
48
  children: [
49
- /* @__PURE__ */ u(t, {
49
+ /* @__PURE__ */ d(t, {
50
50
  title: h("billing.plans.createNewPlan", "Create New Plan"),
51
51
  description: h("billing.plans.createNewPlanDesc", "Set up a new pricing plan with quotas")
52
52
  }),
53
- /* @__PURE__ */ u(p, { 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__ */ d("form", {
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", {
55
55
  onSubmit: async (e) => {
56
56
  if (e.preventDefault(), z(null), V(!1), !S.trim()) {
57
57
  z("Plan name is required");
@@ -94,38 +94,38 @@ var m = () => {
94
94
  },
95
95
  className: "space-y-6",
96
96
  children: [
97
- R && /* @__PURE__ */ u("div", {
97
+ R && /* @__PURE__ */ d("div", {
98
98
  className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
99
- children: /* @__PURE__ */ u("p", {
99
+ children: /* @__PURE__ */ d("p", {
100
100
  className: "text-sm text-status-error-text",
101
101
  children: R
102
102
  })
103
103
  }),
104
- B && /* @__PURE__ */ u("div", {
104
+ B && /* @__PURE__ */ d("div", {
105
105
  className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
106
- children: /* @__PURE__ */ u("p", {
106
+ children: /* @__PURE__ */ d("p", {
107
107
  className: "text-sm text-status-success-text",
108
108
  children: h("billing.plans.createSuccess", "Plan created successfully! Redirecting...")
109
109
  })
110
110
  }),
111
- /* @__PURE__ */ d("div", {
111
+ /* @__PURE__ */ f("div", {
112
112
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
113
- children: [/* @__PURE__ */ d("div", {
113
+ children: [/* @__PURE__ */ f("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__ */ u("div", {
115
+ children: [/* @__PURE__ */ d("div", {
116
116
  className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
117
- children: /* @__PURE__ */ u("h2", {
117
+ children: /* @__PURE__ */ d("h2", {
118
118
  className: "font-semibold text-text-primary",
119
119
  children: h("billing.plans.basicInfo", "Basic Information")
120
120
  })
121
- }), /* @__PURE__ */ d("div", {
121
+ }), /* @__PURE__ */ f("div", {
122
122
  className: "p-4 space-y-4",
123
123
  children: [
124
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
124
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
125
125
  htmlFor: "name",
126
126
  className: "block text-sm font-medium text-text-primary mb-1",
127
127
  children: [h("billing.plans.planNameLabel", "Plan Name"), " *"]
128
- }), /* @__PURE__ */ u("input", {
128
+ }), /* @__PURE__ */ d("input", {
129
129
  id: "name",
130
130
  type: "text",
131
131
  value: S,
@@ -134,13 +134,13 @@ var m = () => {
134
134
  placeholder: h("billing.plans.planNamePlaceholder", "e.g., Pro Plan"),
135
135
  required: !0
136
136
  })] }),
137
- /* @__PURE__ */ d("div", { children: [
138
- /* @__PURE__ */ d("label", {
137
+ /* @__PURE__ */ f("div", { children: [
138
+ /* @__PURE__ */ f("label", {
139
139
  htmlFor: "productId",
140
140
  className: "block text-sm font-medium text-text-primary mb-1",
141
141
  children: [h("billing.plans.productId", "Product ID"), " *"]
142
142
  }),
143
- /* @__PURE__ */ u("input", {
143
+ /* @__PURE__ */ d("input", {
144
144
  id: "productId",
145
145
  type: "text",
146
146
  value: A,
@@ -149,18 +149,18 @@ var m = () => {
149
149
  placeholder: h("billing.plans.productIdPlaceholder", "e.g., prod_abc123"),
150
150
  required: !0
151
151
  }),
152
- /* @__PURE__ */ u("p", {
152
+ /* @__PURE__ */ d("p", {
153
153
  className: "text-xs text-text-muted mt-1",
154
154
  children: h("billing.plans.productIdDesc", "The product this plan belongs to")
155
155
  })
156
156
  ] }),
157
- /* @__PURE__ */ d("div", {
157
+ /* @__PURE__ */ f("div", {
158
158
  className: "grid grid-cols-2 gap-4",
159
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
159
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
160
160
  htmlFor: "price",
161
161
  className: "block text-sm font-medium text-text-primary mb-1",
162
162
  children: [h("billing.plans.priceLabel", "Price"), " *"]
163
- }), /* @__PURE__ */ u("input", {
163
+ }), /* @__PURE__ */ d("input", {
164
164
  id: "price",
165
165
  type: "number",
166
166
  step: "0.01",
@@ -170,138 +170,138 @@ var m = () => {
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__ */ d("div", { children: [/* @__PURE__ */ d("label", {
173
+ })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
174
174
  htmlFor: "currency",
175
175
  className: "block text-sm font-medium text-text-primary mb-1",
176
176
  children: [h("billing.plans.currencyLabel", "Currency"), " *"]
177
- }), /* @__PURE__ */ d("select", {
177
+ }), /* @__PURE__ */ f("select", {
178
178
  id: "currency",
179
179
  value: E,
180
180
  onChange: (e) => D(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__ */ u("option", {
183
+ /* @__PURE__ */ d("option", {
184
184
  value: "USD",
185
185
  children: "USD ($)"
186
186
  }),
187
- /* @__PURE__ */ u("option", {
187
+ /* @__PURE__ */ d("option", {
188
188
  value: "EUR",
189
189
  children: "EUR"
190
190
  }),
191
- /* @__PURE__ */ u("option", {
191
+ /* @__PURE__ */ d("option", {
192
192
  value: "GBP",
193
193
  children: "GBP"
194
194
  }),
195
- /* @__PURE__ */ u("option", {
195
+ /* @__PURE__ */ d("option", {
196
196
  value: "INR",
197
197
  children: "INR"
198
198
  }),
199
- /* @__PURE__ */ u("option", {
199
+ /* @__PURE__ */ d("option", {
200
200
  value: "AUD",
201
201
  children: "AUD"
202
202
  }),
203
- /* @__PURE__ */ u("option", {
203
+ /* @__PURE__ */ d("option", {
204
204
  value: "CAD",
205
205
  children: "CAD"
206
206
  }),
207
- /* @__PURE__ */ u("option", {
207
+ /* @__PURE__ */ d("option", {
208
208
  value: "JPY",
209
209
  children: "JPY"
210
210
  }),
211
- /* @__PURE__ */ u("option", {
211
+ /* @__PURE__ */ d("option", {
212
212
  value: "SGD",
213
213
  children: "SGD"
214
214
  })
215
215
  ]
216
216
  })] })]
217
217
  }),
218
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
218
+ /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
219
219
  htmlFor: "duration",
220
220
  className: "block text-sm font-medium text-text-primary mb-1",
221
221
  children: [h("billing.plans.billingPeriodLabel", "Billing Period"), " *"]
222
- }), /* @__PURE__ */ d("select", {
222
+ }), /* @__PURE__ */ f("select", {
223
223
  id: "duration",
224
224
  value: O,
225
225
  onChange: (e) => k(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__ */ u("option", {
227
+ children: [/* @__PURE__ */ d("option", {
228
228
  value: s.MONTHLY,
229
229
  children: "Monthly"
230
- }), /* @__PURE__ */ u("option", {
230
+ }), /* @__PURE__ */ d("option", {
231
231
  value: s.YEARLY,
232
232
  children: "Yearly"
233
233
  })]
234
234
  })] }),
235
- /* @__PURE__ */ d("div", {
235
+ /* @__PURE__ */ f("div", {
236
236
  className: "flex items-start justify-between gap-4 pt-1",
237
- children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
237
+ children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
238
238
  className: "text-sm font-medium text-text-primary",
239
239
  children: h("billing.plans.isPurchasableLabel", "Publicly purchasable")
240
- }), /* @__PURE__ */ u("p", {
240
+ }), /* @__PURE__ */ d("p", {
241
241
  className: "text-xs text-text-muted mt-0.5",
242
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__ */ u("button", {
243
+ })] }), /* @__PURE__ */ d("button", {
244
244
  type: "button",
245
245
  role: "switch",
246
246
  "aria-checked": M,
247
247
  onClick: () => N((e) => !e),
248
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__ */ u("span", { className: `inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow transition-transform ${M ? "translate-x-5" : "translate-x-0"}` })
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"}` })
250
250
  })]
251
251
  })
252
252
  ]
253
253
  })]
254
- }), /* @__PURE__ */ d("div", {
254
+ }), /* @__PURE__ */ f("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__ */ d("div", {
256
+ children: [/* @__PURE__ */ f("div", {
257
257
  className: "p-4 border-b border-border-subtle bg-bg-sunken/30 flex items-center justify-between",
258
- children: [/* @__PURE__ */ d("h2", {
258
+ children: [/* @__PURE__ */ f("h2", {
259
259
  className: "font-semibold text-text-primary",
260
260
  children: [h("billing.plans.quotaAllocations", "Quota Allocations"), " *"]
261
- }), /* @__PURE__ */ u("button", {
261
+ }), /* @__PURE__ */ d("button", {
262
262
  type: "button",
263
263
  onClick: H,
264
264
  disabled: v.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__ */ u("div", {
268
+ }), /* @__PURE__ */ d("div", {
269
269
  className: "p-4 space-y-3",
270
- children: v.length === 0 ? /* @__PURE__ */ u("p", {
270
+ children: v.length === 0 ? /* @__PURE__ */ d("p", {
271
271
  className: "text-sm text-text-muted",
272
272
  children: h("billing.plans.noQuotasAvailable", "No quotas available. Please create quotas first.")
273
- }) : P.length === 0 ? /* @__PURE__ */ u("p", {
273
+ }) : P.length === 0 ? /* @__PURE__ */ d("p", {
274
274
  className: "text-sm text-text-muted",
275
275
  children: h("billing.plans.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
276
276
  }) : P.map((e, t) => {
277
277
  let n = v.find((t) => t.id === e.quotaId), r = n?.limits?.type ?? "unknown";
278
- return /* @__PURE__ */ d("div", {
278
+ return /* @__PURE__ */ f("div", {
279
279
  className: "p-3 border border-border-subtle rounded-lg bg-bg-sunken/20 space-y-3",
280
- children: [/* @__PURE__ */ d("div", {
280
+ children: [/* @__PURE__ */ f("div", {
281
281
  className: "flex items-center gap-3",
282
- children: [/* @__PURE__ */ d("select", {
282
+ children: [/* @__PURE__ */ f("select", {
283
283
  value: e.quotaId,
284
284
  onChange: (e) => W(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__ */ u("option", {
286
+ children: [/* @__PURE__ */ d("option", {
287
287
  value: "",
288
288
  disabled: !0,
289
289
  children: h("billing.plans.selectQuota", "Select a quota...")
290
- }), v.map((e) => /* @__PURE__ */ u("option", {
290
+ }), v.map((e) => /* @__PURE__ */ d("option", {
291
291
  value: e.id,
292
292
  children: e.name
293
293
  }, e.id))]
294
- }), /* @__PURE__ */ u("button", {
294
+ }), /* @__PURE__ */ d("button", {
295
295
  type: "button",
296
296
  onClick: () => U(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__ */ u("svg", {
299
+ children: /* @__PURE__ */ d("svg", {
300
300
  className: "size-5",
301
301
  fill: "none",
302
302
  viewBox: "0 0 24 24",
303
303
  stroke: "currentColor",
304
- children: /* @__PURE__ */ u("path", {
304
+ children: /* @__PURE__ */ d("path", {
305
305
  strokeLinecap: "round",
306
306
  strokeLinejoin: "round",
307
307
  strokeWidth: 2,
@@ -309,18 +309,18 @@ var m = () => {
309
309
  })
310
310
  })
311
311
  })]
312
- }), n && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
312
+ }), n && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
313
313
  className: "flex items-center justify-between text-sm",
314
- children: /* @__PURE__ */ d("span", {
314
+ children: /* @__PURE__ */ f("span", {
315
315
  className: "capitalize text-text-muted",
316
316
  children: ["Type: ", r]
317
317
  })
318
- }), /* @__PURE__ */ d("div", {
318
+ }), /* @__PURE__ */ f("div", {
319
319
  className: "flex items-center gap-2",
320
- children: [/* @__PURE__ */ d("label", {
320
+ children: [/* @__PURE__ */ f("label", {
321
321
  className: "text-sm text-text-muted",
322
322
  children: [h("billing.plans.limit", "Limit"), ":"]
323
- }), /* @__PURE__ */ u("input", {
323
+ }), /* @__PURE__ */ d("input", {
324
324
  type: "number",
325
325
  min: "1",
326
326
  value: e.quantity,
@@ -333,18 +333,18 @@ var m = () => {
333
333
  })]
334
334
  })]
335
335
  }),
336
- /* @__PURE__ */ u(n, {
336
+ /* @__PURE__ */ d(n, {
337
337
  overrides: I,
338
338
  onChange: L
339
339
  }),
340
- /* @__PURE__ */ d("div", {
340
+ /* @__PURE__ */ f("div", {
341
341
  className: "flex items-center gap-3 pt-4",
342
- children: [/* @__PURE__ */ u("button", {
342
+ children: [/* @__PURE__ */ d("button", {
343
343
  type: "submit",
344
344
  disabled: x || v.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
346
  children: x ? h("billing.plans.creating", "Creating...") : h("billing.plans.createPlanBtn", "Create Plan")
347
- }), /* @__PURE__ */ u("button", {
347
+ }), /* @__PURE__ */ d("button", {
348
348
  type: "button",
349
349
  onClick: () => g("/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",