@burdenoff/microfe-billing 2026.624.3 → 2026.625.2

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 (95) hide show
  1. package/dist/billing/BillingAdminRoutes.js +1 -1
  2. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonCreatePage.js +2 -2
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +4 -4
  6. package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
  7. package/dist/billing/modules/addons/pages/AddonEditPage.js +2 -2
  8. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  9. package/dist/billing/modules/addons/pages/AddonsListPage.js +1 -1
  10. package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
  11. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +98 -99
  12. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  13. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -85
  14. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  15. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +6 -6
  16. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  17. package/dist/billing/modules/billing/pages/InvoicesListPage.js +2 -2
  18. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/RefundsPage.js +360 -370
  20. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  21. package/dist/billing/modules/billing/pages/UserRefundsPage.js +2 -2
  22. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  23. package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -1
  24. package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
  25. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -1
  26. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  27. package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -1
  28. package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +2 -2
  30. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  31. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +102 -104
  32. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  33. package/dist/billing/modules/coupons/pages/CouponsListPage.js +5 -5
  34. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  35. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +1 -1
  36. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  37. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +1 -1
  38. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
  39. package/dist/billing/modules/credits/pages/CreditsPage.js +29 -28
  40. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  41. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -2
  42. package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
  43. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +1 -1
  44. package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
  45. package/dist/billing/modules/dashboard/components/BillingAccountCard.js +3 -3
  46. package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
  47. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +2 -2
  48. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  49. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +1 -1
  50. package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
  51. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -1
  52. package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
  53. package/dist/billing/modules/dashboard/pages/OverviewPage.js +139 -142
  54. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  55. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +6 -6
  56. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  57. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +4 -4
  58. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  59. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +1 -1
  60. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  61. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +142 -133
  62. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
  63. package/dist/billing/modules/plans/pages/PlanCreatePage.js +2 -2
  64. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  65. package/dist/billing/modules/plans/pages/PlanDetailPage.js +4 -4
  66. package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
  67. package/dist/billing/modules/plans/pages/PlanEditPage.js +2 -2
  68. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  69. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +4 -4
  70. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  71. package/dist/billing/modules/plans/pages/PlansListPage.js +2 -2
  72. package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
  73. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
  74. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  75. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +2 -2
  76. package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
  77. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +2 -2
  78. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  79. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +5 -5
  80. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
  81. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +2 -2
  82. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  83. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +1 -1
  84. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
  85. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +259 -265
  86. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  87. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +7 -7
  88. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
  89. package/dist/billing/modules/usage/pages/UsagePage.js +13 -13
  90. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  91. package/dist/billing/shared/ui/Card.js +1 -1
  92. package/dist/billing/shared/ui/Card.js.map +1 -1
  93. package/dist/billing/shared/ui/MetricCard.js +28 -21
  94. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  95. package/package.json +2 -2
@@ -6,71 +6,72 @@ import "../../../shared/ui/index.js";
6
6
  import { useBillingEventEmitter as i } from "../../../hooks/useBillingEventEmitter.js";
7
7
  import { useBillingAccountSelection as a } from "../../../hooks/useBillingAccountSelection.js";
8
8
  import { PricingModel as o } from "../../../shared/types/graphql.js";
9
- import { formatBytes as s, formatCurrency as c, formatDate as l, formatPercentage as u, formatPlanDuration as d, formatSubscriptionStatus as f } from "../../../shared/utils/format.js";
10
- import { getQuotaProgressColor as p, getSubscriptionStatusColor as ee } from "../../../shared/utils/status.js";
11
- import { useBillingPermissions as te } from "../../../hooks/useBillingPermissions.js";
12
- import { useGetDefaultBillingAccountDashboardQuery as ne } from "../../../../generated/global-operations.js";
13
- import { useBillingNavigate as re } from "../../../hooks/useBillingNavigate.js";
14
- import { withBillingAccountId as m } from "../../../shared/utils/navigation.js";
15
- import { useWorkspaceQuotaOverview as h } from "../../usage/hooks/useUsage.js";
16
- import { WorkspaceQuotaAssignmentModal as g } from "../../checkout/components/WorkspaceQuotaAssignmentModal.js";
17
- import { useSubscription as ie, useSubscriptionMutations as ae } from "../hooks/useSubscriptions.js";
9
+ import { formatBytes as s, formatCurrency as c, formatDate as l, formatPercentage as u, formatPlanDuration as d, formatSubscriptionStatus as ee } from "../../../shared/utils/format.js";
10
+ import { getQuotaProgressColor as f, getSubscriptionStatusColor as te } from "../../../shared/utils/status.js";
11
+ import { useBillingPermissions as ne } from "../../../hooks/useBillingPermissions.js";
12
+ import { useGetDefaultBillingAccountDashboardQuery as re } from "../../../../generated/global-operations.js";
13
+ import { useBillingNavigate as ie } from "../../../hooks/useBillingNavigate.js";
14
+ import { withBillingAccountId as p } from "../../../shared/utils/navigation.js";
15
+ import { useWorkspaceQuotaOverview as ae } from "../../usage/hooks/useUsage.js";
16
+ import { WorkspaceQuotaAssignmentModal as oe } from "../../checkout/components/WorkspaceQuotaAssignmentModal.js";
17
+ import { useSubscription as se, useSubscriptionMutations as m } from "../hooks/useSubscriptions.js";
18
18
  import "../hooks/index.js";
19
- import { ManageSeatsModal as oe } from "../components/ManageSeatsModal.js";
20
- import { useState as _ } from "react";
21
- import { useParams as se } from "react-router-dom";
22
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
23
- import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { ManageSeatsModal as h } from "../components/ManageSeatsModal.js";
20
+ import { useState as g } from "react";
21
+ import { useParams as ce } from "react-router-dom";
22
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
23
+ import { useI18n as le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
+ import { CTAOverflowMenu as ue, EmphasisPanel as de } from "@burdenoff/fe-libs/ui";
24
25
  //#region src/billing/modules/subscriptions/pages/SubscriptionDetailPage.tsx
25
- function b(e, t) {
26
+ function y(e, t) {
26
27
  if (t?.displayName && typeof t.displayName == "string") return t.displayName;
27
28
  if (t?.label && typeof t.label == "string") return t.label;
28
29
  let n = e.split(".");
29
30
  return (n.length > 1 ? n.slice(1) : n).map((e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())).join(" ");
30
31
  }
31
- function x(e) {
32
+ function b(e) {
32
33
  return e === "DAILY" ? "Resets daily" : e === "MONTHLY" ? "Resets monthly" : "";
33
34
  }
34
- var S = () => {
35
- let { t: s } = ce(), u = (e, t) => {
35
+ var x = () => {
36
+ let { t: s } = le(), u = (e, t) => {
36
37
  let n = s(e);
37
38
  return n === e ? t : n;
38
- }, { subscriptionId: p } = se(), b = re(), { emit: x } = i(), { orgId: S } = e(), w = te(), { selectedAccountId: pe } = a({
39
- orgId: S,
39
+ }, { subscriptionId: f } = ce(), y = ie(), { emit: b } = i(), { orgId: x } = e(), S = ne(), { selectedAccountId: _e } = a({
40
+ orgId: x,
40
41
  syncFromUrl: !0,
41
42
  urlParamName: "billingAccountId"
42
- }), { data: me } = ne({ fetchPolicy: "cache-first" }), T = pe ?? me?.getDefaultBillingAccount?.id ?? void 0, { subscription: E, isLoading: he, error: D, refetch: O } = ie(p, T), { cancelSubscription: ge, isCanceling: k, updateSubscriptionSeats: A, isUpdatingSeats: j } = ae(), { workspaceId: M } = e(), { overview: N, refetch: P } = h(M ?? void 0), [F, I] = _(!1), [_e, L] = _(!1), [ve, R] = _(!1), [z, B] = _(""), [V, H] = _(null), ye = async () => {
43
- if (E) {
43
+ }), { data: ve } = re({ fetchPolicy: "cache-first" }), C = _e ?? ve?.getDefaultBillingAccount?.id ?? void 0, { subscription: w, isLoading: ye, error: T, refetch: E } = se(f, C), { cancelSubscription: D, isCanceling: O, updateSubscriptionSeats: k, isUpdatingSeats: A } = m(), { workspaceId: j } = e(), { overview: M, refetch: N } = ae(j ?? void 0), [P, F] = g(!1), [I, L] = g(!1), [be, R] = g(!1), [z, B] = g(""), [V, H] = g(null), xe = async () => {
44
+ if (w) {
44
45
  H(null);
45
46
  try {
46
- await ge({
47
- billingAccountId: T ?? E.billingAccountId,
48
- subscriptionId: E.id,
47
+ await D({
48
+ billingAccountId: C ?? w.billingAccountId,
49
+ subscriptionId: w.id,
49
50
  reason: z || "User requested cancellation"
50
- }), x("billing.subscription.cancelled", {
51
+ }), b("billing.subscription.cancelled", {
51
52
  route: "/billing/subscriptions",
52
- entityId: E.id,
53
+ entityId: w.id,
53
54
  source: "subscription-detail",
54
55
  reason: z || "User requested cancellation"
55
- }), I(!1), B(""), await O();
56
+ }), F(!1), B(""), await E();
56
57
  } catch (e) {
57
58
  H(e instanceof Error ? e.message : "Failed to cancel subscription");
58
59
  }
59
60
  }
60
61
  };
61
- if (!w.canViewSubscriptions) return /* @__PURE__ */ v("div", {
62
+ if (!S.canViewSubscriptions) return /* @__PURE__ */ _("div", {
62
63
  className: "flex items-center justify-center h-full min-h-[400px]",
63
- children: /* @__PURE__ */ y("div", {
64
+ children: /* @__PURE__ */ v("div", {
64
65
  className: "text-center space-y-2",
65
66
  children: [
66
- /* @__PURE__ */ v("div", {
67
+ /* @__PURE__ */ _("div", {
67
68
  className: "size-12 mx-auto rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center",
68
- children: /* @__PURE__ */ v("svg", {
69
+ children: /* @__PURE__ */ _("svg", {
69
70
  className: "size-6 text-text-secondary",
70
71
  fill: "none",
71
72
  viewBox: "0 0 24 24",
72
73
  stroke: "currentColor",
73
- children: /* @__PURE__ */ v("path", {
74
+ children: /* @__PURE__ */ _("path", {
74
75
  strokeLinecap: "round",
75
76
  strokeLinejoin: "round",
76
77
  strokeWidth: 2,
@@ -78,46 +79,46 @@ var S = () => {
78
79
  })
79
80
  })
80
81
  }),
81
- /* @__PURE__ */ v("h2", {
82
+ /* @__PURE__ */ _("h2", {
82
83
  className: "text-lg font-semibold text-text-primary",
83
84
  children: "Access Denied"
84
85
  }),
85
- /* @__PURE__ */ v("p", {
86
+ /* @__PURE__ */ _("p", {
86
87
  className: "text-sm text-text-secondary max-w-sm",
87
88
  children: "You don't have permission to view this subscription."
88
89
  })
89
90
  ]
90
91
  })
91
92
  });
92
- if (he) return /* @__PURE__ */ y("div", {
93
+ if (ye) return /* @__PURE__ */ v("div", {
93
94
  className: "space-y-6 px-6 lg:px-8 py-6",
94
- children: [/* @__PURE__ */ y("div", {
95
+ children: [/* @__PURE__ */ v("div", {
95
96
  className: "flex items-center gap-4",
96
- children: [/* @__PURE__ */ v("div", { className: "size-10 bg-bg-sunken animate-pulse rounded-button" }), /* @__PURE__ */ v("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" })]
97
- }), /* @__PURE__ */ v("div", {
97
+ children: [/* @__PURE__ */ _("div", { className: "size-10 bg-bg-sunken animate-pulse rounded-button" }), /* @__PURE__ */ _("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" })]
98
+ }), /* @__PURE__ */ _("div", {
98
99
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
99
- children: /* @__PURE__ */ v("div", {
100
+ children: /* @__PURE__ */ _("div", {
100
101
  className: "lg:col-span-2 space-y-6",
101
- children: /* @__PURE__ */ y("div", {
102
- className: "border border-border-subtle rounded-card bg-bg-surface shadow-elevation-1 p-5 space-y-4",
103
- children: [/* @__PURE__ */ v("div", { className: "h-6 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ v("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" })]
102
+ children: /* @__PURE__ */ v("div", {
103
+ className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 p-5 space-y-4",
104
+ children: [/* @__PURE__ */ _("div", { className: "h-6 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ _("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" })]
104
105
  })
105
106
  })
106
107
  })]
107
108
  });
108
- if (D || !E) return /* @__PURE__ */ v("div", {
109
+ if (T || !w) return /* @__PURE__ */ _("div", {
109
110
  className: "flex items-center justify-center h-full min-h-[400px]",
110
- children: /* @__PURE__ */ y("div", {
111
+ children: /* @__PURE__ */ v("div", {
111
112
  className: "text-center space-y-4",
112
113
  children: [
113
- /* @__PURE__ */ v("div", {
114
+ /* @__PURE__ */ _("div", {
114
115
  className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
115
- children: /* @__PURE__ */ v("svg", {
116
+ children: /* @__PURE__ */ _("svg", {
116
117
  className: "size-6 text-status-error-text",
117
118
  fill: "none",
118
119
  viewBox: "0 0 24 24",
119
120
  stroke: "currentColor",
120
- children: /* @__PURE__ */ v("path", {
121
+ children: /* @__PURE__ */ _("path", {
121
122
  strokeLinecap: "round",
122
123
  strokeLinejoin: "round",
123
124
  strokeWidth: 2,
@@ -125,127 +126,120 @@ var S = () => {
125
126
  })
126
127
  })
127
128
  }),
128
- /* @__PURE__ */ v("h2", {
129
+ /* @__PURE__ */ _("h2", {
129
130
  className: "text-lg font-semibold text-text-primary",
130
131
  children: u("billing.subscriptions.notFound", "Subscription not found")
131
132
  }),
132
- /* @__PURE__ */ v("p", {
133
+ /* @__PURE__ */ _("p", {
133
134
  className: "text-sm text-text-secondary",
134
- children: D?.message || "The subscription you are looking for does not exist."
135
+ children: T?.message || "The subscription you are looking for does not exist."
135
136
  }),
136
- /* @__PURE__ */ v("button", {
137
+ /* @__PURE__ */ _("button", {
137
138
  type: "button",
138
- onClick: () => b(m("/subscriptions", T)),
139
+ onClick: () => y(p("/subscriptions", C)),
139
140
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
140
141
  children: "Back to Subscriptions"
141
142
  })
142
143
  ]
143
144
  })
144
145
  });
145
- let U = E.plan, W = E.quotas || [], G = E.addonSubscriptions || [], K = E.transactions || [], q = E.history || [], be = ee(E.status), J = E.status === "active", Y = N.filter((e) => e.assignment.subscriptionId === E.id && e.assignment.isActive), X = !!E.assignedWorkspaceId || Y.length > 0, Z = new Date(E.endDate), xe = new Date(E.startDate), Se = /* @__PURE__ */ new Date(), Q = Math.ceil((Z.getTime() - xe.getTime()) / (1e3 * 60 * 60 * 24)), $ = Math.max(0, Math.ceil((Z.getTime() - Se.getTime()) / (1e3 * 60 * 60 * 24))), Ce = Math.round((Q - $) / Q * 100);
146
- return /* @__PURE__ */ y("div", {
146
+ let U = w.plan, W = w.quotas || [], G = w.addonSubscriptions || [], K = w.transactions || [], q = w.history || [], Se = te(w.status), J = w.status === "active", Y = M.filter((e) => e.assignment.subscriptionId === w.id && e.assignment.isActive), X = !!w.assignedWorkspaceId || Y.length > 0, Z = new Date(w.endDate), Ce = new Date(w.startDate), we = /* @__PURE__ */ new Date(), Q = Math.ceil((Z.getTime() - Ce.getTime()) / (1e3 * 60 * 60 * 24)), $ = Math.max(0, Math.ceil((Z.getTime() - we.getTime()) / (1e3 * 60 * 60 * 24))), Te = Math.round((Q - $) / Q * 100);
147
+ return /* @__PURE__ */ v("div", {
147
148
  className: "space-y-6 px-6 lg:px-8 py-6",
148
149
  children: [
149
- /* @__PURE__ */ y("div", {
150
+ /* @__PURE__ */ v("div", {
150
151
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
151
- children: [/* @__PURE__ */ y("div", {
152
+ children: [/* @__PURE__ */ v("div", {
152
153
  className: "flex items-start gap-4",
153
- children: [/* @__PURE__ */ v("button", {
154
+ children: [/* @__PURE__ */ _("button", {
154
155
  type: "button",
155
156
  "aria-label": "Back to subscriptions",
156
- onClick: () => b(m("/subscriptions", T)),
157
+ onClick: () => y(p("/subscriptions", C)),
157
158
  className: "p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors duration-200",
158
- children: /* @__PURE__ */ v("svg", {
159
+ children: /* @__PURE__ */ _("svg", {
159
160
  className: "size-5",
160
161
  fill: "none",
161
162
  viewBox: "0 0 24 24",
162
163
  stroke: "currentColor",
163
- children: /* @__PURE__ */ v("path", {
164
+ children: /* @__PURE__ */ _("path", {
164
165
  strokeLinecap: "round",
165
166
  strokeLinejoin: "round",
166
167
  strokeWidth: 2,
167
168
  d: "M15 19l-7-7 7-7"
168
169
  })
169
170
  })
170
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
171
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("div", {
171
172
  className: "flex items-center gap-3 flex-wrap",
172
- children: [/* @__PURE__ */ v("h1", {
173
+ children: [/* @__PURE__ */ _("h1", {
173
174
  className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
174
175
  children: U?.name || "Subscription"
175
- }), /* @__PURE__ */ v(n, {
176
- status: be,
176
+ }), /* @__PURE__ */ _(n, {
177
+ status: Se,
177
178
  dot: !0,
178
- children: f(E.status)
179
+ children: ee(w.status)
179
180
  })]
180
- }), /* @__PURE__ */ v("p", {
181
+ }), /* @__PURE__ */ _("p", {
181
182
  className: "text-sm text-text-secondary mt-1",
182
- children: U?.pricingModel === o.PER_SEAT && U.pricePerSeat ? `${c(U.pricePerSeat, U.currency)} / seat / ${d(U.duration)} · ${E.seatCount ?? U.minSeats ?? 1} seats = ${c(U.pricePerSeat * (E.seatCount ?? U.minSeats ?? 1), U.currency)} / ${d(U.duration)}` : U ? `${c(U.price, U.currency)} / ${d(U.duration)}` : "Unknown plan"
183
+ children: U?.pricingModel === o.PER_SEAT && U.pricePerSeat ? `${c(U.pricePerSeat, U.currency)} / seat / ${d(U.duration)} · ${w.seatCount ?? U.minSeats ?? 1} seats = ${c(U.pricePerSeat * (w.seatCount ?? U.minSeats ?? 1), U.currency)} / ${d(U.duration)}` : U ? `${c(U.price, U.currency)} / ${d(U.duration)}` : "Unknown plan"
183
184
  })] })]
184
- }), /* @__PURE__ */ y("div", {
185
+ }), /* @__PURE__ */ v("div", {
185
186
  className: "flex items-center gap-2",
186
- children: [
187
- J && w.canUpdateSubscription && U?.pricingModel === o.PER_SEAT && /* @__PURE__ */ v("button", {
188
- type: "button",
189
- onClick: () => L(!0),
190
- className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken hover:border-border-strong transition-all duration-200",
191
- children: "Manage Seats"
192
- }),
193
- J && w.canUpdateSubscription && /* @__PURE__ */ v("button", {
194
- type: "button",
195
- onClick: () => b(m(`/subscriptions/${E.id}/upgrade`, T ?? E.billingAccountId)),
196
- className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
197
- children: "Change Plan"
198
- }),
199
- J && w.canCancelSubscription && !E.canceledAt && /* @__PURE__ */ v("button", {
200
- type: "button",
201
- onClick: () => I(!0),
202
- disabled: k,
203
- className: "px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-button hover:bg-status-error-bg-subtle hover:border-border-strong transition-all duration-200 disabled:opacity-50",
204
- children: k ? "Canceling..." : "Cancel Subscription"
205
- }),
206
- E.canceledAt && /* @__PURE__ */ v("span", {
207
- className: "px-4 py-2 text-sm font-medium text-status-warning-text bg-status-warning-bg-subtle rounded-button",
208
- children: "Cancellation Scheduled"
209
- })
210
- ]
187
+ children: [/* @__PURE__ */ _(ue, {
188
+ primary: J && S.canUpdateSubscription ? {
189
+ label: "Change Plan",
190
+ onSelect: () => y(p(`/subscriptions/${w.id}/upgrade`, C ?? w.billingAccountId))
191
+ } : void 0,
192
+ actions: [...J && S.canUpdateSubscription && U?.pricingModel === o.PER_SEAT ? [{
193
+ label: "Manage Seats",
194
+ onSelect: () => L(!0)
195
+ }] : [], ...J && S.canCancelSubscription && !w.canceledAt ? [{
196
+ label: O ? "Canceling…" : "Cancel Subscription",
197
+ onSelect: () => F(!0),
198
+ disabled: O,
199
+ intent: "destructive"
200
+ }] : []]
201
+ }), w.canceledAt && /* @__PURE__ */ _("span", {
202
+ className: "px-4 py-2 text-sm font-medium text-status-warning-text bg-status-warning-bg-subtle rounded-button",
203
+ children: "Cancellation Scheduled"
204
+ })]
211
205
  })]
212
206
  }),
213
- /* @__PURE__ */ y("div", {
207
+ /* @__PURE__ */ v("div", {
214
208
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
215
- children: [/* @__PURE__ */ y("div", {
209
+ children: [/* @__PURE__ */ v("div", {
216
210
  className: "lg:col-span-2 space-y-6",
217
211
  children: [
218
- J && /* @__PURE__ */ y(t, {
212
+ J && /* @__PURE__ */ v(de, {
219
213
  className: "p-5",
220
- children: [/* @__PURE__ */ y("div", {
214
+ children: [/* @__PURE__ */ v("div", {
221
215
  className: "flex items-center justify-between mb-4",
222
- children: [/* @__PURE__ */ v("h2", {
216
+ children: [/* @__PURE__ */ _("h2", {
223
217
  className: "text-base font-semibold text-text-primary",
224
218
  children: "Current Period"
225
- }), /* @__PURE__ */ y("span", {
219
+ }), /* @__PURE__ */ v("span", {
226
220
  className: "text-sm text-text-secondary tabular-nums",
227
221
  children: [$, " days remaining"]
228
222
  })]
229
- }), /* @__PURE__ */ y("div", {
223
+ }), /* @__PURE__ */ v("div", {
230
224
  className: "space-y-2",
231
- children: [/* @__PURE__ */ v(r, {
232
- value: Ce,
225
+ children: [/* @__PURE__ */ _(r, {
226
+ value: Te,
233
227
  status: "primary",
234
228
  size: "md",
235
229
  "aria-label": "Billing period progress"
236
- }), /* @__PURE__ */ y("div", {
230
+ }), /* @__PURE__ */ v("div", {
237
231
  className: "flex items-center justify-between text-sm text-text-secondary",
238
- children: [/* @__PURE__ */ v("span", { children: l(E.startDate, "short") }), /* @__PURE__ */ v("span", { children: l(E.endDate, "short") })]
232
+ children: [/* @__PURE__ */ _("span", { children: l(w.startDate, "short") }), /* @__PURE__ */ _("span", { children: l(w.endDate, "short") })]
239
233
  })]
240
234
  })]
241
235
  }),
242
- /* @__PURE__ */ y(t, {
236
+ /* @__PURE__ */ v(t, {
243
237
  className: "overflow-hidden",
244
- children: [/* @__PURE__ */ y("div", {
238
+ children: [/* @__PURE__ */ v("div", {
245
239
  className: "p-5 border-b border-border-subtle",
246
- children: [/* @__PURE__ */ y("h2", {
240
+ children: [/* @__PURE__ */ v("h2", {
247
241
  className: "text-base font-semibold text-text-primary",
248
- children: ["Plan Quotas", W.length > 0 && /* @__PURE__ */ y("span", {
242
+ children: ["Plan Quotas", W.length > 0 && /* @__PURE__ */ v("span", {
249
243
  className: "ml-2 text-sm font-normal text-text-muted tabular-nums",
250
244
  children: [
251
245
  "(",
@@ -253,84 +247,84 @@ var S = () => {
253
247
  ")"
254
248
  ]
255
249
  })]
256
- }), /* @__PURE__ */ v("p", {
250
+ }), /* @__PURE__ */ _("p", {
257
251
  className: "text-sm text-text-secondary mt-0.5",
258
252
  children: "Limits included in your plan"
259
253
  })]
260
- }), /* @__PURE__ */ v("div", {
254
+ }), /* @__PURE__ */ _("div", {
261
255
  className: "p-5",
262
- children: W.length === 0 ? /* @__PURE__ */ v("p", {
256
+ children: W.length === 0 ? /* @__PURE__ */ _("p", {
263
257
  className: "text-sm text-text-secondary",
264
258
  children: "No quotas assigned to this subscription."
265
- }) : /* @__PURE__ */ v("div", {
259
+ }) : /* @__PURE__ */ _("div", {
266
260
  className: "space-y-3",
267
- children: W.map((e) => /* @__PURE__ */ v(C, { quota: e }, e.id))
261
+ children: W.map((e) => /* @__PURE__ */ _(fe, { quota: e }, e.id))
268
262
  })
269
263
  })]
270
264
  }),
271
- J && M && /* @__PURE__ */ y(t, {
265
+ J && j && /* @__PURE__ */ v(t, {
272
266
  className: "overflow-hidden",
273
267
  children: [
274
- /* @__PURE__ */ y("div", {
268
+ /* @__PURE__ */ v("div", {
275
269
  className: "p-5 border-b border-border-subtle flex items-center justify-between gap-4",
276
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
270
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h2", {
277
271
  className: "text-base font-semibold text-text-primary",
278
272
  children: "Workspace Quotas"
279
- }), /* @__PURE__ */ v("p", {
273
+ }), /* @__PURE__ */ _("p", {
280
274
  className: "text-sm text-text-secondary mt-0.5",
281
275
  children: "Active limits for your workspace"
282
- })] }), X ? /* @__PURE__ */ v(n, {
276
+ })] }), X ? /* @__PURE__ */ _(n, {
283
277
  status: "success",
284
278
  dot: !0,
285
279
  children: "Active"
286
- }) : /* @__PURE__ */ v("button", {
280
+ }) : /* @__PURE__ */ _("button", {
287
281
  type: "button",
288
282
  onClick: () => R(!0),
289
283
  className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
290
284
  children: "Activate for Workspace"
291
285
  })]
292
286
  }),
293
- /* @__PURE__ */ v("div", {
287
+ /* @__PURE__ */ _("div", {
294
288
  className: "p-5",
295
- children: X ? Y.length > 0 ? /* @__PURE__ */ v("div", {
289
+ children: X ? Y.length > 0 ? /* @__PURE__ */ _("div", {
296
290
  className: "space-y-3",
297
- children: Y.map((e) => /* @__PURE__ */ v(le, { item: e }, e.assignment.id))
298
- }) : /* @__PURE__ */ y("p", {
291
+ children: Y.map((e) => /* @__PURE__ */ _(pe, { item: e }, e.assignment.id))
292
+ }) : /* @__PURE__ */ v("p", {
299
293
  className: "text-sm text-text-secondary",
300
294
  children: [
301
295
  "Quotas are activated on workspace",
302
296
  " ",
303
- /* @__PURE__ */ v("span", {
297
+ /* @__PURE__ */ _("span", {
304
298
  className: "font-mono text-xs text-text-primary bg-bg-sunken/60 rounded px-1.5 py-0.5",
305
- children: E.assignedWorkspaceId
299
+ children: w.assignedWorkspaceId
306
300
  }),
307
301
  ". Usage data will appear here once quotas are consumed."
308
302
  ]
309
- }) : /* @__PURE__ */ y("div", {
303
+ }) : /* @__PURE__ */ v("div", {
310
304
  className: "flex items-start gap-3",
311
- children: [/* @__PURE__ */ v("div", {
305
+ children: [/* @__PURE__ */ _("div", {
312
306
  className: "size-8 rounded-full bg-status-warning-bg-subtle flex items-center justify-center shrink-0 mt-0.5",
313
- children: /* @__PURE__ */ v("svg", {
307
+ children: /* @__PURE__ */ _("svg", {
314
308
  className: "size-4 text-status-warning-text",
315
309
  fill: "none",
316
310
  viewBox: "0 0 24 24",
317
311
  stroke: "currentColor",
318
- children: /* @__PURE__ */ v("path", {
312
+ children: /* @__PURE__ */ _("path", {
319
313
  strokeLinecap: "round",
320
314
  strokeLinejoin: "round",
321
315
  strokeWidth: 2,
322
316
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
323
317
  })
324
318
  })
325
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
319
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
326
320
  className: "text-sm font-medium text-text-primary",
327
321
  children: "Workspace quotas not activated yet"
328
- }), /* @__PURE__ */ y("p", {
322
+ }), /* @__PURE__ */ v("p", {
329
323
  className: "text-sm text-text-secondary mt-0.5",
330
324
  children: [
331
325
  "Click",
332
326
  " ",
333
- /* @__PURE__ */ v("button", {
327
+ /* @__PURE__ */ _("button", {
334
328
  type: "button",
335
329
  onClick: () => R(!0),
336
330
  className: "text-text-link hover:underline font-medium",
@@ -342,32 +336,32 @@ var S = () => {
342
336
  })] })]
343
337
  })
344
338
  }),
345
- ve && /* @__PURE__ */ v(g, {
346
- billingAccountId: T ?? E.billingAccountId,
347
- subscriptionId: E.id,
339
+ be && /* @__PURE__ */ _(oe, {
340
+ billingAccountId: C ?? w.billingAccountId,
341
+ subscriptionId: w.id,
348
342
  quotas: [],
349
343
  workspaces: [{
350
- id: M,
344
+ id: j,
351
345
  name: "Current workspace"
352
346
  }],
353
- currentWorkspaceId: M,
347
+ currentWorkspaceId: j,
354
348
  onAssigned: () => {
355
- R(!1), O(), P();
349
+ R(!1), E(), N();
356
350
  },
357
351
  onSkip: () => R(!1)
358
352
  })
359
353
  ]
360
354
  }),
361
- G.length > 0 && /* @__PURE__ */ y(t, {
355
+ G.length > 0 && /* @__PURE__ */ v(t, {
362
356
  className: "overflow-hidden",
363
- children: [/* @__PURE__ */ v("div", {
357
+ children: [/* @__PURE__ */ _("div", {
364
358
  className: "p-5 border-b border-border-subtle",
365
- children: /* @__PURE__ */ y("h2", {
359
+ children: /* @__PURE__ */ v("h2", {
366
360
  className: "text-base font-semibold text-text-primary",
367
361
  children: [
368
362
  "Addons",
369
363
  " ",
370
- /* @__PURE__ */ y("span", {
364
+ /* @__PURE__ */ v("span", {
371
365
  className: "text-sm font-normal text-text-muted tabular-nums",
372
366
  children: [
373
367
  "(",
@@ -377,31 +371,31 @@ var S = () => {
377
371
  })
378
372
  ]
379
373
  })
380
- }), /* @__PURE__ */ v("div", {
374
+ }), /* @__PURE__ */ _("div", {
381
375
  className: "p-5",
382
- children: /* @__PURE__ */ v("div", {
376
+ children: /* @__PURE__ */ _("div", {
383
377
  className: "space-y-3",
384
- children: G.map((e) => /* @__PURE__ */ v(ue, { addonSubscription: e }, e.id))
378
+ children: G.map((e) => /* @__PURE__ */ _(me, { addonSubscription: e }, e.id))
385
379
  })
386
380
  })]
387
381
  }),
388
- K.length > 0 && /* @__PURE__ */ y(t, {
382
+ K.length > 0 && /* @__PURE__ */ v(t, {
389
383
  className: "overflow-hidden",
390
384
  children: [
391
- /* @__PURE__ */ v("div", {
385
+ /* @__PURE__ */ _("div", {
392
386
  className: "p-5 border-b border-border-subtle",
393
- children: /* @__PURE__ */ v("h2", {
387
+ children: /* @__PURE__ */ _("h2", {
394
388
  className: "text-base font-semibold text-text-primary",
395
389
  children: "Recent Transactions"
396
390
  })
397
391
  }),
398
- /* @__PURE__ */ v("div", {
392
+ /* @__PURE__ */ _("div", {
399
393
  className: "divide-y divide-border-subtle",
400
- children: K.slice(0, 5).map((e) => /* @__PURE__ */ v(de, { transaction: e }, e.id))
394
+ children: K.slice(0, 5).map((e) => /* @__PURE__ */ _(he, { transaction: e }, e.id))
401
395
  }),
402
- K.length > 5 && /* @__PURE__ */ v("div", {
396
+ K.length > 5 && /* @__PURE__ */ _("div", {
403
397
  className: "p-4 text-center border-t border-border-subtle",
404
- children: /* @__PURE__ */ v("button", {
398
+ children: /* @__PURE__ */ _("button", {
405
399
  type: "button",
406
400
  className: "text-sm text-text-link hover:underline",
407
401
  children: "View all transactions"
@@ -410,140 +404,140 @@ var S = () => {
410
404
  ]
411
405
  })
412
406
  ]
413
- }), /* @__PURE__ */ y("div", {
414
- className: "space-y-6",
415
- children: [/* @__PURE__ */ y(t, {
407
+ }), /* @__PURE__ */ v("div", {
408
+ className: "space-y-6 lg:sticky lg:top-6 lg:self-start",
409
+ children: [/* @__PURE__ */ v(t, {
416
410
  className: "overflow-hidden",
417
- children: [/* @__PURE__ */ v("div", {
411
+ children: [/* @__PURE__ */ _("div", {
418
412
  className: "p-5 border-b border-border-subtle",
419
- children: /* @__PURE__ */ v("h2", {
413
+ children: /* @__PURE__ */ _("h2", {
420
414
  className: "text-base font-semibold text-text-primary",
421
415
  children: "Details"
422
416
  })
423
- }), /* @__PURE__ */ y("div", {
417
+ }), /* @__PURE__ */ v("div", {
424
418
  className: "p-5 space-y-4",
425
419
  children: [
426
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
420
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
427
421
  className: "text-sm text-text-secondary",
428
422
  children: "Subscription ID"
429
- }), /* @__PURE__ */ v("p", {
423
+ }), /* @__PURE__ */ _("p", {
430
424
  className: "font-mono text-sm text-text-primary mt-0.5 break-all",
431
- children: E.id
425
+ children: w.id
432
426
  })] }),
433
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
427
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
434
428
  className: "text-sm text-text-secondary",
435
429
  children: "Plan"
436
- }), /* @__PURE__ */ v("p", {
430
+ }), /* @__PURE__ */ _("p", {
437
431
  className: "text-sm text-text-primary mt-0.5",
438
432
  children: U?.name || "Unknown"
439
433
  })] }),
440
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
434
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
441
435
  className: "text-sm text-text-secondary",
442
436
  children: "Billing Account"
443
- }), /* @__PURE__ */ v("p", {
437
+ }), /* @__PURE__ */ _("p", {
444
438
  className: "text-sm text-text-primary mt-0.5",
445
- children: E.billingAccount?.name || "Unknown"
439
+ children: w.billingAccount?.name || "Unknown"
446
440
  })] }),
447
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
441
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
448
442
  className: "text-sm text-text-secondary",
449
443
  children: "Start Date"
450
- }), /* @__PURE__ */ v("p", {
444
+ }), /* @__PURE__ */ _("p", {
451
445
  className: "text-sm text-text-primary mt-0.5",
452
- children: l(E.startDate)
446
+ children: l(w.startDate)
453
447
  })] }),
454
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
448
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
455
449
  className: "text-sm text-text-secondary",
456
450
  children: "End Date"
457
- }), /* @__PURE__ */ v("p", {
451
+ }), /* @__PURE__ */ _("p", {
458
452
  className: "text-sm text-text-primary mt-0.5",
459
- children: l(E.endDate)
453
+ children: l(w.endDate)
460
454
  })] }),
461
- E.nextBillingDate && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
455
+ w.nextBillingDate && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
462
456
  className: "text-sm text-text-secondary",
463
457
  children: "Next Billing"
464
- }), /* @__PURE__ */ v("p", {
458
+ }), /* @__PURE__ */ _("p", {
465
459
  className: "text-sm text-text-primary mt-0.5",
466
- children: l(E.nextBillingDate)
460
+ children: l(w.nextBillingDate)
467
461
  })] }),
468
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
462
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
469
463
  className: "text-sm text-text-secondary",
470
464
  children: "Auto Renewal"
471
- }), /* @__PURE__ */ v("p", {
465
+ }), /* @__PURE__ */ _("p", {
472
466
  className: "text-sm text-text-primary mt-0.5",
473
- children: E.autoRenewal ? "Enabled" : "Disabled"
467
+ children: w.autoRenewal ? "Enabled" : "Disabled"
474
468
  })] }),
475
- E.paymentGateway && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
469
+ w.paymentGateway && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
476
470
  className: "text-sm text-text-secondary",
477
471
  children: "Payment Gateway"
478
- }), /* @__PURE__ */ v("p", {
472
+ }), /* @__PURE__ */ _("p", {
479
473
  className: "text-sm text-text-primary mt-0.5 capitalize",
480
- children: E.paymentGateway
474
+ children: w.paymentGateway
481
475
  })] })
482
476
  ]
483
477
  })]
484
- }), q.length > 0 && /* @__PURE__ */ y(t, {
478
+ }), q.length > 0 && /* @__PURE__ */ v(t, {
485
479
  className: "overflow-hidden",
486
- children: [/* @__PURE__ */ v("div", {
480
+ children: [/* @__PURE__ */ _("div", {
487
481
  className: "p-5 border-b border-border-subtle",
488
- children: /* @__PURE__ */ v("h2", {
482
+ children: /* @__PURE__ */ _("h2", {
489
483
  className: "text-base font-semibold text-text-primary",
490
484
  children: "History"
491
485
  })
492
- }), /* @__PURE__ */ v("div", {
486
+ }), /* @__PURE__ */ _("div", {
493
487
  className: "p-5",
494
- children: /* @__PURE__ */ v("div", {
488
+ children: /* @__PURE__ */ _("div", {
495
489
  className: "space-y-3",
496
- children: q.slice(0, 5).map((e) => /* @__PURE__ */ v(fe, { item: e }, e.id))
490
+ children: q.slice(0, 5).map((e) => /* @__PURE__ */ _(ge, { item: e }, e.id))
497
491
  })
498
492
  })]
499
493
  })]
500
494
  })]
501
495
  }),
502
- _e && E && /* @__PURE__ */ v(oe, {
503
- subscription: E,
496
+ I && w && /* @__PURE__ */ _(h, {
497
+ subscription: w,
504
498
  onClose: () => L(!1),
505
499
  onConfirm: async (e) => {
506
- await A({
507
- subscriptionId: E.id,
500
+ await k({
501
+ subscriptionId: w.id,
508
502
  seatCount: e
509
- }), await O();
503
+ }), await E();
510
504
  },
511
- isLoading: j
505
+ isLoading: A
512
506
  }),
513
- F && /* @__PURE__ */ y("div", {
507
+ P && /* @__PURE__ */ v("div", {
514
508
  className: "fixed inset-0 z-50 flex items-center justify-center",
515
- children: [/* @__PURE__ */ v("div", {
509
+ children: [/* @__PURE__ */ _("div", {
516
510
  className: "absolute inset-0 bg-overlay-scrim",
517
- onClick: () => I(!1)
518
- }), /* @__PURE__ */ y("div", {
519
- className: "relative bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] w-full max-w-md mx-4 p-6",
511
+ onClick: () => F(!1)
512
+ }), /* @__PURE__ */ v("div", {
513
+ className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] w-full max-w-md mx-4 p-6",
520
514
  role: "dialog",
521
515
  "aria-modal": "true",
522
516
  "aria-labelledby": "cancel-subscription-title",
523
517
  children: [
524
- /* @__PURE__ */ v("h3", {
518
+ /* @__PURE__ */ _("h3", {
525
519
  id: "cancel-subscription-title",
526
520
  className: "text-lg font-semibold text-text-primary mb-2",
527
521
  children: "Cancel Subscription"
528
522
  }),
529
- /* @__PURE__ */ y("p", {
523
+ /* @__PURE__ */ v("p", {
530
524
  className: "text-sm text-text-secondary mb-4",
531
525
  children: [
532
526
  "Are you sure you want to cancel this subscription? Your subscription will remain active until",
533
527
  " ",
534
- /* @__PURE__ */ v("span", {
528
+ /* @__PURE__ */ _("span", {
535
529
  className: "font-medium text-text-primary",
536
- children: l(E.endDate)
530
+ children: l(w.endDate)
537
531
  }),
538
532
  ", but will not renew automatically."
539
533
  ]
540
534
  }),
541
- /* @__PURE__ */ y("div", {
535
+ /* @__PURE__ */ v("div", {
542
536
  className: "mb-4",
543
- children: [/* @__PURE__ */ v("label", {
537
+ children: [/* @__PURE__ */ _("label", {
544
538
  className: "block text-sm font-medium text-text-primary mb-1",
545
539
  children: "Reason for cancellation (optional)"
546
- }), /* @__PURE__ */ v("textarea", {
540
+ }), /* @__PURE__ */ _("textarea", {
547
541
  value: z,
548
542
  onChange: (e) => B(e.target.value),
549
543
  placeholder: "Please share why you're canceling...",
@@ -551,28 +545,28 @@ var S = () => {
551
545
  rows: 3
552
546
  })]
553
547
  }),
554
- V && /* @__PURE__ */ v("div", {
548
+ V && /* @__PURE__ */ _("div", {
555
549
  className: "mb-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-card",
556
- children: /* @__PURE__ */ v("p", {
550
+ children: /* @__PURE__ */ _("p", {
557
551
  className: "text-sm text-status-error-text",
558
552
  children: V
559
553
  })
560
554
  }),
561
- /* @__PURE__ */ y("div", {
555
+ /* @__PURE__ */ v("div", {
562
556
  className: "flex items-center justify-end gap-3",
563
- children: [/* @__PURE__ */ v("button", {
557
+ children: [/* @__PURE__ */ _("button", {
564
558
  type: "button",
565
559
  onClick: () => {
566
- I(!1), B(""), H(null);
560
+ F(!1), B(""), H(null);
567
561
  },
568
562
  className: "px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
569
563
  children: "Keep Subscription"
570
- }), /* @__PURE__ */ v("button", {
564
+ }), /* @__PURE__ */ _("button", {
571
565
  type: "button",
572
- onClick: ye,
573
- disabled: k,
566
+ onClick: xe,
567
+ disabled: O,
574
568
  className: "px-4 py-2 text-sm font-medium bg-action-danger-bg text-action-danger-text rounded-button hover:bg-action-danger-bgHover transition-colors duration-200 disabled:opacity-50",
575
- children: k ? "Canceling..." : "Confirm Cancellation"
569
+ children: O ? "Canceling..." : "Confirm Cancellation"
576
570
  })]
577
571
  })
578
572
  ]
@@ -580,23 +574,23 @@ var S = () => {
580
574
  })
581
575
  ]
582
576
  });
583
- }, C = ({ quota: e }) => {
584
- let t = e.context, n = b(e.name, t), r = t?.description && typeof t.description == "string" ? t.description : null, i = e.limits?.value ?? 0, a = e.currentUsageSum ?? 0, o = i > 0 ? Math.min(100, a / i * 100) : 0, c = e.name.includes("bytes") || e.name.includes("storage"), d = e.quotaType === "POOLED";
585
- return /* @__PURE__ */ y("div", {
586
- className: "p-4 rounded-card border border-border-subtle bg-bg-surface",
577
+ }, fe = ({ quota: e }) => {
578
+ let t = e.context, n = y(e.name, t), r = t?.description && typeof t.description == "string" ? t.description : null, i = e.limits?.value ?? 0, a = e.currentUsageSum ?? 0, o = i > 0 ? Math.min(100, a / i * 100) : 0, c = e.name.includes("bytes") || e.name.includes("storage"), d = e.quotaType === "POOLED";
579
+ return /* @__PURE__ */ v("div", {
580
+ className: "p-4 rounded-card border border-border-seam bg-bg-surface",
587
581
  children: [
588
- /* @__PURE__ */ y("div", {
582
+ /* @__PURE__ */ v("div", {
589
583
  className: "flex items-start justify-between gap-4 mb-2",
590
- children: [/* @__PURE__ */ y("div", {
584
+ children: [/* @__PURE__ */ v("div", {
591
585
  className: "min-w-0",
592
- children: [/* @__PURE__ */ v("p", {
586
+ children: [/* @__PURE__ */ _("p", {
593
587
  className: "font-medium text-text-primary truncate",
594
588
  children: n
595
- }), r && /* @__PURE__ */ v("p", {
589
+ }), r && /* @__PURE__ */ _("p", {
596
590
  className: "text-xs text-text-secondary mt-0.5 line-clamp-2",
597
591
  children: r
598
592
  })]
599
- }), /* @__PURE__ */ y("span", {
593
+ }), /* @__PURE__ */ v("span", {
600
594
  className: "text-sm font-medium text-text-primary shrink-0 tabular-nums",
601
595
  children: [
602
596
  c ? s(a) : a.toLocaleString(),
@@ -605,21 +599,21 @@ var S = () => {
605
599
  ]
606
600
  })]
607
601
  }),
608
- i > 0 && /* @__PURE__ */ v("div", {
602
+ i > 0 && /* @__PURE__ */ _("div", {
609
603
  className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden mb-2",
610
- children: /* @__PURE__ */ v("div", {
611
- className: `h-full rounded-full transition-all duration-300 ${p(o)}`,
604
+ children: /* @__PURE__ */ _("div", {
605
+ className: `h-full rounded-full transition-all duration-300 ${f(o)}`,
612
606
  style: { width: `${o}%` }
613
607
  })
614
608
  }),
615
- /* @__PURE__ */ y("div", {
609
+ /* @__PURE__ */ v("div", {
616
610
  className: "flex items-center justify-between text-xs text-text-secondary",
617
- children: [/* @__PURE__ */ v("span", {
611
+ children: [/* @__PURE__ */ _("span", {
618
612
  className: "px-1.5 py-0.5 rounded bg-bg-sunken font-medium",
619
613
  children: d ? "Shared" : "Per Workspace"
620
- }), /* @__PURE__ */ y("div", {
614
+ }), /* @__PURE__ */ v("div", {
621
615
  className: "flex items-center gap-3",
622
- children: [e.endtime && /* @__PURE__ */ y("span", { children: ["Expires ", l(e.endtime, "short")] }), i > 0 && /* @__PURE__ */ y("span", {
616
+ children: [e.endtime && /* @__PURE__ */ v("span", { children: ["Expires ", l(e.endtime, "short")] }), i > 0 && /* @__PURE__ */ v("span", {
623
617
  className: o >= 90 ? "text-status-error-text font-medium" : o >= 70 ? "text-status-warning-text font-medium" : "",
624
618
  children: [u(o), " used"]
625
619
  })]
@@ -627,23 +621,23 @@ var S = () => {
627
621
  })
628
622
  ]
629
623
  });
630
- }, le = ({ item: e }) => {
631
- let { assignment: t, effectiveUsed: n, usagePercentage: r } = e, i = b(t.quotaName), a = !t.noLimit && t.limit !== null, o = t.limit ?? 0, c = t.quotaName.includes("bytes") || t.quotaName.includes("storage"), d = x(t.resetPeriod);
632
- return /* @__PURE__ */ y("div", {
633
- className: "p-4 rounded-card border border-border-subtle bg-bg-surface",
624
+ }, pe = ({ item: e }) => {
625
+ let { assignment: t, effectiveUsed: n, usagePercentage: r } = e, i = y(t.quotaName), a = !t.noLimit && t.limit !== null, o = t.limit ?? 0, c = t.quotaName.includes("bytes") || t.quotaName.includes("storage"), d = b(t.resetPeriod);
626
+ return /* @__PURE__ */ v("div", {
627
+ className: "p-4 rounded-card border border-border-seam bg-bg-surface",
634
628
  children: [
635
- /* @__PURE__ */ y("div", {
629
+ /* @__PURE__ */ v("div", {
636
630
  className: "flex items-start justify-between gap-4 mb-2",
637
- children: [/* @__PURE__ */ y("div", {
631
+ children: [/* @__PURE__ */ v("div", {
638
632
  className: "min-w-0",
639
- children: [/* @__PURE__ */ v("p", {
633
+ children: [/* @__PURE__ */ _("p", {
640
634
  className: "font-medium text-text-primary truncate",
641
635
  children: i
642
- }), /* @__PURE__ */ y("p", {
636
+ }), /* @__PURE__ */ v("p", {
643
637
  className: "text-xs text-text-secondary mt-0.5",
644
638
  children: [t.quotaMode === "pooled" ? "Pooled across workspaces" : "Dedicated", d && ` · ${d}`]
645
639
  })]
646
- }), /* @__PURE__ */ y("span", {
640
+ }), /* @__PURE__ */ v("span", {
647
641
  className: "text-sm font-medium text-text-primary shrink-0 tabular-nums",
648
642
  children: [
649
643
  c ? s(n) : n.toLocaleString(),
@@ -652,83 +646,83 @@ var S = () => {
652
646
  ]
653
647
  })]
654
648
  }),
655
- a && /* @__PURE__ */ v("div", {
649
+ a && /* @__PURE__ */ _("div", {
656
650
  className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden mb-2",
657
- children: /* @__PURE__ */ v("div", {
658
- className: `h-full rounded-full transition-all duration-300 ${p(r)}`,
651
+ children: /* @__PURE__ */ _("div", {
652
+ className: `h-full rounded-full transition-all duration-300 ${f(r)}`,
659
653
  style: { width: `${Math.min(100, r)}%` }
660
654
  })
661
655
  }),
662
- /* @__PURE__ */ y("div", {
656
+ /* @__PURE__ */ v("div", {
663
657
  className: "flex items-center justify-between text-xs text-text-secondary",
664
- children: [/* @__PURE__ */ y("span", { children: ["Since ", l(t.createdAt, "short")] }), a && /* @__PURE__ */ y("span", {
658
+ children: [/* @__PURE__ */ v("span", { children: ["Since ", l(t.createdAt, "short")] }), a && /* @__PURE__ */ v("span", {
665
659
  className: r >= 90 ? "text-status-error-text font-medium" : r >= 70 ? "text-status-warning-text font-medium" : "",
666
660
  children: [u(r), " used"]
667
661
  })]
668
662
  })
669
663
  ]
670
664
  });
671
- }, ue = ({ addonSubscription: e }) => {
665
+ }, me = ({ addonSubscription: e }) => {
672
666
  let t = e.addon;
673
- return /* @__PURE__ */ y("div", {
674
- className: "flex items-center justify-between p-3 rounded-card border border-border-subtle bg-bg-sunken",
675
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
667
+ return /* @__PURE__ */ v("div", {
668
+ className: "flex items-center justify-between p-3 rounded-card border border-border-seam bg-bg-sunken",
669
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
676
670
  className: "font-medium text-text-primary",
677
671
  children: t?.name || "Unknown Addon"
678
- }), /* @__PURE__ */ y("p", {
672
+ }), /* @__PURE__ */ v("p", {
679
673
  className: "text-sm text-text-secondary",
680
674
  children: ["Qty: ", e.quantity]
681
- })] }), t && /* @__PURE__ */ v("p", {
675
+ })] }), t && /* @__PURE__ */ _("p", {
682
676
  className: "text-sm font-medium text-text-primary tabular-nums",
683
677
  children: c(t.price * e.quantity, t.currency)
684
678
  })]
685
679
  });
686
- }, de = ({ transaction: e }) => /* @__PURE__ */ y("div", {
680
+ }, he = ({ transaction: e }) => /* @__PURE__ */ v("div", {
687
681
  className: "flex items-center justify-between px-5 py-4 hover:bg-bg-sunken transition-colors",
688
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
682
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
689
683
  className: "font-medium text-text-primary capitalize",
690
684
  children: e.type
691
- }), /* @__PURE__ */ v("p", {
685
+ }), /* @__PURE__ */ _("p", {
692
686
  className: "text-sm text-text-secondary",
693
687
  children: l(e.createdAt, "short")
694
- })] }), /* @__PURE__ */ y("div", {
688
+ })] }), /* @__PURE__ */ v("div", {
695
689
  className: "text-right",
696
- children: [/* @__PURE__ */ y("p", {
690
+ children: [/* @__PURE__ */ v("p", {
697
691
  className: `font-medium tabular-nums ${e.type === "refund" ? "text-status-error-text" : "text-text-primary"}`,
698
692
  children: [e.type === "refund" ? "-" : "", c(e.amount, e.currency)]
699
- }), /* @__PURE__ */ v("p", {
693
+ }), /* @__PURE__ */ _("p", {
700
694
  className: "text-sm text-text-secondary capitalize",
701
695
  children: e.status
702
696
  })]
703
697
  })]
704
- }), fe = ({ item: e }) => /* @__PURE__ */ y("div", {
698
+ }), ge = ({ item: e }) => /* @__PURE__ */ v("div", {
705
699
  className: "flex items-start gap-3",
706
- children: [/* @__PURE__ */ v("div", { className: "size-2 rounded-full bg-text-muted mt-2 shrink-0" }), /* @__PURE__ */ y("div", { children: [
707
- /* @__PURE__ */ y("p", {
700
+ children: [/* @__PURE__ */ _("div", { className: "size-2 rounded-full bg-text-muted mt-2 shrink-0" }), /* @__PURE__ */ v("div", { children: [
701
+ /* @__PURE__ */ v("p", {
708
702
  className: "text-sm text-text-primary",
709
703
  children: [
710
- /* @__PURE__ */ v("span", {
704
+ /* @__PURE__ */ _("span", {
711
705
  className: "capitalize",
712
706
  children: e.fromStatus
713
707
  }),
714
708
  " → ",
715
- /* @__PURE__ */ v("span", {
709
+ /* @__PURE__ */ _("span", {
716
710
  className: "capitalize font-medium",
717
711
  children: e.toStatus
718
712
  })
719
713
  ]
720
714
  }),
721
- e.reason && /* @__PURE__ */ v("p", {
715
+ e.reason && /* @__PURE__ */ _("p", {
722
716
  className: "text-xs text-text-secondary mt-0.5",
723
717
  children: e.reason
724
718
  }),
725
- /* @__PURE__ */ v("p", {
719
+ /* @__PURE__ */ _("p", {
726
720
  className: "text-xs text-text-secondary mt-0.5",
727
721
  children: l(e.createdAt, "short")
728
722
  })
729
723
  ] })]
730
724
  });
731
725
  //#endregion
732
- export { S as SubscriptionDetailPage };
726
+ export { x as SubscriptionDetailPage };
733
727
 
734
728
  //# sourceMappingURL=SubscriptionDetailPage.js.map