@burdenoff/microfe-auth 2026.520.2 → 2026.521.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.
@@ -8,58 +8,61 @@ import { useEffect as u, useId as d, useRef as f, useState as p } from "react";
8
8
  import { useNavigate as m } from "react-router-dom";
9
9
  import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell";
10
10
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { useGatewayClient as y } from "@burdenoff/fe-libs/shared/graphql";
12
+ import { useAuth as b } from "@burdenoff/fe-libs/shared/providers/shell/AuthProvider";
11
13
  //#region src/auth/pages/UserProfilePage.tsx
12
- function y() {
13
- let { t: y } = h(), b = (e, t) => {
14
- let n = y(e);
14
+ function x() {
15
+ let { t: x } = h(), S = (e, t) => {
16
+ let n = x(e);
15
17
  return n === e ? t : n;
16
- }, x = m(), S = e((e) => e.isAuthenticated), C = e((e) => e.user), { updateCurrentUserProfile: w, isLoading: T } = t(), E = d(), D = d(), O = d(), k = d(), A = d(), [j] = l(), [M] = c(), N = f(null), [P, F] = p(!1), I = async (e) => {
18
+ }, C = m(), w = b(), T = e((e) => e.isAuthenticated), E = e((e) => e.user), { updateCurrentUserProfile: D, isLoading: O } = t(), k = d(), A = d(), j = d(), M = d(), N = d(), P = y("workspace"), [F] = l({ client: P }), [I] = c({ client: P }), L = f(null), [R, z] = p(!1), B = async (e) => {
17
19
  let t = e.target.files?.[0];
18
20
  if (t) {
19
21
  if (!t.type.startsWith("image/")) {
20
- H(b("auth.profile.invalidImageType", "Please select an image file"));
22
+ K(S("auth.profile.invalidImageType", "Please select an image file"));
21
23
  return;
22
24
  }
23
- F(!0), H(null);
25
+ z(!0), K(null);
24
26
  try {
25
- let e = await j({ variables: { input: {
27
+ let e = t.name.split(".").pop()?.toLowerCase() ?? "", n = await F({ variables: { input: {
26
28
  fileName: t.name,
27
29
  fileSize: t.size.toString(),
28
- mimeType: t.type
29
- } } }), n = e.data?.initiateUpload.session, r = e.data?.initiateUpload.uploadUrl;
30
- if (!n || !r) throw Error("Failed to initiate upload");
31
- if (!(await fetch(r, {
30
+ mimeType: t.type,
31
+ extension: e
32
+ } } }), r = n.data?.initiateUpload.session, i = n.data?.initiateUpload.uploadUrl;
33
+ if (!r || !i) throw Error("Failed to initiate upload");
34
+ if (!(await fetch(i, {
32
35
  method: "PUT",
33
36
  headers: { "Content-Type": t.type },
34
37
  body: t
35
38
  })).ok) throw Error("Failed to upload file");
36
- let i = (await M({ variables: { input: { sessionId: n.id } } })).data?.completeUpload.file?.downloadUrl;
37
- if (!i) throw Error("Upload succeeded but no URL returned");
38
- await w({ avatar: i }), W(b("auth.profile.avatarUpdated", "Profile picture updated!"));
39
+ let a = (await I({ variables: { input: { sessionId: r.id } } })).data?.completeUpload.file?.downloadUrl;
40
+ if (!a) throw Error("Upload succeeded but no URL returned");
41
+ await D({ avatar: a }), w.updateUser({ avatar: a }), J(S("auth.profile.avatarUpdated", "Profile picture updated!"));
39
42
  } catch (e) {
40
- H(e instanceof Error ? e.message : b("auth.profile.avatarFailed", "Failed to upload picture"));
43
+ K(e instanceof Error ? e.message : S("auth.profile.avatarFailed", "Failed to upload picture"));
41
44
  } finally {
42
- F(!1), N.current && (N.current.value = "");
45
+ z(!1), L.current && (L.current.value = "");
43
46
  }
44
47
  }
45
- }, [L, R] = p(!1), [z, B] = p({
48
+ }, [V, H] = p(!1), [U, W] = p({
46
49
  username: "",
47
50
  firstName: "",
48
51
  lastName: "",
49
52
  name: "",
50
53
  phoneNumber: ""
51
- }), [V, H] = p(null), [U, W] = p(null);
54
+ }), [G, K] = p(null), [q, J] = p(null);
52
55
  return u(() => {
53
- C && B({
54
- username: C.username || "",
55
- firstName: C.firstName || "",
56
- lastName: C.lastName || "",
57
- name: C.name || "",
58
- phoneNumber: C.phoneNumber || ""
56
+ E && W({
57
+ username: E.username || "",
58
+ firstName: E.firstName || "",
59
+ lastName: E.lastName || "",
60
+ name: E.name || "",
61
+ phoneNumber: E.phoneNumber || ""
59
62
  });
60
- }, [C]), !S || !C ? /* @__PURE__ */ _(n, {
61
- title: b("auth.profile.title", "Profile"),
62
- subtitle: b("auth.profile.subtitle", "View and manage your profile"),
63
+ }, [E]), !T || !E ? /* @__PURE__ */ _(n, {
64
+ title: S("auth.profile.title", "Profile"),
65
+ subtitle: S("auth.profile.subtitle", "View and manage your profile"),
63
66
  children: /* @__PURE__ */ v("div", {
64
67
  className: "text-center py-12",
65
68
  children: [
@@ -69,16 +72,16 @@ function y() {
69
72
  }),
70
73
  /* @__PURE__ */ _("h2", {
71
74
  className: "text-xl font-semibold text-[var(--color-text-primary)] mb-2",
72
- children: b("auth.profile.authRequired", "Authentication Required")
75
+ children: S("auth.profile.authRequired", "Authentication Required")
73
76
  }),
74
77
  /* @__PURE__ */ _("p", {
75
78
  className: "text-[var(--color-text-secondary)] mb-6",
76
- children: b("auth.profile.signInToView", "Please sign in to view your profile")
79
+ children: S("auth.profile.signInToView", "Please sign in to view your profile")
77
80
  }),
78
81
  /* @__PURE__ */ _("button", {
79
- onClick: () => x("/auth/login"),
82
+ onClick: () => C("/auth/login"),
80
83
  className: "auth-primary-button px-6 py-3 font-semibold",
81
- children: b("auth.profile.signIn", "Sign In")
84
+ children: S("auth.profile.signIn", "Sign In")
82
85
  })
83
86
  ]
84
87
  })
@@ -89,28 +92,28 @@ function y() {
89
92
  className: "mb-8",
90
93
  children: [/* @__PURE__ */ _("h1", {
91
94
  className: "text-3xl font-semibold text-[var(--color-text-primary)]",
92
- children: b("auth.profile.myProfile", "My Profile")
95
+ children: S("auth.profile.myProfile", "My Profile")
93
96
  }), /* @__PURE__ */ _("p", {
94
97
  className: "text-[var(--color-text-secondary)] mt-2",
95
- children: b("auth.profile.viewAndManage", "View and manage your account information")
98
+ children: S("auth.profile.viewAndManage", "View and manage your account information")
96
99
  })]
97
100
  }),
98
- U && /* @__PURE__ */ v("div", {
101
+ q && /* @__PURE__ */ v("div", {
99
102
  className: "mb-6 flex items-center gap-3 p-4 rounded-xl bg-[var(--color-status-success-bg-subtle)] border border-[var(--color-status-success-border)]",
100
103
  children: [
101
104
  /* @__PURE__ */ _(i, { className: "w-5 h-5 text-[var(--color-status-success-text)] flex-shrink-0" }),
102
105
  /* @__PURE__ */ _("p", {
103
106
  className: "text-[var(--color-status-success-text)]",
104
- children: U
107
+ children: q
105
108
  }),
106
109
  /* @__PURE__ */ _("button", {
107
- onClick: () => W(null),
110
+ onClick: () => J(null),
108
111
  className: "ml-auto text-sm text-[var(--color-status-success-text)] hover:underline transition-colors duration-200",
109
- children: b("auth.profile.dismiss", "Dismiss")
112
+ children: S("auth.profile.dismiss", "Dismiss")
110
113
  })
111
114
  ]
112
115
  }),
113
- V && /* @__PURE__ */ v("div", {
116
+ G && /* @__PURE__ */ v("div", {
114
117
  className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-[var(--color-status-error-bg-subtle)] border border-[var(--color-status-error-border)]",
115
118
  children: [
116
119
  /* @__PURE__ */ _(r, { className: "w-5 h-5 text-[var(--color-status-error-text)] flex-shrink-0 mt-0.5" }),
@@ -118,13 +121,13 @@ function y() {
118
121
  className: "flex-1",
119
122
  children: /* @__PURE__ */ _("p", {
120
123
  className: "text-sm text-[var(--color-status-error-text)]",
121
- children: V
124
+ children: G
122
125
  })
123
126
  }),
124
127
  /* @__PURE__ */ _("button", {
125
- onClick: () => H(null),
128
+ onClick: () => K(null),
126
129
  className: "text-sm text-[var(--color-status-error-text)] hover:underline transition-colors duration-200",
127
- children: b("auth.profile.dismiss", "Dismiss")
130
+ children: S("auth.profile.dismiss", "Dismiss")
128
131
  })
129
132
  ]
130
133
  }),
@@ -137,21 +140,21 @@ function y() {
137
140
  children: [/* @__PURE__ */ v("div", {
138
141
  className: "relative group",
139
142
  children: [
140
- C.avatar ? /* @__PURE__ */ _("img", {
141
- src: C.avatar,
142
- alt: b("auth.profile.avatarAlt", "Profile picture"),
143
+ E.avatar ? /* @__PURE__ */ _("img", {
144
+ src: E.avatar,
145
+ alt: S("auth.profile.avatarAlt", "Profile picture"),
143
146
  className: "w-20 h-20 rounded-full object-cover shadow-lg"
144
147
  }) : /* @__PURE__ */ _("div", {
145
148
  className: "w-20 h-20 rounded-full bg-bg-surface/20 backdrop-blur-sm flex items-center justify-center text-white text-3xl font-semibold shadow-lg",
146
- children: (C.name || C.username || C.email).charAt(0).toUpperCase()
149
+ children: (E.name || E.username || E.email).charAt(0).toUpperCase()
147
150
  }),
148
151
  /* @__PURE__ */ _("button", {
149
152
  type: "button",
150
- onClick: () => N.current?.click(),
151
- disabled: P,
152
- "aria-label": b("auth.profile.changeAvatar", "Change profile picture"),
153
+ onClick: () => L.current?.click(),
154
+ disabled: R,
155
+ "aria-label": S("auth.profile.changeAvatar", "Change profile picture"),
153
156
  className: "absolute inset-0 rounded-full flex items-center justify-center bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity duration-200 cursor-pointer",
154
- children: P ? /* @__PURE__ */ _(o, { className: "w-6 h-6 text-white animate-spin" }) : /* @__PURE__ */ v("svg", {
157
+ children: R ? /* @__PURE__ */ _(o, { className: "w-6 h-6 text-white animate-spin" }) : /* @__PURE__ */ v("svg", {
155
158
  className: "w-6 h-6 text-white",
156
159
  fill: "none",
157
160
  viewBox: "0 0 24 24",
@@ -170,11 +173,11 @@ function y() {
170
173
  })
171
174
  }),
172
175
  /* @__PURE__ */ _("input", {
173
- ref: N,
176
+ ref: L,
174
177
  type: "file",
175
178
  accept: "image/*",
176
179
  className: "hidden",
177
- onChange: (e) => void I(e),
180
+ onChange: (e) => void B(e),
178
181
  "aria-hidden": "true"
179
182
  })
180
183
  ]
@@ -183,20 +186,20 @@ function y() {
183
186
  children: [
184
187
  /* @__PURE__ */ _("h2", {
185
188
  className: "text-2xl font-semibold",
186
- children: C.name || `${C.firstName || ""} ${C.lastName || ""}`.trim() || C.username
189
+ children: E.name || `${E.firstName || ""} ${E.lastName || ""}`.trim() || E.username
187
190
  }),
188
191
  /* @__PURE__ */ v("p", {
189
192
  className: "text-white/80 flex items-center gap-2",
190
- children: [/* @__PURE__ */ _(a, { className: "w-4 h-4" }), C.email]
193
+ children: [/* @__PURE__ */ _(a, { className: "w-4 h-4" }), E.email]
191
194
  }),
192
195
  /* @__PURE__ */ v("div", {
193
196
  className: "flex items-center gap-2 mt-2",
194
197
  children: [/* @__PURE__ */ _("span", {
195
198
  className: "px-2.5 py-1 rounded-full text-xs font-medium bg-bg-surface/20 backdrop-blur-sm",
196
- children: C.role?.replace("_", " ") || b("auth.profile.member", "Member")
197
- }), C.emailVerified && /* @__PURE__ */ v("span", {
199
+ children: E.role?.replace("_", " ") || S("auth.profile.member", "Member")
200
+ }), E.emailVerified && /* @__PURE__ */ v("span", {
198
201
  className: "px-2.5 py-1 rounded-full text-xs font-medium bg-status-success-text/30 flex items-center gap-1",
199
- children: [/* @__PURE__ */ _(i, { className: "w-3 h-3" }), b("auth.profile.verified", "Verified")]
202
+ children: [/* @__PURE__ */ _(i, { className: "w-3 h-3" }), S("auth.profile.verified", "Verified")]
200
203
  })]
201
204
  })
202
205
  ]
@@ -204,19 +207,19 @@ function y() {
204
207
  })
205
208
  }), /* @__PURE__ */ _("div", {
206
209
  className: "p-6",
207
- children: L ? /* @__PURE__ */ v("form", {
210
+ children: V ? /* @__PURE__ */ v("form", {
208
211
  onSubmit: async (e) => {
209
- e.preventDefault(), H(null), W(null);
212
+ e.preventDefault(), K(null), J(null);
210
213
  try {
211
- await w({
212
- username: z.username || void 0,
213
- firstName: z.firstName || void 0,
214
- lastName: z.lastName || void 0,
215
- name: z.name || void 0,
216
- phoneNumber: z.phoneNumber || void 0
217
- }), W(b("auth.profile.updateSuccess", "Profile updated successfully!")), R(!1);
214
+ await D({
215
+ username: U.username || void 0,
216
+ firstName: U.firstName || void 0,
217
+ lastName: U.lastName || void 0,
218
+ name: U.name || void 0,
219
+ phoneNumber: U.phoneNumber || void 0
220
+ }), J(S("auth.profile.updateSuccess", "Profile updated successfully!")), H(!1);
218
221
  } catch (e) {
219
- H(e instanceof Error ? e.message : b("auth.profile.updateFailed", "Failed to update profile"));
222
+ K(e instanceof Error ? e.message : S("auth.profile.updateFailed", "Failed to update profile"));
220
223
  }
221
224
  },
222
225
  className: "space-y-6",
@@ -224,9 +227,9 @@ function y() {
224
227
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
225
228
  children: [
226
229
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
227
- htmlFor: E,
230
+ htmlFor: k,
228
231
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
229
- children: b("auth.profile.username", "Username")
232
+ children: S("auth.profile.username", "Username")
230
233
  }), /* @__PURE__ */ v("div", {
231
234
  className: "relative",
232
235
  children: [/* @__PURE__ */ _("div", {
@@ -236,78 +239,78 @@ function y() {
236
239
  "aria-hidden": "true"
237
240
  })
238
241
  }), /* @__PURE__ */ _("input", {
239
- id: E,
242
+ id: k,
240
243
  type: "text",
241
- value: z.username,
242
- onChange: (e) => B({
243
- ...z,
244
+ value: U.username,
245
+ onChange: (e) => W({
246
+ ...U,
244
247
  username: e.target.value
245
248
  }),
246
249
  className: "block w-full pl-[3.5rem] pr-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
247
- placeholder: b("auth.profile.usernamePlaceholder", "Enter username")
250
+ placeholder: S("auth.profile.usernamePlaceholder", "Enter username")
248
251
  })]
249
252
  })] }),
250
253
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
251
- htmlFor: D,
254
+ htmlFor: A,
252
255
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
253
- children: b("auth.profile.displayName", "Display Name")
256
+ children: S("auth.profile.displayName", "Display Name")
254
257
  }), /* @__PURE__ */ _("input", {
255
- id: D,
258
+ id: A,
256
259
  type: "text",
257
- value: z.name,
258
- onChange: (e) => B({
259
- ...z,
260
+ value: U.name,
261
+ onChange: (e) => W({
262
+ ...U,
260
263
  name: e.target.value
261
264
  }),
262
265
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
263
- placeholder: b("auth.profile.displayNamePlaceholder", "Enter display name")
266
+ placeholder: S("auth.profile.displayNamePlaceholder", "Enter display name")
264
267
  })] }),
265
268
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
266
- htmlFor: O,
269
+ htmlFor: j,
267
270
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
268
- children: b("auth.profile.firstName", "First Name")
271
+ children: S("auth.profile.firstName", "First Name")
269
272
  }), /* @__PURE__ */ _("input", {
270
- id: O,
273
+ id: j,
271
274
  type: "text",
272
- value: z.firstName,
273
- onChange: (e) => B({
274
- ...z,
275
+ value: U.firstName,
276
+ onChange: (e) => W({
277
+ ...U,
275
278
  firstName: e.target.value
276
279
  }),
277
280
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
278
- placeholder: b("auth.profile.firstNamePlaceholder", "Enter first name")
281
+ placeholder: S("auth.profile.firstNamePlaceholder", "Enter first name")
279
282
  })] }),
280
283
  /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
281
- htmlFor: k,
284
+ htmlFor: M,
282
285
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
283
- children: b("auth.profile.lastName", "Last Name")
286
+ children: S("auth.profile.lastName", "Last Name")
284
287
  }), /* @__PURE__ */ _("input", {
285
- id: k,
288
+ id: M,
286
289
  type: "text",
287
- value: z.lastName,
288
- onChange: (e) => B({
289
- ...z,
290
+ value: U.lastName,
291
+ onChange: (e) => W({
292
+ ...U,
290
293
  lastName: e.target.value
291
294
  }),
292
295
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
293
- placeholder: b("auth.profile.lastNamePlaceholder", "Enter last name")
296
+ placeholder: S("auth.profile.lastNamePlaceholder", "Enter last name")
294
297
  })] }),
295
298
  /* @__PURE__ */ v("div", {
296
299
  className: "md:col-span-2",
297
300
  children: [/* @__PURE__ */ _("label", {
298
- htmlFor: A,
301
+ htmlFor: N,
299
302
  className: "block text-sm font-medium text-[var(--color-text-primary)] mb-2",
300
- children: b("auth.profile.phoneNumber", "Phone Number")
303
+ children: S("auth.profile.phoneNumber", "Phone Number")
301
304
  }), /* @__PURE__ */ _("input", {
302
- id: A,
305
+ id: N,
303
306
  type: "tel",
304
- value: z.phoneNumber,
305
- onChange: (e) => B({
306
- ...z,
307
+ value: U.phoneNumber,
308
+ onChange: (e) => W({
309
+ ...U,
307
310
  phoneNumber: e.target.value
308
311
  }),
309
312
  className: "block w-full px-4 py-3 border border-[var(--color-border-default)] rounded-xl bg-[var(--color-bg-surface)] text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all duration-300",
310
- placeholder: b("auth.profile.phonePlaceholder", "Enter phone number")
313
+ placeholder: S("auth.profile.phonePlaceholder", "Enter phone number")
311
314
  })]
312
315
  })
313
316
  ]
@@ -315,22 +318,22 @@ function y() {
315
318
  className: "flex gap-3 pt-4 border-t border-[var(--color-border-default)]",
316
319
  children: [/* @__PURE__ */ _("button", {
317
320
  type: "submit",
318
- disabled: T,
321
+ disabled: O,
319
322
  className: "auth-primary-button flex items-center gap-2 px-6 py-3 font-medium",
320
- children: T ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, { className: "w-4 h-4 animate-spin" }), b("auth.profile.saving", "Saving...")] }) : b("auth.profile.saveChanges", "Save Changes")
323
+ children: O ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, { className: "w-4 h-4 animate-spin" }), S("auth.profile.saving", "Saving...")] }) : S("auth.profile.saveChanges", "Save Changes")
321
324
  }), /* @__PURE__ */ _("button", {
322
325
  type: "button",
323
326
  onClick: () => {
324
- C && B({
325
- username: C.username || "",
326
- firstName: C.firstName || "",
327
- lastName: C.lastName || "",
328
- name: C.name || "",
329
- phoneNumber: C.phoneNumber || ""
330
- }), R(!1), H(null);
327
+ E && W({
328
+ username: E.username || "",
329
+ firstName: E.firstName || "",
330
+ lastName: E.lastName || "",
331
+ name: E.name || "",
332
+ phoneNumber: E.phoneNumber || ""
333
+ }), H(!1), K(null);
331
334
  },
332
335
  className: "px-6 py-3 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
333
- children: b("auth.profile.cancel", "Cancel")
336
+ children: S("auth.profile.cancel", "Cancel")
334
337
  })]
335
338
  })]
336
339
  }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
@@ -340,52 +343,52 @@ function y() {
340
343
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
341
344
  children: [/* @__PURE__ */ _("label", {
342
345
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
343
- children: b("auth.profile.username", "Username")
346
+ children: S("auth.profile.username", "Username")
344
347
  }), /* @__PURE__ */ _("p", {
345
348
  className: "text-[var(--color-text-primary)] font-medium",
346
- children: C.username || "-"
349
+ children: E.username || "-"
347
350
  })]
348
351
  }),
349
352
  /* @__PURE__ */ v("div", {
350
353
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
351
354
  children: [/* @__PURE__ */ _("label", {
352
355
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
353
- children: b("auth.profile.displayName", "Display Name")
356
+ children: S("auth.profile.displayName", "Display Name")
354
357
  }), /* @__PURE__ */ _("p", {
355
358
  className: "text-[var(--color-text-primary)] font-medium",
356
- children: C.name || "-"
359
+ children: E.name || "-"
357
360
  })]
358
361
  }),
359
362
  /* @__PURE__ */ v("div", {
360
363
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
361
364
  children: [/* @__PURE__ */ _("label", {
362
365
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
363
- children: b("auth.profile.firstName", "First Name")
366
+ children: S("auth.profile.firstName", "First Name")
364
367
  }), /* @__PURE__ */ _("p", {
365
368
  className: "text-[var(--color-text-primary)] font-medium",
366
- children: C.firstName || "-"
369
+ children: E.firstName || "-"
367
370
  })]
368
371
  }),
369
372
  /* @__PURE__ */ v("div", {
370
373
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
371
374
  children: [/* @__PURE__ */ _("label", {
372
375
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
373
- children: b("auth.profile.lastName", "Last Name")
376
+ children: S("auth.profile.lastName", "Last Name")
374
377
  }), /* @__PURE__ */ _("p", {
375
378
  className: "text-[var(--color-text-primary)] font-medium",
376
- children: C.lastName || "-"
379
+ children: E.lastName || "-"
377
380
  })]
378
381
  }),
379
382
  /* @__PURE__ */ v("div", {
380
383
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
381
384
  children: [/* @__PURE__ */ _("label", {
382
385
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
383
- children: b("auth.profile.email", "Email")
386
+ children: S("auth.profile.email", "Email")
384
387
  }), /* @__PURE__ */ v("p", {
385
388
  className: "text-[var(--color-text-primary)] font-medium flex items-center gap-2",
386
- children: [C.email, C.emailVerified && /* @__PURE__ */ v("span", {
389
+ children: [E.email, E.emailVerified && /* @__PURE__ */ v("span", {
387
390
  className: "inline-flex items-center gap-1 text-[var(--color-status-success-text)] text-xs",
388
- children: [/* @__PURE__ */ _(i, { className: "w-3 h-3" }), b("auth.profile.verified", "Verified")]
391
+ children: [/* @__PURE__ */ _(i, { className: "w-3 h-3" }), S("auth.profile.verified", "Verified")]
389
392
  })]
390
393
  })]
391
394
  }),
@@ -393,35 +396,35 @@ function y() {
393
396
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
394
397
  children: [/* @__PURE__ */ _("label", {
395
398
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
396
- children: b("auth.profile.phoneNumber", "Phone Number")
399
+ children: S("auth.profile.phoneNumber", "Phone Number")
397
400
  }), /* @__PURE__ */ _("p", {
398
401
  className: "text-[var(--color-text-primary)] font-medium",
399
- children: C.phoneNumber || "-"
402
+ children: E.phoneNumber || "-"
400
403
  })]
401
404
  }),
402
405
  /* @__PURE__ */ v("div", {
403
406
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
404
407
  children: [/* @__PURE__ */ _("label", {
405
408
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
406
- children: b("auth.profile.role", "Role")
409
+ children: S("auth.profile.role", "Role")
407
410
  }), /* @__PURE__ */ _("p", {
408
411
  className: "text-[var(--color-text-primary)] font-medium",
409
- children: C.role?.replace("_", " ") || b("auth.profile.member", "Member")
412
+ children: E.role?.replace("_", " ") || S("auth.profile.member", "Member")
410
413
  })]
411
414
  }),
412
415
  /* @__PURE__ */ v("div", {
413
416
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
414
417
  children: [/* @__PURE__ */ _("label", {
415
418
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
416
- children: b("auth.profile.mfaStatus", "MFA Status")
419
+ children: S("auth.profile.mfaStatus", "MFA Status")
417
420
  }), /* @__PURE__ */ _("p", {
418
421
  className: "text-[var(--color-text-primary)] font-medium",
419
- children: C.mfaEnabled ? /* @__PURE__ */ v("span", {
422
+ children: E.mfaEnabled ? /* @__PURE__ */ v("span", {
420
423
  className: "text-[var(--color-status-success-text)] flex items-center gap-1",
421
- children: [/* @__PURE__ */ _(i, { className: "w-4 h-4" }), b("auth.profile.enabled", "Enabled")]
424
+ children: [/* @__PURE__ */ _(i, { className: "w-4 h-4" }), S("auth.profile.enabled", "Enabled")]
422
425
  }) : /* @__PURE__ */ _("span", {
423
426
  className: "text-[var(--color-status-warning-text)]",
424
- children: b("auth.profile.notEnabled", "Not Enabled")
427
+ children: S("auth.profile.notEnabled", "Not Enabled")
425
428
  })
426
429
  })]
427
430
  }),
@@ -429,33 +432,33 @@ function y() {
429
432
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
430
433
  children: [/* @__PURE__ */ _("label", {
431
434
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
432
- children: b("auth.profile.lastLogin", "Last Login")
435
+ children: S("auth.profile.lastLogin", "Last Login")
433
436
  }), /* @__PURE__ */ _("p", {
434
437
  className: "text-[var(--color-text-primary)] font-medium",
435
- children: C.lastLoginAt ? new Date(C.lastLoginAt).toLocaleString() : b("auth.profile.never", "Never")
438
+ children: E.lastLoginAt ? new Date(E.lastLoginAt).toLocaleString() : S("auth.profile.never", "Never")
436
439
  })]
437
440
  }),
438
441
  /* @__PURE__ */ v("div", {
439
442
  className: "p-4 rounded-xl bg-[var(--color-bg-muted)]",
440
443
  children: [/* @__PURE__ */ _("label", {
441
444
  className: "block text-sm font-medium text-[var(--color-text-tertiary)] mb-1",
442
- children: b("auth.profile.accountCreated", "Account Created")
445
+ children: S("auth.profile.accountCreated", "Account Created")
443
446
  }), /* @__PURE__ */ _("p", {
444
447
  className: "text-[var(--color-text-primary)] font-medium",
445
- children: C.createdAt ? new Date(C.createdAt).toLocaleString() : "-"
448
+ children: E.createdAt ? new Date(E.createdAt).toLocaleString() : "-"
446
449
  })]
447
450
  })
448
451
  ]
449
452
  }), /* @__PURE__ */ v("div", {
450
453
  className: "flex gap-3 pt-6 mt-6 border-t border-[var(--color-border-default)]",
451
454
  children: [/* @__PURE__ */ _("button", {
452
- onClick: () => R(!0),
455
+ onClick: () => H(!0),
453
456
  className: "auth-primary-button px-6 py-3 font-medium",
454
- children: b("auth.profile.editProfile", "Edit Profile")
457
+ children: S("auth.profile.editProfile", "Edit Profile")
455
458
  }), /* @__PURE__ */ _("button", {
456
- onClick: () => x("/auth/security"),
459
+ onClick: () => C("/auth/security"),
457
460
  className: "px-6 py-3 rounded-xl border border-[var(--color-border-default)] text-[var(--color-text-secondary)] font-medium hover:bg-[var(--color-bg-muted)] transition-colors duration-200",
458
- children: b("auth.profile.securitySettings", "Security Settings")
461
+ children: S("auth.profile.securitySettings", "Security Settings")
459
462
  })]
460
463
  })] })
461
464
  })]
@@ -463,7 +466,7 @@ function y() {
463
466
  /* @__PURE__ */ v("div", {
464
467
  className: "mt-8 grid grid-cols-1 md:grid-cols-3 gap-4",
465
468
  children: [/* @__PURE__ */ v("button", {
466
- onClick: () => x("/auth/mfa"),
469
+ onClick: () => C("/auth/mfa"),
467
470
  className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-primary-border)] transition-colors duration-200 text-left group",
468
471
  children: [
469
472
  /* @__PURE__ */ _("div", {
@@ -483,15 +486,15 @@ function y() {
483
486
  }),
484
487
  /* @__PURE__ */ _("h3", {
485
488
  className: "font-medium text-[var(--color-text-primary)]",
486
- children: b("auth.profile.twoFactorAuth", "Two-Factor Auth")
489
+ children: S("auth.profile.twoFactorAuth", "Two-Factor Auth")
487
490
  }),
488
491
  /* @__PURE__ */ _("p", {
489
492
  className: "text-sm text-[var(--color-text-tertiary)] mt-1",
490
- children: C.mfaEnabled ? b("auth.profile.manageMfa", "Manage MFA settings") : b("auth.profile.enableMfa", "Enable MFA for extra security")
493
+ children: E.mfaEnabled ? S("auth.profile.manageMfa", "Manage MFA settings") : S("auth.profile.enableMfa", "Enable MFA for extra security")
491
494
  })
492
495
  ]
493
496
  }), /* @__PURE__ */ v("button", {
494
- onClick: () => x("/auth/api-keys"),
497
+ onClick: () => C("/auth/api-keys"),
495
498
  className: "p-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:border-[var(--color-action-secondary-border)] transition-colors duration-200 text-left group",
496
499
  children: [
497
500
  /* @__PURE__ */ _("div", {
@@ -511,11 +514,11 @@ function y() {
511
514
  }),
512
515
  /* @__PURE__ */ _("h3", {
513
516
  className: "font-medium text-[var(--color-text-primary)]",
514
- children: b("auth.profile.apiKeys", "API Keys")
517
+ children: S("auth.profile.apiKeys", "API Keys")
515
518
  }),
516
519
  /* @__PURE__ */ _("p", {
517
520
  className: "text-sm text-[var(--color-text-tertiary)] mt-1",
518
- children: b("auth.profile.manageApiKeys", "Manage your API access credentials")
521
+ children: S("auth.profile.manageApiKeys", "Manage your API access credentials")
519
522
  })
520
523
  ]
521
524
  })]
@@ -524,6 +527,6 @@ function y() {
524
527
  });
525
528
  }
526
529
  //#endregion
527
- export { y as UserProfilePage };
530
+ export { x as UserProfilePage };
528
531
 
529
532
  //# sourceMappingURL=UserProfilePage.js.map