@burdenoff/microfe-billing 2026.830.1 → 2026.830.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.
@@ -1,248 +1,248 @@
1
1
  import { useBilling as e } from "../../../providers/BillingProvider.js";
2
- import { AccessDenied as t } from "../../../shared/components/AccessDenied.js";
3
- import { PageHeader as n } from "../../../shared/components/PageHeader.js";
2
+ import { useTr as t } from "../../../shared/hooks/useTr.js";
3
+ import { AccessDenied as n } from "../../../shared/components/AccessDenied.js";
4
+ import { PageHeader as ee } from "../../../shared/components/PageHeader.js";
4
5
  import "../../../shared/components/index.js";
5
- import { useBillingEventEmitter as ee } from "../../../hooks/useBillingEventEmitter.js";
6
- import { directBillingGraphqlRequest as te } from "../../../shared/utils/directBillingGraphql.js";
6
+ import { useBillingEventEmitter as te } from "../../../hooks/useBillingEventEmitter.js";
7
+ import { directBillingGraphqlRequest as r } from "../../../shared/utils/directBillingGraphql.js";
7
8
  import "../../../shared/utils/index.js";
8
- import { useBillingPermissions as ne } from "../../../hooks/useBillingPermissions.js";
9
- import { ArchiveBillingAccountSettingsDocument as re, useGetBillingAccountSettingsQuery as ie, useGetBillingAccountsSettingsQuery as ae, useGetDefaultBillingAccountSettingsQuery as oe, useSetDefaultBillingAccountSettingsMutation as se, useUpdateBillingAccountSettingsMutation as ce } from "../../../../generated/global-operations.js";
10
- import { useCallback as r, useEffect as le, useMemo as i, useState as a } from "react";
11
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
12
- import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
- import { AlertDialog as de, AlertDialogAction as fe, AlertDialogCancel as pe, AlertDialogContent as me, AlertDialogDescription as he, AlertDialogFooter as ge, AlertDialogHeader as _e, AlertDialogTitle as l, OptionalFields as u, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
9
+ import { useBillingPermissions as i } from "../../../hooks/useBillingPermissions.js";
10
+ import { ArchiveBillingAccountSettingsDocument as ne, useGetBillingAccountSettingsQuery as re, useGetBillingAccountsSettingsQuery as ie, useGetDefaultBillingAccountSettingsQuery as ae, useSetDefaultBillingAccountSettingsMutation as a, useUpdateBillingAccountSettingsMutation as oe } from "../../../../generated/global-operations.js";
11
+ import { useCallback as o, useEffect as se, useMemo as s, useState as c } from "react";
12
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
13
+ import { AlertDialog as ce, AlertDialogAction as le, AlertDialogCancel as ue, AlertDialogContent as de, AlertDialogDescription as fe, AlertDialogFooter as pe, AlertDialogHeader as me, AlertDialogTitle as f, OptionalFields as he, PagePurpose as ge } from "@burdenoff/fe-libs/ui";
14
14
  //#region src/billing/modules/settings/pages/SettingsPage.tsx
15
- var ye = () => {
15
+ var _e = () => {
16
16
  if (!(typeof window > "u")) return new URLSearchParams(window.location.search).get("billingAccountId") || void 0;
17
- }, d = () => {
18
- let { t: d } = ue(), f = (e, t) => {
19
- let n = d(e);
20
- return n === e ? t : n;
21
- }, p = ne(), { apiGatewayUrl: m, authToken: h, orgId: g } = e(), { emit: _ } = ee(), [v, y] = a(ye), [b, x] = a(!1), [S, C] = a(!1), [w, T] = a(!1), [be, E] = a(!1), [D, O] = a(null), [xe, k] = a(!1), [A, j] = a(!1), [M, N] = a(!1), [P, F] = a({
17
+ }, p = () => {
18
+ let p = t(), m = i(), { apiGatewayUrl: h, authToken: g, orgId: _ } = e(), { emit: v } = te(), [y, b] = c(_e), [x, S] = c(!1), [C, w] = c(!1), [T, E] = c(!1), [ve, D] = c(!1), [O, k] = c(null), [ye, A] = c(!1), [j, M] = c(!1), [N, P] = c(!1), [F, I] = c({
22
19
  name: "",
23
20
  email: "",
24
21
  billingEmail: "",
25
22
  currency: "USD",
26
23
  taxId: "",
27
24
  isDefault: !1
28
- }), { data: I, loading: Se, refetch: L } = ae({}), R = i(() => I?.getBillingAccountsByOrg || [], [I?.getBillingAccountsByOrg]), { data: Ce, loading: we, refetch: z } = oe({}), B = Ce?.getDefaultBillingAccount || null, { data: Te, loading: V, refetch: H } = ie({
29
- variables: { id: v },
30
- skip: !v
31
- }), U = Te?.getBillingAccount || null, [W] = ce(), [G] = se(), K = i(() => {
32
- if (v) {
33
- if (U) return U;
34
- let e = R.find((e) => e.id === v);
25
+ }), { data: L, loading: be, refetch: R } = ie({}), z = s(() => L?.getBillingAccountsByOrg || [], [L?.getBillingAccountsByOrg]), { data: xe, loading: Se, refetch: B } = ae({}), V = xe?.getDefaultBillingAccount || null, { data: Ce, loading: H, refetch: U } = re({
26
+ variables: { id: y },
27
+ skip: !y
28
+ }), W = Ce?.getBillingAccount || null, [G] = oe(), [K] = a(), q = s(() => {
29
+ if (y) {
30
+ if (W) return W;
31
+ let e = z.find((e) => e.id === y);
35
32
  if (e) return e;
36
- if (V) return null;
33
+ if (H) return null;
37
34
  }
38
- return B;
35
+ return V;
39
36
  }, [
40
- v,
41
- U,
42
- R,
43
- V,
44
- B
45
- ]), Ee = Se || we || v && V;
46
- le(() => {
47
- K && F({
48
- name: K.name || "",
49
- email: K.email || "",
50
- billingEmail: K.billingEmail || "",
51
- currency: K.currency || "USD",
52
- taxId: K.taxId || "",
53
- isDefault: K.isDefault || !1
37
+ y,
38
+ W,
39
+ z,
40
+ H,
41
+ V
42
+ ]), we = be || Se || y && H;
43
+ se(() => {
44
+ q && I({
45
+ name: q.name || "",
46
+ email: q.email || "",
47
+ billingEmail: q.billingEmail || "",
48
+ currency: q.currency || "USD",
49
+ taxId: q.taxId || "",
50
+ isDefault: q.isDefault || !1
54
51
  });
55
- }, [K]);
56
- let De = (e) => {
57
- y(e.id), x(!1), k(!1), O(null);
58
- }, q = (e, t) => {
59
- F((n) => ({
52
+ }, [q]);
53
+ let Te = (e) => {
54
+ b(e.id), S(!1), A(!1), k(null);
55
+ }, J = (e, t) => {
56
+ I((n) => ({
60
57
  ...n,
61
58
  [e]: t
62
- })), k(!1), O(null);
63
- }, J = i(() => R.find((e) => e.isDefault) || null, [R]), Y = i(() => K ? P.name !== (K.name || "") || P.email !== (K.email || "") || P.billingEmail !== (K.billingEmail || "") || P.currency !== (K.currency || "USD") || P.taxId !== (K.taxId || "") || P.isDefault !== (K.isDefault || !1) : !1, [P, K]), X = P.isDefault && !K?.isDefault, Z = X && J && J.id !== K?.id, Q = r(async () => {
64
- if (K?.id) {
65
- C(!0), O(null), k(!1), j(!1), N(!1);
59
+ })), A(!1), k(null);
60
+ }, Y = s(() => z.find((e) => e.isDefault) || null, [z]), Ee = s(() => q ? F.name !== (q.name || "") || F.email !== (q.email || "") || F.billingEmail !== (q.billingEmail || "") || F.currency !== (q.currency || "USD") || F.taxId !== (q.taxId || "") || F.isDefault !== (q.isDefault || !1) : !1, [F, q]), X = F.isDefault && !q?.isDefault, Z = X && Y && Y.id !== q?.id, Q = o(async () => {
61
+ if (q?.id) {
62
+ w(!0), k(null), A(!1), M(!1), P(!1);
66
63
  try {
67
- await W({ variables: { input: {
68
- id: K.id,
69
- name: P.name,
70
- email: P.email,
71
- billingEmail: P.billingEmail || null,
72
- currency: P.currency,
73
- taxId: P.taxId || null
74
- } } }), _("billing.billing_account.updated", {
64
+ await G({ variables: { input: {
65
+ id: q.id,
66
+ name: F.name,
67
+ email: F.email,
68
+ billingEmail: F.billingEmail || null,
69
+ currency: F.currency,
70
+ taxId: F.taxId || null
71
+ } } }), v("billing.billing_account.updated", {
75
72
  route: "/billing/settings",
76
- entityId: K.id,
73
+ entityId: q.id,
77
74
  source: "settings"
78
- }), X && (await G({
79
- variables: { id: K.id },
75
+ }), X && (await K({
76
+ variables: { id: q.id },
80
77
  refetchQueries: ["GetBillingAccountsByTenant", "GetDefaultBillingAccount"]
81
- }), _("billing.billing_account.updated", {
78
+ }), v("billing.billing_account.updated", {
82
79
  route: "/billing/settings",
83
- entityId: K.id,
80
+ entityId: q.id,
84
81
  source: "settings.default"
85
- })), v ? await H() : await z(), k(!0), setTimeout(() => k(!1), 3e3);
82
+ })), y ? await U() : await B(), A(!0), setTimeout(() => A(!1), 3e3);
86
83
  } catch (e) {
87
- O(e instanceof Error ? e.message : "Failed to save changes");
84
+ k(e instanceof Error ? e.message : "Failed to save changes");
88
85
  } finally {
89
- C(!1);
86
+ w(!1);
90
87
  }
91
88
  }
92
89
  }, [
93
- K?.id,
94
- P,
90
+ q?.id,
91
+ F,
95
92
  X,
96
- W,
97
93
  G,
98
- v,
99
- H,
100
- z,
101
- _
102
- ]), Oe = r(() => {
103
- K?.id && (Z ? (N(!0), j(!0)) : Q());
94
+ K,
95
+ y,
96
+ U,
97
+ B,
98
+ v
99
+ ]), De = o(() => {
100
+ q?.id && (Z ? (P(!0), M(!0)) : Q());
104
101
  }, [
105
- K?.id,
102
+ q?.id,
106
103
  Z,
107
104
  Q
108
- ]), $ = i(() => K ? R.find((e) => e.id !== K.id && e.isActive) : void 0, [K, R]), ke = K ? K.isDefault ? `Archive ${K.name}? ${$ ? `${$.name} will become the default account.` : "No replacement default account is available."}` : `Archive ${K.name}?` : "", Ae = r(async () => {
109
- if (!(!K?.id || !K.isActive)) {
110
- T(!0), O(null), k(!1);
105
+ ]), $ = s(() => q ? z.find((e) => e.id !== q.id && e.isActive) : void 0, [q, z]), Oe = q ? q.isDefault ? $ ? p("billing.settings.archiveDefaultConfirm", "Archive {{accountName}}? {{replacementName}} will become the default account.", {
106
+ accountName: q.name,
107
+ replacementName: $.name
108
+ }) : p("billing.settings.archiveDefaultNoReplacementConfirm", "Archive {{accountName}}? No replacement default account is available.", { accountName: q.name }) : p("billing.settings.archiveConfirm", "Archive {{accountName}}?", { accountName: q.name }) : "", ke = o(async () => {
109
+ if (!(!q?.id || !q.isActive)) {
110
+ E(!0), k(null), A(!1);
111
111
  try {
112
- await te({
113
- apiGatewayUrl: m,
114
- authToken: h,
115
- orgId: g,
116
- query: re,
112
+ await r({
113
+ apiGatewayUrl: h,
114
+ authToken: g,
115
+ orgId: _,
116
+ query: ne,
117
117
  variables: {
118
- id: K.id,
118
+ id: q.id,
119
119
  reason: "Archived from billing settings",
120
- replacementDefaultBillingAccountId: K.isDefault ? $?.id ?? null : null
120
+ replacementDefaultBillingAccountId: q.isDefault ? $?.id ?? null : null
121
121
  }
122
- }), _("billing.billing_account.archived", {
122
+ }), v("billing.billing_account.archived", {
123
123
  route: "/billing/settings",
124
- entityId: K.id,
124
+ entityId: q.id,
125
125
  source: "settings"
126
- }), await Promise.all([L(), z()]), y($?.id), k(!0), setTimeout(() => k(!1), 3e3);
126
+ }), await Promise.all([R(), B()]), b($?.id), A(!0), setTimeout(() => A(!1), 3e3);
127
127
  } catch (e) {
128
- O(e instanceof Error ? e.message : "Failed to archive billing account");
128
+ k(e instanceof Error ? e.message : "Failed to archive billing account");
129
129
  } finally {
130
- T(!1);
130
+ E(!1);
131
131
  }
132
132
  }
133
133
  }, [
134
- m,
135
134
  h,
136
- K,
137
- $,
138
135
  g,
139
- L,
140
- z,
141
- _
136
+ q,
137
+ $,
138
+ _,
139
+ R,
140
+ B,
141
+ v
142
142
  ]);
143
- return p.canManageBillingAccount ? Ee && !K ? /* @__PURE__ */ c("div", {
143
+ return m.canManageBillingAccount ? we && !q ? /* @__PURE__ */ d("div", {
144
144
  className: "space-y-6 p-6",
145
- children: [/* @__PURE__ */ s("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ s("div", {
145
+ children: [/* @__PURE__ */ u("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ u("div", {
146
146
  className: "border border-border-subtle rounded-lg p-6 space-y-4",
147
147
  children: [
148
148
  1,
149
149
  2,
150
150
  3
151
- ].map((e) => /* @__PURE__ */ s("div", { className: "h-10 bg-bg-sunken animate-pulse rounded" }, e))
151
+ ].map((e) => /* @__PURE__ */ u("div", { className: "h-10 bg-bg-sunken animate-pulse rounded" }, e))
152
152
  })]
153
- }) : /* @__PURE__ */ c("div", {
153
+ }) : /* @__PURE__ */ d("div", {
154
154
  className: "space-y-6 p-6",
155
155
  children: [
156
- /* @__PURE__ */ s(n, {
157
- title: f("billing.settings.billingSettings", "Billing Settings"),
158
- description: f("billing.settings.description", "Manage your billing account configuration")
156
+ /* @__PURE__ */ u(ee, {
157
+ title: p("billing.settings.billingSettings", "Billing Settings"),
158
+ description: p("billing.settings.description", "Manage your billing account configuration")
159
159
  }),
160
- /* @__PURE__ */ s(ve, { children: f("billing.settings.purpose", "Configure how a billing account behaves — its name and contact details, default currency, tax information and whether it's your default account. Changes here affect how invoices are generated and which account new purchases bill to.") }),
161
- R.length > 1 && /* @__PURE__ */ c("div", {
160
+ /* @__PURE__ */ u(ge, { children: p("billing.settings.purpose", "Configure how a billing account behaves — its name and contact details, default currency, tax information and whether it's your default account. Changes here affect how invoices are generated and which account new purchases bill to.") }),
161
+ z.length > 1 && /* @__PURE__ */ d("div", {
162
162
  className: "relative",
163
- children: [/* @__PURE__ */ c("button", {
163
+ children: [/* @__PURE__ */ d("button", {
164
164
  type: "button",
165
- onClick: () => x(!b),
165
+ onClick: () => S(!x),
166
166
  className: "w-full sm:w-auto flex items-center justify-between gap-3 px-4 py-3 border border-border-subtle rounded-lg bg-bg-surface hover:bg-bg-sunken/50 transition-colors",
167
- children: [/* @__PURE__ */ c("div", {
167
+ children: [/* @__PURE__ */ d("div", {
168
168
  className: "flex items-center gap-3",
169
- children: [/* @__PURE__ */ s("div", {
169
+ children: [/* @__PURE__ */ u("div", {
170
170
  className: "size-8 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
171
- children: /* @__PURE__ */ s("svg", {
171
+ children: /* @__PURE__ */ u("svg", {
172
172
  className: "size-4 text-primary",
173
173
  fill: "none",
174
174
  viewBox: "0 0 24 24",
175
175
  stroke: "currentColor",
176
- children: /* @__PURE__ */ s("path", {
176
+ children: /* @__PURE__ */ u("path", {
177
177
  strokeLinecap: "round",
178
178
  strokeLinejoin: "round",
179
179
  strokeWidth: 2,
180
180
  d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"
181
181
  })
182
182
  })
183
- }), /* @__PURE__ */ c("div", {
183
+ }), /* @__PURE__ */ d("div", {
184
184
  className: "text-left",
185
- children: [/* @__PURE__ */ s("p", {
185
+ children: [/* @__PURE__ */ u("p", {
186
186
  className: "text-sm font-medium text-text-primary",
187
- children: K?.name || f("billing.settings.selectAccount", "Select Account")
188
- }), /* @__PURE__ */ s("p", {
187
+ children: q?.name || p("billing.settings.selectAccount", "Select Account")
188
+ }), /* @__PURE__ */ u("p", {
189
189
  className: "text-xs text-text-secondary",
190
- children: K?.email
190
+ children: q?.email
191
191
  })]
192
192
  })]
193
- }), /* @__PURE__ */ s("svg", {
194
- className: `size-4 text-text-secondary transition-transform ${b ? "rotate-180" : ""}`,
193
+ }), /* @__PURE__ */ u("svg", {
194
+ className: `size-4 text-text-secondary transition-transform ${x ? "rotate-180" : ""}`,
195
195
  fill: "none",
196
196
  viewBox: "0 0 24 24",
197
197
  stroke: "currentColor",
198
- children: /* @__PURE__ */ s("path", {
198
+ children: /* @__PURE__ */ u("path", {
199
199
  strokeLinecap: "round",
200
200
  strokeLinejoin: "round",
201
201
  strokeWidth: 2,
202
202
  d: "M19 9l-7 7-7-7"
203
203
  })
204
204
  })]
205
- }), b && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", {
205
+ }), x && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
206
206
  className: "fixed inset-0 z-10",
207
- onClick: () => x(!1)
208
- }), /* @__PURE__ */ s("div", {
207
+ onClick: () => S(!1)
208
+ }), /* @__PURE__ */ u("div", {
209
209
  className: "absolute top-full left-0 right-0 sm:right-auto mt-1 w-full sm:w-80 bg-popover border border-border-subtle rounded-lg shadow-lg z-20 py-1 max-h-60 overflow-y-auto",
210
- children: R.map((e) => /* @__PURE__ */ c("button", {
210
+ children: z.map((e) => /* @__PURE__ */ d("button", {
211
211
  type: "button",
212
- onClick: () => De(e),
212
+ onClick: () => Te(e),
213
213
  className: "w-full flex items-center justify-between gap-3 px-4 py-3 hover:bg-bg-sunken transition-colors",
214
- children: [/* @__PURE__ */ c("div", {
214
+ children: [/* @__PURE__ */ d("div", {
215
215
  className: "flex items-center gap-3 min-w-0",
216
- children: [/* @__PURE__ */ s("div", {
216
+ children: [/* @__PURE__ */ u("div", {
217
217
  className: "size-8 rounded-lg bg-bg-sunken flex items-center justify-center flex-shrink-0",
218
- children: /* @__PURE__ */ s("svg", {
218
+ children: /* @__PURE__ */ u("svg", {
219
219
  className: "size-4 text-text-secondary",
220
220
  fill: "none",
221
221
  viewBox: "0 0 24 24",
222
222
  stroke: "currentColor",
223
- children: /* @__PURE__ */ s("path", {
223
+ children: /* @__PURE__ */ u("path", {
224
224
  strokeLinecap: "round",
225
225
  strokeLinejoin: "round",
226
226
  strokeWidth: 2,
227
227
  d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"
228
228
  })
229
229
  })
230
- }), /* @__PURE__ */ c("div", {
230
+ }), /* @__PURE__ */ d("div", {
231
231
  className: "text-left min-w-0",
232
- children: [/* @__PURE__ */ s("p", {
232
+ children: [/* @__PURE__ */ u("p", {
233
233
  className: "text-sm font-medium text-text-primary truncate",
234
234
  children: e.name
235
- }), /* @__PURE__ */ s("p", {
235
+ }), /* @__PURE__ */ u("p", {
236
236
  className: "text-xs text-text-secondary truncate",
237
237
  children: e.email
238
238
  })]
239
239
  })]
240
- }), K?.id === e.id && /* @__PURE__ */ s("svg", {
240
+ }), q?.id === e.id && /* @__PURE__ */ u("svg", {
241
241
  className: "size-4 text-primary flex-shrink-0",
242
242
  fill: "none",
243
243
  viewBox: "0 0 24 24",
244
244
  stroke: "currentColor",
245
- children: /* @__PURE__ */ s("path", {
245
+ children: /* @__PURE__ */ u("path", {
246
246
  strokeLinecap: "round",
247
247
  strokeLinejoin: "round",
248
248
  strokeWidth: 2,
@@ -252,397 +252,393 @@ var ye = () => {
252
252
  }, e.id))
253
253
  })] })]
254
254
  }),
255
- /* @__PURE__ */ c("div", {
255
+ /* @__PURE__ */ d("div", {
256
256
  className: "border border-border-subtle rounded-lg bg-bg-surface",
257
- children: [/* @__PURE__ */ s("div", {
257
+ children: [/* @__PURE__ */ u("div", {
258
258
  className: "p-6 border-b border-border-subtle",
259
- children: /* @__PURE__ */ c("div", {
259
+ children: /* @__PURE__ */ d("div", {
260
260
  className: "flex items-center justify-between",
261
- children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h2", {
261
+ children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h2", {
262
262
  className: "text-lg font-semibold text-text-primary",
263
- children: f("billing.settings.accountInfo", "Account Information")
264
- }), /* @__PURE__ */ s("p", {
263
+ children: p("billing.settings.accountInfo", "Account Information")
264
+ }), /* @__PURE__ */ u("p", {
265
265
  className: "text-sm text-text-secondary mt-1",
266
- children: f("billing.settings.accountInfoDescription", "Update your billing contact details and tax information")
267
- })] }), K?.isDefault && /* @__PURE__ */ c("span", {
266
+ children: p("billing.settings.accountInfoDescription", "Update your billing contact details and tax information")
267
+ })] }), q?.isDefault && /* @__PURE__ */ d("span", {
268
268
  className: "inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium bg-action-primary-bg/10 text-primary rounded-full",
269
- children: [/* @__PURE__ */ s("svg", {
269
+ children: [/* @__PURE__ */ u("svg", {
270
270
  className: "size-3",
271
271
  fill: "currentColor",
272
272
  viewBox: "0 0 20 20",
273
- children: /* @__PURE__ */ s("path", {
273
+ children: /* @__PURE__ */ u("path", {
274
274
  fillRule: "evenodd",
275
275
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
276
276
  clipRule: "evenodd"
277
277
  })
278
- }), f("billing.settings.defaultAccount", "Default Account")]
278
+ }), p("billing.settings.defaultAccount", "Default Account")]
279
279
  })]
280
280
  })
281
- }), /* @__PURE__ */ c("div", {
281
+ }), /* @__PURE__ */ d("div", {
282
282
  className: "p-6 space-y-6",
283
283
  children: [
284
- K && /* @__PURE__ */ c("div", {
284
+ q && /* @__PURE__ */ d("div", {
285
285
  className: "grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm pb-4 border-b border-border-subtle",
286
286
  children: [
287
- /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
287
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
288
288
  className: "text-text-secondary",
289
- children: f("billing.settings.status", "Status")
290
- }), /* @__PURE__ */ s("p", {
291
- className: `font-medium ${K.isActive ? "text-status-success-text" : "text-status-error-text"}`,
292
- children: K.isActive ? f("billing.settings.active", "Active") : f("billing.settings.inactive", "Inactive")
289
+ children: p("billing.settings.status", "Status")
290
+ }), /* @__PURE__ */ u("p", {
291
+ className: `font-medium ${q.isActive ? "text-status-success-text" : "text-status-error-text"}`,
292
+ children: q.isActive ? p("billing.settings.active", "Active") : p("billing.settings.inactive", "Inactive")
293
293
  })] }),
294
- /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
294
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
295
295
  className: "text-text-secondary",
296
- children: f("billing.settings.creditBalance", "Credit Balance")
297
- }), /* @__PURE__ */ c("p", {
296
+ children: p("billing.settings.creditBalance", "Credit Balance")
297
+ }), /* @__PURE__ */ d("p", {
298
298
  className: "font-medium text-text-primary",
299
- children: [(K.creditAmount || 0).toLocaleString(), " Credits"]
299
+ children: [
300
+ (q.creditAmount || 0).toLocaleString(),
301
+ " ",
302
+ p("billing.common.credits", "Credits")
303
+ ]
300
304
  })] }),
301
- /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
305
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
302
306
  className: "text-text-secondary",
303
- children: f("billing.settings.accountId", "Account ID")
304
- }), /* @__PURE__ */ s("p", {
307
+ children: p("billing.settings.accountId", "Account ID")
308
+ }), /* @__PURE__ */ u("p", {
305
309
  className: "font-mono text-xs text-text-primary truncate",
306
- title: K.id,
307
- children: K.id
310
+ title: q.id,
311
+ children: q.id
308
312
  })] }),
309
- /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("p", {
313
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
310
314
  className: "text-text-secondary",
311
- children: f("billing.settings.created", "Created")
312
- }), /* @__PURE__ */ s("p", {
315
+ children: p("billing.settings.created", "Created")
316
+ }), /* @__PURE__ */ u("p", {
313
317
  className: "font-medium text-text-primary",
314
- children: K.createdAt ? new Date(K.createdAt).toLocaleDateString() : f("billing.settings.notAvailable", "N/A")
318
+ children: q.createdAt ? new Date(q.createdAt).toLocaleDateString() : p("billing.settings.notAvailable", "N/A")
315
319
  })] })
316
320
  ]
317
321
  }),
318
- /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
322
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
319
323
  className: "text-sm font-medium text-text-primary mb-4",
320
- children: f("billing.settings.contactDetails", "Contact Details")
321
- }), /* @__PURE__ */ c("div", {
324
+ children: p("billing.settings.contactDetails", "Contact Details")
325
+ }), /* @__PURE__ */ d("div", {
322
326
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
323
- children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("label", {
327
+ children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
324
328
  htmlFor: "billing-account-name",
325
329
  className: "block text-sm font-medium text-text-primary mb-1",
326
330
  children: [
327
- f("billing.settings.accountName", "Account Name"),
331
+ p("billing.settings.accountName", "Account Name"),
328
332
  " ",
329
- /* @__PURE__ */ s("span", {
333
+ /* @__PURE__ */ u("span", {
330
334
  className: "text-status-error-text",
331
335
  children: "*"
332
336
  })
333
337
  ]
334
- }), /* @__PURE__ */ s("input", {
338
+ }), /* @__PURE__ */ u("input", {
335
339
  id: "billing-account-name",
336
340
  type: "text",
337
- value: P.name,
338
- onChange: (e) => q("name", e.target.value),
341
+ value: F.name,
342
+ onChange: (e) => J("name", e.target.value),
339
343
  className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-md bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
340
- })] }), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("label", {
344
+ })] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
341
345
  htmlFor: "billing-account-email",
342
346
  className: "block text-sm font-medium text-text-primary mb-1",
343
347
  children: [
344
- f("billing.settings.email", "Email"),
348
+ p("billing.settings.email", "Email"),
345
349
  " ",
346
- /* @__PURE__ */ s("span", {
350
+ /* @__PURE__ */ u("span", {
347
351
  className: "text-status-error-text",
348
352
  children: "*"
349
353
  })
350
354
  ]
351
- }), /* @__PURE__ */ s("input", {
355
+ }), /* @__PURE__ */ u("input", {
352
356
  id: "billing-account-email",
353
357
  type: "email",
354
- value: P.email,
355
- onChange: (e) => q("email", e.target.value),
358
+ value: F.email,
359
+ onChange: (e) => J("email", e.target.value),
356
360
  className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-md bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
357
361
  })] })]
358
362
  })] }),
359
- /* @__PURE__ */ s(u, {
360
- title: f("billing.settings.advancedTitle", "Advanced settings"),
361
- description: f("billing.settings.advancedDescription", "Billing email override, currency, and tax identification."),
362
- children: /* @__PURE__ */ c("div", {
363
+ /* @__PURE__ */ u(he, {
364
+ title: p("billing.settings.advancedTitle", "Advanced settings"),
365
+ description: p("billing.settings.advancedDescription", "Billing email override, currency, and tax identification."),
366
+ children: /* @__PURE__ */ d("div", {
363
367
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
364
368
  children: [
365
- /* @__PURE__ */ c("div", { children: [
366
- /* @__PURE__ */ s("label", {
369
+ /* @__PURE__ */ d("div", { children: [
370
+ /* @__PURE__ */ u("label", {
367
371
  htmlFor: "billing-account-billing-email",
368
372
  className: "block text-sm font-medium text-text-primary mb-1",
369
- children: f("billing.settings.billingEmail", "Billing Email")
373
+ children: p("billing.settings.billingEmail", "Billing Email")
370
374
  }),
371
- /* @__PURE__ */ s("input", {
375
+ /* @__PURE__ */ u("input", {
372
376
  id: "billing-account-billing-email",
373
377
  type: "email",
374
- value: P.billingEmail,
375
- onChange: (e) => q("billingEmail", e.target.value),
376
- placeholder: f("billing.settings.billingEmailPlaceholder", "Optional - defaults to account email"),
378
+ value: F.billingEmail,
379
+ onChange: (e) => J("billingEmail", e.target.value),
380
+ placeholder: p("billing.settings.billingEmailPlaceholder", "Optional - defaults to account email"),
377
381
  className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-md bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
378
382
  }),
379
- /* @__PURE__ */ s("p", {
383
+ /* @__PURE__ */ u("p", {
380
384
  className: "text-xs text-text-secondary mt-1",
381
- children: f("billing.settings.billingEmailHelp", "Invoices will be sent to this email if provided")
385
+ children: p("billing.settings.billingEmailHelp", "Invoices will be sent to this email if provided")
382
386
  })
383
387
  ] }),
384
- /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("label", {
388
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
385
389
  htmlFor: "billing-account-currency",
386
390
  className: "block text-sm font-medium text-text-primary mb-1",
387
- children: f("billing.settings.currency", "Currency")
388
- }), /* @__PURE__ */ c("select", {
391
+ children: p("billing.settings.currency", "Currency")
392
+ }), /* @__PURE__ */ d("select", {
389
393
  id: "billing-account-currency",
390
- value: P.currency,
391
- onChange: (e) => q("currency", e.target.value),
394
+ value: F.currency,
395
+ onChange: (e) => J("currency", e.target.value),
392
396
  className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-md bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent",
393
397
  children: [
394
- /* @__PURE__ */ s("option", {
398
+ /* @__PURE__ */ u("option", {
395
399
  value: "USD",
396
400
  children: "USD - US Dollar"
397
401
  }),
398
- /* @__PURE__ */ s("option", {
402
+ /* @__PURE__ */ u("option", {
399
403
  value: "EUR",
400
404
  children: "EUR - Euro"
401
405
  }),
402
- /* @__PURE__ */ s("option", {
406
+ /* @__PURE__ */ u("option", {
403
407
  value: "GBP",
404
408
  children: "GBP - British Pound"
405
409
  }),
406
- /* @__PURE__ */ s("option", {
410
+ /* @__PURE__ */ u("option", {
407
411
  value: "INR",
408
412
  children: "INR - Indian Rupee"
409
413
  })
410
414
  ]
411
415
  })] }),
412
- /* @__PURE__ */ c("div", {
416
+ /* @__PURE__ */ d("div", {
413
417
  className: "sm:col-span-2 max-w-md",
414
418
  children: [
415
- /* @__PURE__ */ s("label", {
419
+ /* @__PURE__ */ u("label", {
416
420
  htmlFor: "billing-account-tax-id",
417
421
  className: "block text-sm font-medium text-text-primary mb-1",
418
- children: f("billing.settings.taxId", "Tax ID / VAT Number")
422
+ children: p("billing.settings.taxId", "Tax ID / VAT Number")
419
423
  }),
420
- /* @__PURE__ */ s("input", {
424
+ /* @__PURE__ */ u("input", {
421
425
  id: "billing-account-tax-id",
422
426
  type: "text",
423
- value: P.taxId,
424
- onChange: (e) => q("taxId", e.target.value),
425
- placeholder: f("billing.settings.taxIdPlaceholder", "Enter your tax identification number"),
427
+ value: F.taxId,
428
+ onChange: (e) => J("taxId", e.target.value),
429
+ placeholder: p("billing.settings.taxIdPlaceholder", "Enter your tax identification number"),
426
430
  className: "w-full px-3 py-2 text-sm border border-border-subtle rounded-md bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
427
431
  }),
428
- /* @__PURE__ */ s("p", {
432
+ /* @__PURE__ */ u("p", {
429
433
  className: "text-xs text-text-secondary mt-1",
430
- children: f("billing.settings.taxIdHelp", "Used for invoices and tax compliance (e.g., GST, VAT number)")
434
+ children: p("billing.settings.taxIdHelp", "Used for invoices and tax compliance (e.g., GST, VAT number)")
431
435
  })
432
436
  ]
433
437
  })
434
438
  ]
435
439
  })
436
440
  }),
437
- K?.isActive && R.length > 1 && /* @__PURE__ */ s("div", {
441
+ q?.isActive && z.length > 1 && /* @__PURE__ */ u("div", {
438
442
  className: "pt-4 border-t border-border-subtle",
439
- children: /* @__PURE__ */ c("div", {
443
+ children: /* @__PURE__ */ d("div", {
440
444
  className: "flex items-start gap-3",
441
- children: [/* @__PURE__ */ s("div", {
445
+ children: [/* @__PURE__ */ u("div", {
442
446
  className: "flex items-center h-6",
443
- children: /* @__PURE__ */ s("input", {
447
+ children: /* @__PURE__ */ u("input", {
444
448
  type: "checkbox",
445
449
  id: "isDefault",
446
- checked: P.isDefault,
447
- onChange: (e) => F((t) => ({
450
+ checked: F.isDefault,
451
+ onChange: (e) => I((t) => ({
448
452
  ...t,
449
453
  isDefault: e.target.checked
450
454
  })),
451
- disabled: K?.isDefault,
455
+ disabled: q?.isDefault,
452
456
  className: "size-4 rounded border-border-subtle text-primary focus:ring-primary focus:ring-offset-0 disabled:opacity-50 disabled:cursor-not-allowed"
453
457
  })
454
- }), /* @__PURE__ */ c("div", {
458
+ }), /* @__PURE__ */ d("div", {
455
459
  className: "flex-1",
456
- children: [/* @__PURE__ */ s("label", {
460
+ children: [/* @__PURE__ */ u("label", {
457
461
  htmlFor: "isDefault",
458
462
  className: "text-sm font-medium text-text-primary cursor-pointer",
459
- children: f("billing.settings.setDefault", "Set as default billing account")
460
- }), /* @__PURE__ */ s("p", {
463
+ children: p("billing.settings.setDefault", "Set as default billing account")
464
+ }), /* @__PURE__ */ u("p", {
461
465
  className: "text-xs text-text-secondary mt-0.5",
462
- children: K?.isDefault ? f("billing.settings.currentDefaultDescription", "This is currently your default billing account") : f("billing.settings.makePrimaryDescription", "Make this your primary billing account for new subscriptions")
466
+ children: q?.isDefault ? p("billing.settings.currentDefaultDescription", "This is currently your default billing account") : p("billing.settings.makePrimaryDescription", "Make this your primary billing account for new subscriptions")
463
467
  })]
464
468
  })]
465
469
  })
466
470
  }),
467
- /* @__PURE__ */ c("div", {
471
+ /* @__PURE__ */ d("div", {
468
472
  className: "pt-4 border-t border-border-subtle flex items-center justify-between",
469
- children: [/* @__PURE__ */ c("div", {
473
+ children: [/* @__PURE__ */ d("div", {
470
474
  className: "flex items-center gap-2",
471
- children: [xe && /* @__PURE__ */ c("div", {
475
+ children: [ye && /* @__PURE__ */ d("div", {
472
476
  className: "flex items-center gap-2 text-sm text-status-success-text",
473
- children: [/* @__PURE__ */ s("svg", {
477
+ children: [/* @__PURE__ */ u("svg", {
474
478
  className: "size-4",
475
479
  fill: "none",
476
480
  viewBox: "0 0 24 24",
477
481
  stroke: "currentColor",
478
- children: /* @__PURE__ */ s("path", {
482
+ children: /* @__PURE__ */ u("path", {
479
483
  strokeLinecap: "round",
480
484
  strokeLinejoin: "round",
481
485
  strokeWidth: 2,
482
486
  d: "M5 13l4 4L19 7"
483
487
  })
484
- }), f("billing.settings.saveSuccess", "Changes saved successfully")]
485
- }), D && /* @__PURE__ */ c("div", {
488
+ }), p("billing.settings.saveSuccess", "Changes saved successfully")]
489
+ }), O && /* @__PURE__ */ d("div", {
486
490
  className: "flex items-center gap-2 text-sm text-status-error-text",
487
- children: [/* @__PURE__ */ s("svg", {
491
+ children: [/* @__PURE__ */ u("svg", {
488
492
  className: "size-4",
489
493
  fill: "none",
490
494
  viewBox: "0 0 24 24",
491
495
  stroke: "currentColor",
492
- children: /* @__PURE__ */ s("path", {
496
+ children: /* @__PURE__ */ u("path", {
493
497
  strokeLinecap: "round",
494
498
  strokeLinejoin: "round",
495
499
  strokeWidth: 2,
496
500
  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"
497
501
  })
498
- }), D]
502
+ }), O]
499
503
  })]
500
- }), /* @__PURE__ */ c("div", {
504
+ }), /* @__PURE__ */ d("div", {
501
505
  className: "flex items-center gap-3",
502
- children: [p.canArchiveBillingAccount && K?.isActive ? /* @__PURE__ */ s("button", {
506
+ children: [m.canArchiveBillingAccount && q?.isActive ? /* @__PURE__ */ u("button", {
503
507
  type: "button",
504
- onClick: () => E(!0),
505
- disabled: S || w,
508
+ onClick: () => D(!0),
509
+ disabled: C || T,
506
510
  className: "px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-md hover:bg-status-error-bg-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
507
- children: w ? "Archiving..." : "Archive Account"
508
- }) : null, /* @__PURE__ */ c("button", {
511
+ children: T ? p("billing.settings.archiving", "Archiving...") : p("billing.settings.archiveAccount", "Archive Account")
512
+ }) : null, /* @__PURE__ */ d("button", {
509
513
  type: "button",
510
- onClick: Oe,
511
- disabled: !Y || S || w || !P.name || !P.email,
514
+ onClick: De,
515
+ disabled: !Ee || C || T || !F.name || !F.email,
512
516
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center gap-2",
513
- children: [S && /* @__PURE__ */ c("svg", {
517
+ children: [C && /* @__PURE__ */ d("svg", {
514
518
  className: "size-4 animate-spin",
515
519
  fill: "none",
516
520
  viewBox: "0 0 24 24",
517
- children: [/* @__PURE__ */ s("circle", {
521
+ children: [/* @__PURE__ */ u("circle", {
518
522
  className: "opacity-25",
519
523
  cx: "12",
520
524
  cy: "12",
521
525
  r: "10",
522
526
  stroke: "currentColor",
523
527
  strokeWidth: "4"
524
- }), /* @__PURE__ */ s("path", {
528
+ }), /* @__PURE__ */ u("path", {
525
529
  className: "opacity-75",
526
530
  fill: "currentColor",
527
531
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
528
532
  })]
529
- }), S ? "Saving..." : "Save Changes"]
533
+ }), C ? p("billing.common.saving", "Saving...") : p("billing.common.saveChanges", "Save Changes")]
530
534
  })]
531
535
  })]
532
536
  })
533
537
  ]
534
538
  })]
535
539
  }),
536
- A && M && /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", {
540
+ j && N && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
537
541
  className: "fixed inset-0 bg-overlay-scrim z-40",
538
542
  onClick: () => {
539
- S || (j(!1), N(!1), F((e) => ({
543
+ C || (M(!1), P(!1), I((e) => ({
540
544
  ...e,
541
- isDefault: K?.isDefault || !1
545
+ isDefault: q?.isDefault || !1
542
546
  })));
543
547
  }
544
- }), /* @__PURE__ */ s("div", {
548
+ }), /* @__PURE__ */ u("div", {
545
549
  className: "fixed inset-0 flex items-center justify-center z-50 p-4",
546
- children: /* @__PURE__ */ c("div", {
550
+ children: /* @__PURE__ */ d("div", {
547
551
  className: "bg-bg-surface border border-border-subtle rounded-lg shadow-xl max-w-md w-full p-6",
548
552
  children: [
549
- /* @__PURE__ */ s("h3", {
553
+ /* @__PURE__ */ u("h3", {
550
554
  className: "text-lg font-semibold text-text-primary mb-2",
551
- children: "Confirm Default Account Change"
555
+ children: p("billing.settings.confirmDefaultTitle", "Confirm Default Account Change")
552
556
  }),
553
- /* @__PURE__ */ c("p", {
557
+ /* @__PURE__ */ u("p", {
554
558
  className: "text-sm text-text-secondary mb-4",
555
- children: [
556
- "You are about to set",
557
- " ",
558
- /* @__PURE__ */ s("strong", {
559
- className: "text-text-primary",
560
- children: K?.name
561
- }),
562
- " as your default billing account and save your changes."
563
- ]
559
+ children: p("billing.settings.confirmDefaultDescription", "You are about to set {{accountName}} as your default billing account and save your changes.", { accountName: q?.name ?? "" })
564
560
  }),
565
- J && J.id !== K?.id && /* @__PURE__ */ s("div", {
561
+ Y && Y.id !== q?.id && /* @__PURE__ */ u("div", {
566
562
  className: "mb-4 p-3 bg-status-warning-bg-subtle border border-border-subtle rounded-md",
567
- children: /* @__PURE__ */ c("div", {
563
+ children: /* @__PURE__ */ d("div", {
568
564
  className: "flex items-start gap-2",
569
- children: [/* @__PURE__ */ s("svg", {
565
+ children: [/* @__PURE__ */ u("svg", {
570
566
  className: "size-5 text-status-warning-text flex-shrink-0 mt-0.5",
571
567
  fill: "none",
572
568
  viewBox: "0 0 24 24",
573
569
  stroke: "currentColor",
574
- children: /* @__PURE__ */ s("path", {
570
+ children: /* @__PURE__ */ u("path", {
575
571
  strokeLinecap: "round",
576
572
  strokeLinejoin: "round",
577
573
  strokeWidth: 2,
578
574
  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"
579
575
  })
580
- }), /* @__PURE__ */ c("div", {
576
+ }), /* @__PURE__ */ d("div", {
581
577
  className: "text-sm",
582
- children: [/* @__PURE__ */ s("p", {
578
+ children: [/* @__PURE__ */ u("p", {
583
579
  className: "font-medium text-status-warning-text",
584
- children: "Current default will change"
585
- }), /* @__PURE__ */ c("p", {
580
+ children: p("billing.settings.currentDefaultWillChange", "Current default will change")
581
+ }), /* @__PURE__ */ u("p", {
586
582
  className: "text-status-warning-text mt-0.5",
587
- children: [/* @__PURE__ */ s("strong", { children: J.name }), " will no longer be the default account."]
583
+ children: p("billing.settings.currentDefaultWillChangeDescription", "{{accountName}} will no longer be the default account.", { accountName: Y.name })
588
584
  })]
589
585
  })]
590
586
  })
591
587
  }),
592
- /* @__PURE__ */ c("div", {
588
+ /* @__PURE__ */ d("div", {
593
589
  className: "flex justify-end gap-3",
594
- children: [/* @__PURE__ */ s("button", {
590
+ children: [/* @__PURE__ */ u("button", {
595
591
  type: "button",
596
592
  onClick: () => {
597
- j(!1), N(!1), F((e) => ({
593
+ M(!1), P(!1), I((e) => ({
598
594
  ...e,
599
- isDefault: K?.isDefault || !1
595
+ isDefault: q?.isDefault || !1
600
596
  }));
601
597
  },
602
- disabled: S,
598
+ disabled: C,
603
599
  className: "px-4 py-2 text-sm font-medium text-text-primary border border-border-subtle rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
604
- children: "Cancel"
605
- }), /* @__PURE__ */ c("button", {
600
+ children: p("billing.common.cancel", "Cancel")
601
+ }), /* @__PURE__ */ d("button", {
606
602
  type: "button",
607
603
  onClick: Q,
608
- disabled: S,
604
+ disabled: C,
609
605
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg/90 disabled:opacity-50 transition-colors flex items-center gap-2",
610
- children: [S && /* @__PURE__ */ c("svg", {
606
+ children: [C && /* @__PURE__ */ d("svg", {
611
607
  className: "size-4 animate-spin",
612
608
  fill: "none",
613
609
  viewBox: "0 0 24 24",
614
- children: [/* @__PURE__ */ s("circle", {
610
+ children: [/* @__PURE__ */ u("circle", {
615
611
  className: "opacity-25",
616
612
  cx: "12",
617
613
  cy: "12",
618
614
  r: "10",
619
615
  stroke: "currentColor",
620
616
  strokeWidth: "4"
621
- }), /* @__PURE__ */ s("path", {
617
+ }), /* @__PURE__ */ u("path", {
622
618
  className: "opacity-75",
623
619
  fill: "currentColor",
624
620
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
625
621
  })]
626
- }), S ? "Saving..." : "Save Changes"]
622
+ }), C ? p("billing.common.saving", "Saving...") : p("billing.common.saveChanges", "Save Changes")]
627
623
  })]
628
624
  })
629
625
  ]
630
626
  })
631
627
  })] }),
632
- /* @__PURE__ */ s(de, {
633
- open: be,
634
- onOpenChange: E,
635
- children: /* @__PURE__ */ c(me, { children: [/* @__PURE__ */ c(_e, { children: [/* @__PURE__ */ s(l, { children: "Archive billing account?" }), /* @__PURE__ */ s(he, { children: ke })] }), /* @__PURE__ */ c(ge, { children: [/* @__PURE__ */ s(pe, { children: "Cancel" }), /* @__PURE__ */ s(fe, {
628
+ /* @__PURE__ */ u(ce, {
629
+ open: ve,
630
+ onOpenChange: D,
631
+ children: /* @__PURE__ */ d(de, { children: [/* @__PURE__ */ d(me, { children: [/* @__PURE__ */ u(f, { children: p("billing.settings.archiveDialogTitle", "Archive billing account?") }), /* @__PURE__ */ u(fe, { children: Oe })] }), /* @__PURE__ */ d(pe, { children: [/* @__PURE__ */ u(ue, { children: p("billing.common.cancel", "Cancel") }), /* @__PURE__ */ u(le, {
636
632
  onClick: () => {
637
- E(!1), Ae();
633
+ D(!1), ke();
638
634
  },
639
- children: "Archive Account"
635
+ children: p("billing.settings.archiveAccount", "Archive Account")
640
636
  })] })] })
641
637
  })
642
638
  ]
643
- }) : /* @__PURE__ */ s(t, { message: "You don't have permission to manage billing settings." });
639
+ }) : /* @__PURE__ */ u(n, { message: p("billing.settings.noManagePermission", "You don't have permission to manage billing settings.") });
644
640
  };
645
641
  //#endregion
646
- export { d as SettingsPage };
642
+ export { p as SettingsPage };
647
643
 
648
644
  //# sourceMappingURL=SettingsPage.js.map