@burdenoff/microfe-atheletebridge 2026.827.1 → 2026.829.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/atheletebridge/components/LoadingState.d.ts.map +1 -1
  2. package/dist/atheletebridge/components/LoadingState.js +39 -32
  3. package/dist/atheletebridge/components/LoadingState.js.map +1 -1
  4. package/dist/atheletebridge/components/TeamCard.d.ts.map +1 -1
  5. package/dist/atheletebridge/components/TeamCard.js +45 -49
  6. package/dist/atheletebridge/components/TeamCard.js.map +1 -1
  7. package/dist/atheletebridge/pages/DashboardPage.d.ts.map +1 -1
  8. package/dist/atheletebridge/pages/DashboardPage.js +56 -24
  9. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -1
  10. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.d.ts.map +1 -1
  11. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js +58 -56
  12. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js.map +1 -1
  13. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts.map +1 -1
  14. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +110 -106
  15. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
  16. package/dist/atheletebridge/pages/fixtures/FixturesListPage.d.ts.map +1 -1
  17. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +80 -71
  18. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -1
  19. package/dist/atheletebridge/pages/onboarding/OnboardingPage.d.ts.map +1 -1
  20. package/dist/atheletebridge/pages/onboarding/OnboardingPage.js +244 -210
  21. package/dist/atheletebridge/pages/onboarding/OnboardingPage.js.map +1 -1
  22. package/dist/atheletebridge/pages/performance/PerformancePage.d.ts.map +1 -1
  23. package/dist/atheletebridge/pages/performance/PerformancePage.js +197 -148
  24. package/dist/atheletebridge/pages/performance/PerformancePage.js.map +1 -1
  25. package/dist/atheletebridge/pages/programs/ProgramDetailPage.d.ts.map +1 -1
  26. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +169 -143
  27. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
  28. package/dist/atheletebridge/pages/programs/ProgramsListPage.d.ts.map +1 -1
  29. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +77 -72
  30. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -1
  31. package/dist/atheletebridge/pages/sessions/SessionDetailPage.d.ts.map +1 -1
  32. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +104 -86
  33. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -1
  34. package/dist/atheletebridge/pages/sessions/SessionsListPage.d.ts.map +1 -1
  35. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +54 -49
  36. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
  37. package/dist/atheletebridge/pages/teams/TeamDetailPage.d.ts.map +1 -1
  38. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +286 -267
  39. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
  40. package/dist/atheletebridge/pages/teams/TeamFormPage.d.ts.map +1 -1
  41. package/dist/atheletebridge/pages/teams/TeamFormPage.js +185 -180
  42. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -1
  43. package/dist/atheletebridge/pages/teams/TeamsListPage.d.ts.map +1 -1
  44. package/dist/atheletebridge/pages/teams/TeamsListPage.js +70 -74
  45. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -1
  46. package/package.json +1 -1
@@ -84,13 +84,13 @@ var K = 10, q = [
84
84
  return (/* @__PURE__ */ new Date(e.getTime() - e.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
85
85
  }, $ = (e) => (Math.abs(e) >= 100 ? e.toFixed(0) : e.toFixed(2)).replace(/\.?0+$/, "");
86
86
  function pe() {
87
- let [e, t] = x({
87
+ let t = e(), [r, i] = x({
88
88
  athleteId: "",
89
89
  displayName: ""
90
90
  });
91
91
  return /* @__PURE__ */ z(n, {
92
- title: "Performance",
93
- description: "Log workouts, record metrics and track an athlete's progress over time.",
92
+ title: t("atheletebridge.pages.performance.title", "Performance"),
93
+ description: t("atheletebridge.pages.performance.description", "Log workouts, record metrics and track an athlete's progress over time."),
94
94
  children: [/* @__PURE__ */ R("div", {
95
95
  "data-tour": "performance-athlete-picker",
96
96
  className: "sticky top-0 z-20 -mx-6 mb-8 bg-bg-canvas/80 px-6 pb-4 pt-1 backdrop-blur supports-[backdrop-filter]:bg-bg-canvas/60",
@@ -98,19 +98,19 @@ function pe() {
98
98
  treatment: "insight",
99
99
  className: "p-5 sm:p-6",
100
100
  children: /* @__PURE__ */ R(y, {
101
- athleteId: e.athleteId,
102
- onSelect: t,
101
+ athleteId: r.athleteId,
102
+ onSelect: i,
103
103
  idPrefix: "perf-athlete"
104
104
  })
105
105
  })
106
- }), e.athleteId ? /* @__PURE__ */ R(me, {
107
- athleteId: e.athleteId,
108
- displayName: e.displayName
106
+ }), r.athleteId ? /* @__PURE__ */ R(me, {
107
+ athleteId: r.athleteId,
108
+ displayName: r.displayName
109
109
  }) : /* @__PURE__ */ R(c, {
110
110
  illustration: "empty-data",
111
111
  icon: /* @__PURE__ */ R(F, { className: "h-10 w-10" }),
112
- title: "Pick an athlete to begin",
113
- description: "Choose a team and an athlete above to log workouts, record metrics and review their history."
112
+ title: t("atheletebridge.pages.performance.pickAthleteTitle", "Pick an athlete to begin"),
113
+ description: t("atheletebridge.pages.performance.pickAthleteHint", "Choose a team and an athlete above to log workouts, record metrics and review their history.")
114
114
  })]
115
115
  });
116
116
  }
@@ -177,7 +177,7 @@ function me({ athleteId: n, displayName: r }) {
177
177
  }, [M.data, k]), Y = b(() => [
178
178
  {
179
179
  key: "workout",
180
- header: "Workout",
180
+ header: a("atheletebridge.pages.performance.column.workout", "Workout"),
181
181
  priority: "primary",
182
182
  cell: (e) => /* @__PURE__ */ z("div", {
183
183
  className: "flex items-center gap-3",
@@ -195,9 +195,9 @@ function me({ athleteId: n, displayName: r }) {
195
195
  },
196
196
  {
197
197
  key: "duration",
198
- header: "Duration",
198
+ header: a("atheletebridge.pages.performance.column.duration", "Duration"),
199
199
  priority: "secondary",
200
- mobileLabel: "Duration",
200
+ mobileLabel: a("atheletebridge.pages.performance.column.duration", "Duration"),
201
201
  cell: (e) => e.durationMin == null ? /* @__PURE__ */ R("span", {
202
202
  className: "text-text-muted",
203
203
  children: "—"
@@ -208,9 +208,9 @@ function me({ athleteId: n, displayName: r }) {
208
208
  },
209
209
  {
210
210
  key: "rpe",
211
- header: "RPE",
211
+ header: a("atheletebridge.pages.performance.column.rpe", "RPE"),
212
212
  priority: "secondary",
213
- mobileLabel: "RPE",
213
+ mobileLabel: a("atheletebridge.pages.performance.column.rpe", "RPE"),
214
214
  cell: (e) => e.rpe == null ? /* @__PURE__ */ R("span", {
215
215
  className: "text-text-muted",
216
216
  children: "—"
@@ -218,9 +218,9 @@ function me({ athleteId: n, displayName: r }) {
218
218
  },
219
219
  {
220
220
  key: "date",
221
- header: "Date",
221
+ header: a("atheletebridge.pages.performance.column.date", "Date"),
222
222
  priority: "secondary",
223
- mobileLabel: "Date",
223
+ mobileLabel: a("atheletebridge.pages.performance.column.date", "Date"),
224
224
  cell: (e) => /* @__PURE__ */ R("span", {
225
225
  className: "tabular-nums text-text-secondary",
226
226
  children: o(e.performedAt)
@@ -228,14 +228,14 @@ function me({ athleteId: n, displayName: r }) {
228
228
  },
229
229
  {
230
230
  key: "status",
231
- header: "Status",
231
+ header: a("atheletebridge.pages.performance.column.status", "Status"),
232
232
  priority: "primary",
233
- mobileLabel: "Status",
233
+ mobileLabel: a("atheletebridge.pages.performance.column.status", "Status"),
234
234
  cell: (e) => /* @__PURE__ */ R(i, { status: e.status })
235
235
  },
236
236
  {
237
237
  key: "notes",
238
- header: "Notes",
238
+ header: a("atheletebridge.pages.performance.column.notes", "Notes"),
239
239
  priority: "hidden-on-mobile",
240
240
  cell: (e) => e.notes ? /* @__PURE__ */ R("span", {
241
241
  className: "line-clamp-2 max-w-[22ch] text-text-secondary",
@@ -245,7 +245,7 @@ function me({ athleteId: n, displayName: r }) {
245
245
  children: "—"
246
246
  })
247
247
  }
248
- ], []);
248
+ ], [a]);
249
249
  return /* @__PURE__ */ z("div", {
250
250
  className: "space-y-8 pb-24 sm:pb-0",
251
251
  children: [
@@ -254,10 +254,11 @@ function me({ athleteId: n, displayName: r }) {
254
254
  children: [/* @__PURE__ */ z("p", {
255
255
  className: "text-sm text-text-secondary",
256
256
  children: [
257
- "Tracking ",
257
+ a("atheletebridge.pages.performance.tracking", "Tracking"),
258
+ " ",
258
259
  /* @__PURE__ */ R("span", {
259
260
  className: "font-medium text-text-primary",
260
- children: r || "athlete"
261
+ children: r || a("atheletebridge.pages.performance.athleteFallback", "athlete")
261
262
  }),
262
263
  k ? /* @__PURE__ */ z(L, { children: [" · ", /* @__PURE__ */ R("span", {
263
264
  className: "tabular-nums text-text-muted",
@@ -287,30 +288,42 @@ function me({ athleteId: n, displayName: r }) {
287
288
  type: "button",
288
289
  onClick: () => O(!0),
289
290
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
290
- children: [/* @__PURE__ */ R(D, { className: "h-4 w-4" }), " Record metric"]
291
+ children: [
292
+ /* @__PURE__ */ R(D, { className: "h-4 w-4" }),
293
+ " ",
294
+ a("atheletebridge.pages.performance.recordMetric", "Record metric")
295
+ ]
291
296
  }),
292
297
  /* @__PURE__ */ z("button", {
293
298
  type: "button",
294
299
  onClick: () => C(!0),
295
300
  className: t(Z, "hidden sm:inline-flex"),
296
- children: [/* @__PURE__ */ R(E, { className: "h-4 w-4" }), " Log workout"]
301
+ children: [
302
+ /* @__PURE__ */ R(E, { className: "h-4 w-4" }),
303
+ " ",
304
+ a("atheletebridge.pages.performance.logWorkout", "Log workout")
305
+ ]
297
306
  })
298
307
  ]
299
308
  })]
300
309
  }),
301
310
  /* @__PURE__ */ z("section", { children: [/* @__PURE__ */ R("h2", {
302
311
  className: "mb-4 text-lg font-semibold text-text-primary",
303
- children: "Performance metrics"
304
- }), M.isLoading ? /* @__PURE__ */ R(u, { label: "Loading metrics…" }) : M.isError ? /* @__PURE__ */ R(l, { onRetry: () => void M.refetch() }) : J.length === 0 ? /* @__PURE__ */ R(c, {
312
+ children: a("atheletebridge.pages.performance.metricsTitle", "Performance metrics")
313
+ }), M.isLoading ? /* @__PURE__ */ R(u, { label: a("atheletebridge.pages.performance.loadingMetrics", "Loading metrics…") }) : M.isError ? /* @__PURE__ */ R(l, { onRetry: () => void M.refetch() }) : J.length === 0 ? /* @__PURE__ */ R(c, {
305
314
  illustration: "empty-data",
306
315
  icon: /* @__PURE__ */ R(D, { className: "h-10 w-10" }),
307
- title: k ? a("atheletebridge.pages.performance.metrics.emptyWindowTitle", "No metrics in this window") : "No metrics recorded",
308
- description: k ? a("atheletebridge.pages.performance.metrics.emptyWindowDescription", "Nothing was recorded for this athlete in the selected period. Widen the date range, or record a metric.") : "Record a metric — speed, strength, endurance and more — to start charting progress.",
316
+ title: k ? a("atheletebridge.pages.performance.metrics.emptyWindowTitle", "No metrics in this window") : a("atheletebridge.pages.performance.metrics.emptyTitle", "No metrics recorded"),
317
+ description: k ? a("atheletebridge.pages.performance.metrics.emptyWindowDescription", "Nothing was recorded for this athlete in the selected period. Widen the date range, or record a metric.") : a("atheletebridge.pages.performance.noMetricsDescription", "Record a metric — speed, strength, endurance and more — to start charting progress."),
309
318
  action: /* @__PURE__ */ z("button", {
310
319
  type: "button",
311
320
  onClick: () => O(!0),
312
321
  className: Z,
313
- children: [/* @__PURE__ */ R(j, { className: "h-4 w-4" }), " Record metric"]
322
+ children: [
323
+ /* @__PURE__ */ R(j, { className: "h-4 w-4" }),
324
+ " ",
325
+ a("atheletebridge.pages.performance.recordMetricAction", "Record metric")
326
+ ]
314
327
  })
315
328
  }) : /* @__PURE__ */ R("div", {
316
329
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
@@ -323,18 +336,22 @@ function me({ athleteId: n, displayName: r }) {
323
336
  /* @__PURE__ */ z("section", { children: [
324
337
  /* @__PURE__ */ R("h2", {
325
338
  className: "mb-4 text-lg font-semibold text-text-primary",
326
- children: "Workout history"
339
+ children: a("atheletebridge.pages.performance.workoutsTitle", "Workout history")
327
340
  }),
328
- A.isLoading ? /* @__PURE__ */ R(u, { label: "Loading workouts…" }) : A.isError ? /* @__PURE__ */ R(l, { onRetry: () => void A.refetch() }) : H.length === 0 ? /* @__PURE__ */ R(c, {
341
+ A.isLoading ? /* @__PURE__ */ R(u, { label: a("atheletebridge.pages.performance.loadingWorkouts", "Loading workouts…") }) : A.isError ? /* @__PURE__ */ R(l, { onRetry: () => void A.refetch() }) : H.length === 0 ? /* @__PURE__ */ R(c, {
329
342
  illustration: "empty-data",
330
343
  icon: /* @__PURE__ */ R(S, { className: "h-10 w-10" }),
331
- title: k ? a("atheletebridge.pages.performance.workouts.emptyWindowTitle", "No workouts in this window") : "No workouts logged",
332
- description: k ? a("atheletebridge.pages.performance.workouts.emptyWindowDescription", "Nothing was logged for this athlete in the selected period. Widen the date range, or log a workout.") : "Log a workout to build this athlete's training history.",
344
+ title: k ? a("atheletebridge.pages.performance.workouts.emptyWindowTitle", "No workouts in this window") : a("atheletebridge.pages.performance.workouts.emptyTitle", "No workouts logged"),
345
+ description: k ? a("atheletebridge.pages.performance.workouts.emptyWindowDescription", "Nothing was logged for this athlete in the selected period. Widen the date range, or log a workout.") : a("atheletebridge.pages.performance.noWorkoutsDescription", "Log a workout to build this athlete's training history."),
333
346
  action: /* @__PURE__ */ z("button", {
334
347
  type: "button",
335
348
  onClick: () => C(!0),
336
349
  className: Z,
337
- children: [/* @__PURE__ */ R(E, { className: "h-4 w-4" }), " Log workout"]
350
+ children: [
351
+ /* @__PURE__ */ R(E, { className: "h-4 w-4" }),
352
+ " ",
353
+ a("atheletebridge.pages.performance.logWorkout", "Log workout")
354
+ ]
338
355
  })
339
356
  }) : /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(B, {
340
357
  treatment: "metric",
@@ -343,7 +360,7 @@ function me({ athleteId: n, displayName: r }) {
343
360
  columns: Y,
344
361
  data: H,
345
362
  rowKey: (e) => e.id,
346
- caption: `Workout history for ${r || "athlete"}`
363
+ caption: a("atheletebridge.pages.performance.workouts.caption", "Workout history for {{name}}").replace("{{name}}", r || a("atheletebridge.pages.performance.athleteFallback", "athlete"))
347
364
  })
348
365
  }), /* @__PURE__ */ R(h, {
349
366
  className: "mt-6",
@@ -363,7 +380,11 @@ function me({ athleteId: n, displayName: r }) {
363
380
  type: "button",
364
381
  onClick: () => C(!0),
365
382
  className: t(Z, "w-full py-3 text-base"),
366
- children: [/* @__PURE__ */ R(j, { className: "h-5 w-5" }), " Log workout"]
383
+ children: [
384
+ /* @__PURE__ */ R(j, { className: "h-5 w-5" }),
385
+ " ",
386
+ a("atheletebridge.pages.performance.logWorkout", "Log workout")
387
+ ]
367
388
  })
368
389
  }),
369
390
  /* @__PURE__ */ R(ve, {
@@ -392,7 +413,7 @@ function ge({ rpe: e }) {
392
413
  });
393
414
  }
394
415
  function _e({ metric: e, labels: t, tr: n }) {
395
- let i = ue[e.type], s = e.previous == null ? null : e.latest - e.previous, c = e.max > e.min, l = c ? Math.round((e.latest - e.min) / (e.max - e.min) * 100) : 100, u = e.unit ? ` ${e.unit}` : "";
416
+ let i = ue[e.type], a = e.previous == null ? null : e.latest - e.previous, s = e.max > e.min, c = s ? Math.round((e.latest - e.min) / (e.max - e.min) * 100) : 100, l = e.unit ? ` ${e.unit}` : "";
396
417
  return /* @__PURE__ */ z(B, {
397
418
  treatment: "metric",
398
419
  className: "flex flex-col gap-3 p-5",
@@ -404,7 +425,18 @@ function _e({ metric: e, labels: t, tr: n }) {
404
425
  children: [/* @__PURE__ */ R(i, {
405
426
  className: "h-4 w-4",
406
427
  "aria-hidden": "true"
407
- }), a[e.type]]
428
+ }), ((e) => {
429
+ switch (e) {
430
+ case "SPEED": return n("atheletebridge.metricType.speed", "Speed");
431
+ case "ENDURANCE": return n("atheletebridge.metricType.endurance", "Endurance");
432
+ case "STRENGTH": return n("atheletebridge.metricType.strength", "Strength");
433
+ case "AGILITY": return n("atheletebridge.metricType.agility", "Agility");
434
+ case "ACCURACY": return n("atheletebridge.metricType.accuracy", "Accuracy");
435
+ case "WEIGHT": return n("atheletebridge.metricType.weight", "Weight");
436
+ case "HEART_RATE": return n("atheletebridge.metricType.heartRate", "Heart Rate");
437
+ case "CUSTOM": return n("atheletebridge.metricType.custom", "Custom");
438
+ }
439
+ })(e.type)]
408
440
  }), /* @__PURE__ */ R("span", {
409
441
  className: "text-xs text-text-muted",
410
442
  children: o(e.recordedAt)
@@ -434,12 +466,12 @@ function _e({ metric: e, labels: t, tr: n }) {
434
466
  })
435
467
  }) : null]
436
468
  }),
437
- c ? /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("span", {
469
+ s ? /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("span", {
438
470
  className: "block h-1.5 overflow-hidden rounded-full bg-bg-sunken",
439
471
  "aria-hidden": "true",
440
472
  children: /* @__PURE__ */ R("span", {
441
473
  className: "block h-1.5 rounded-full bg-[var(--color-accent-teal)]",
442
- style: { width: `${Math.max(4, Math.min(100, l))}%` }
474
+ style: { width: `${Math.max(4, Math.min(100, c))}%` }
443
475
  })
444
476
  }), /* @__PURE__ */ z("div", {
445
477
  className: "mt-1 flex justify-between text-[0.7rem] tabular-nums text-text-muted",
@@ -451,10 +483,10 @@ function _e({ metric: e, labels: t, tr: n }) {
451
483
  })] }) : null,
452
484
  /* @__PURE__ */ R("div", {
453
485
  className: "mt-auto flex items-center gap-1.5 text-sm",
454
- children: s == null ? /* @__PURE__ */ R("span", {
486
+ children: a == null ? /* @__PURE__ */ R("span", {
455
487
  className: "text-text-muted",
456
488
  children: t.noComparison
457
- }) : s === 0 ? /* @__PURE__ */ z("span", {
489
+ }) : a === 0 ? /* @__PURE__ */ z("span", {
458
490
  className: "text-text-muted",
459
491
  children: [
460
492
  n("atheletebridge.pages.performance.window.noChange", "No change"),
@@ -464,12 +496,12 @@ function _e({ metric: e, labels: t, tr: n }) {
464
496
  }) : /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ z("span", {
465
497
  className: "inline-flex items-center gap-0.5 font-medium tabular-nums text-text-secondary",
466
498
  children: [
467
- R(s > 0 ? w : C, {
499
+ R(a > 0 ? w : C, {
468
500
  className: "h-4 w-4",
469
501
  "aria-hidden": "true"
470
502
  }),
471
- $(Math.abs(s)),
472
- u
503
+ $(Math.abs(a)),
504
+ l
473
505
  ]
474
506
  }), /* @__PURE__ */ R("span", {
475
507
  className: "text-text-muted",
@@ -479,77 +511,83 @@ function _e({ metric: e, labels: t, tr: n }) {
479
511
  ]
480
512
  });
481
513
  }
482
- function ve({ open: e, onOpenChange: n, athleteId: r, displayName: i }) {
483
- let a = d(), [o, s] = x(""), [c, l] = x("COMPLETED"), [u, f] = x(Q), [p, m] = x(""), [h, g] = x(""), [y, b] = x(""), [S, C] = x(""), [w, T] = x(null), E = () => {
484
- s(""), l("COMPLETED"), f(Q()), m(""), g(""), b(""), C(""), T(null);
514
+ function ve({ open: n, onOpenChange: r, athleteId: i, displayName: a }) {
515
+ let o = e(), s = d(), [c, l] = x(""), [u, f] = x("COMPLETED"), [p, m] = x(Q), [h, g] = x(""), [y, b] = x(""), [S, C] = x(""), [w, T] = x(""), [E, D] = x(null), O = () => {
516
+ l(""), f("COMPLETED"), m(Q()), g(""), b(""), C(""), T(""), D(null);
517
+ }, A = (e) => {
518
+ switch (e) {
519
+ case "COMPLETED": return o("atheletebridge.workoutStatus.completed", "Completed");
520
+ case "PLANNED": return o("atheletebridge.workoutStatus.planned", "Planned");
521
+ case "SKIPPED": return o("atheletebridge.workoutStatus.skipped", "Skipped");
522
+ }
485
523
  };
486
524
  return /* @__PURE__ */ R(V, {
487
- open: e,
488
- onOpenChange: n,
489
- children: /* @__PURE__ */ z(H, { children: [/* @__PURE__ */ R(W, { children: /* @__PURE__ */ z(G, { children: ["Log workout", i ? ` — ${i}` : ""] }) }), /* @__PURE__ */ z("form", {
525
+ open: n,
526
+ onOpenChange: r,
527
+ children: /* @__PURE__ */ z(H, { children: [/* @__PURE__ */ R(W, { children: /* @__PURE__ */ z(G, { children: [o("atheletebridge.pages.performance.logWorkoutDialogTitle", "Log workout"), a ? ` — ${a}` : ""] }) }), /* @__PURE__ */ z("form", {
490
528
  onSubmit: async (e) => {
491
- if (e.preventDefault(), T(null), !o.trim()) {
492
- T("A workout title is required.");
529
+ if (e.preventDefault(), D(null), !c.trim()) {
530
+ D(o("atheletebridge.pages.performance.error.titleRequired", "A workout title is required."));
493
531
  return;
494
532
  }
495
- if (!u) {
496
- T("A performed date and time is required.");
533
+ if (!p) {
534
+ D(o("atheletebridge.pages.performance.error.performedAtRequired", "A performed date and time is required."));
497
535
  return;
498
536
  }
499
537
  try {
500
- await a.mutateAsync({
501
- athleteId: r,
502
- title: o.trim(),
503
- status: c,
504
- performedAt: new Date(u).toISOString(),
505
- durationMin: de(p),
506
- rpe: de(h),
507
- totalLoad: fe(y),
508
- notes: S.trim() || void 0
509
- }), E(), n(!1);
538
+ await s.mutateAsync({
539
+ athleteId: i,
540
+ title: c.trim(),
541
+ status: u,
542
+ performedAt: new Date(p).toISOString(),
543
+ durationMin: de(h),
544
+ rpe: de(y),
545
+ totalLoad: fe(S),
546
+ notes: w.trim() || void 0
547
+ }), O(), r(!1);
510
548
  } catch (e) {
511
- T(e instanceof Error ? e.message : "Failed to log workout.");
549
+ D(e instanceof Error ? e.message : o("atheletebridge.pages.performance.error.logFailed", "Failed to log workout."));
512
550
  }
513
551
  },
514
552
  className: "space-y-4 px-1",
515
553
  children: [
516
554
  /* @__PURE__ */ R(_, {
517
- label: "Title",
555
+ label: o("atheletebridge.pages.performance.label.title", "Title"),
518
556
  htmlFor: "workoutTitle",
519
557
  required: !0,
520
558
  children: /* @__PURE__ */ R("input", {
521
559
  id: "workoutTitle",
522
560
  className: v,
523
- value: o,
524
- onChange: (e) => s(e.target.value),
525
- placeholder: "e.g. Lower-body strength"
561
+ value: c,
562
+ onChange: (e) => l(e.target.value),
563
+ placeholder: o("atheletebridge.pages.performance.placeholder.title", "e.g. Lower-body strength")
526
564
  })
527
565
  }),
528
566
  /* @__PURE__ */ z("div", {
529
567
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
530
568
  children: [/* @__PURE__ */ R(_, {
531
- label: "Status",
569
+ label: o("atheletebridge.pages.performance.label.status", "Status"),
532
570
  htmlFor: "workoutStatus",
533
571
  children: /* @__PURE__ */ R("select", {
534
572
  id: "workoutStatus",
535
573
  className: v,
536
- value: c,
537
- onChange: (e) => l(e.target.value),
574
+ value: u,
575
+ onChange: (e) => f(e.target.value),
538
576
  children: q.map((e) => /* @__PURE__ */ R("option", {
539
577
  value: e,
540
- children: e.charAt(0) + e.slice(1).toLowerCase()
578
+ children: A(e)
541
579
  }, e))
542
580
  })
543
581
  }), /* @__PURE__ */ R(_, {
544
- label: "Performed at",
582
+ label: o("atheletebridge.pages.performance.label.performedAt", "Performed at"),
545
583
  htmlFor: "workoutPerformedAt",
546
584
  required: !0,
547
585
  children: /* @__PURE__ */ R("input", {
548
586
  id: "workoutPerformedAt",
549
587
  type: "datetime-local",
550
588
  className: v,
551
- value: u,
552
- onChange: (e) => f(e.target.value)
589
+ value: p,
590
+ onChange: (e) => m(e.target.value)
553
591
  })
554
592
  })]
555
593
  }),
@@ -557,105 +595,116 @@ function ve({ open: e, onOpenChange: n, athleteId: r, displayName: i }) {
557
595
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
558
596
  children: [
559
597
  /* @__PURE__ */ R(_, {
560
- label: "Duration (min)",
598
+ label: o("atheletebridge.pages.performance.label.durationMin", "Duration (min)"),
561
599
  htmlFor: "workoutDuration",
562
600
  children: /* @__PURE__ */ R("input", {
563
601
  id: "workoutDuration",
564
602
  inputMode: "numeric",
565
603
  className: v,
566
- value: p,
567
- onChange: (e) => m(e.target.value)
604
+ value: h,
605
+ onChange: (e) => g(e.target.value)
568
606
  })
569
607
  }),
570
608
  /* @__PURE__ */ R(_, {
571
- label: "RPE (1–10)",
609
+ label: o("atheletebridge.pages.performance.label.rpe", "RPE (1–10)"),
572
610
  htmlFor: "workoutRpe",
573
611
  children: /* @__PURE__ */ R("input", {
574
612
  id: "workoutRpe",
575
613
  inputMode: "numeric",
576
614
  className: v,
577
- value: h,
578
- onChange: (e) => g(e.target.value)
615
+ value: y,
616
+ onChange: (e) => b(e.target.value)
579
617
  })
580
618
  }),
581
619
  /* @__PURE__ */ R(_, {
582
- label: "Total load",
620
+ label: o("atheletebridge.pages.performance.label.totalLoad", "Total load"),
583
621
  htmlFor: "workoutLoad",
584
622
  children: /* @__PURE__ */ R("input", {
585
623
  id: "workoutLoad",
586
624
  inputMode: "decimal",
587
625
  className: v,
588
- value: y,
589
- onChange: (e) => b(e.target.value)
626
+ value: S,
627
+ onChange: (e) => C(e.target.value)
590
628
  })
591
629
  })
592
630
  ]
593
631
  }),
594
632
  /* @__PURE__ */ R(_, {
595
- label: "Notes",
633
+ label: o("atheletebridge.pages.performance.label.notes", "Notes"),
596
634
  htmlFor: "workoutNotes",
597
635
  children: /* @__PURE__ */ R("textarea", {
598
636
  id: "workoutNotes",
599
637
  rows: 2,
600
638
  className: v,
601
- value: S,
602
- onChange: (e) => C(e.target.value),
603
- placeholder: "How did the session go?"
639
+ value: w,
640
+ onChange: (e) => T(e.target.value),
641
+ placeholder: o("atheletebridge.pages.performance.notesPlaceholder", "How did the session go?")
604
642
  })
605
643
  }),
606
- w && /* @__PURE__ */ R("p", {
644
+ E && /* @__PURE__ */ R("p", {
607
645
  className: "text-sm text-status-error-text",
608
- children: w
646
+ children: E
609
647
  }),
610
648
  /* @__PURE__ */ z(U, { children: [/* @__PURE__ */ R("button", {
611
649
  type: "button",
612
- onClick: () => n(!1),
650
+ onClick: () => r(!1),
613
651
  className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
614
- children: "Cancel"
652
+ children: o("common.cancel", "Cancel")
615
653
  }), /* @__PURE__ */ z("button", {
616
654
  type: "submit",
617
- disabled: a.isPending,
655
+ disabled: s.isPending,
618
656
  className: t(Z, "disabled:opacity-60"),
619
- children: [a.isPending ? /* @__PURE__ */ R(k, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ R(M, { className: "h-4 w-4" }), "Log workout"]
657
+ children: [s.isPending ? /* @__PURE__ */ R(k, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ R(M, { className: "h-4 w-4" }), o("atheletebridge.pages.performance.logWorkout", "Log workout")]
620
658
  })] })
621
659
  ]
622
660
  })] })
623
661
  });
624
662
  }
625
- function ye({ open: e, onOpenChange: n, athleteId: r, displayName: i }) {
626
- let o = p(), [s, c] = x("CUSTOM"), [l, u] = x(""), [d, f] = x(""), [m, h] = x(""), [g, y] = x(""), [b, S] = x(Q), [C, w] = x(null), T = () => {
627
- c("CUSTOM"), u(""), f(""), h(""), y(""), S(Q()), w(null);
663
+ function ye({ open: n, onOpenChange: r, athleteId: i, displayName: a }) {
664
+ let o = e(), s = p(), [c, l] = x("CUSTOM"), [u, d] = x(""), [f, m] = x(""), [h, g] = x(""), [y, b] = x(""), [S, C] = x(Q), [w, T] = x(null), E = () => {
665
+ l("CUSTOM"), d(""), m(""), g(""), b(""), C(Q()), T(null);
666
+ }, D = (e) => {
667
+ switch (e) {
668
+ case "SPEED": return o("atheletebridge.metricType.speed", "Speed");
669
+ case "ENDURANCE": return o("atheletebridge.metricType.endurance", "Endurance");
670
+ case "STRENGTH": return o("atheletebridge.metricType.strength", "Strength");
671
+ case "AGILITY": return o("atheletebridge.metricType.agility", "Agility");
672
+ case "ACCURACY": return o("atheletebridge.metricType.accuracy", "Accuracy");
673
+ case "WEIGHT": return o("atheletebridge.metricType.weight", "Weight");
674
+ case "HEART_RATE": return o("atheletebridge.metricType.heartRate", "Heart Rate");
675
+ case "CUSTOM": return o("atheletebridge.metricType.custom", "Custom");
676
+ }
628
677
  };
629
678
  return /* @__PURE__ */ R(V, {
630
- open: e,
631
- onOpenChange: n,
632
- children: /* @__PURE__ */ z(H, { children: [/* @__PURE__ */ R(W, { children: /* @__PURE__ */ z(G, { children: ["Record metric", i ? ` — ${i}` : ""] }) }), /* @__PURE__ */ z("form", {
679
+ open: n,
680
+ onOpenChange: r,
681
+ children: /* @__PURE__ */ z(H, { children: [/* @__PURE__ */ R(W, { children: /* @__PURE__ */ z(G, { children: [o("atheletebridge.pages.performance.recordMetricDialogTitle", "Record metric"), a ? ` — ${a}` : ""] }) }), /* @__PURE__ */ z("form", {
633
682
  onSubmit: async (e) => {
634
- if (e.preventDefault(), w(null), !l.trim()) {
635
- w("A metric label is required.");
683
+ if (e.preventDefault(), T(null), !u.trim()) {
684
+ T(o("atheletebridge.pages.performance.error.metricLabelRequired", "A metric label is required."));
636
685
  return;
637
686
  }
638
- let t = fe(d);
687
+ let t = fe(f);
639
688
  if (t === void 0) {
640
- w("A numeric value is required.");
689
+ T(o("atheletebridge.pages.performance.error.metricValueRequired", "A numeric value is required."));
641
690
  return;
642
691
  }
643
- if (!b) {
644
- w("A recorded date and time is required.");
692
+ if (!S) {
693
+ T(o("atheletebridge.pages.performance.error.recordedAtRequired", "A recorded date and time is required."));
645
694
  return;
646
695
  }
647
696
  try {
648
- await o.mutateAsync({
649
- athleteId: r,
650
- type: s,
651
- label: l.trim(),
697
+ await s.mutateAsync({
698
+ athleteId: i,
699
+ type: c,
700
+ label: u.trim(),
652
701
  value: t,
653
- unit: m.trim() || void 0,
654
- source: g.trim() || void 0,
655
- recordedAt: new Date(b).toISOString()
656
- }), T(), n(!1);
702
+ unit: h.trim() || void 0,
703
+ source: y.trim() || void 0,
704
+ recordedAt: new Date(S).toISOString()
705
+ }), E(), r(!1);
657
706
  } catch (e) {
658
- w(e instanceof Error ? e.message : "Failed to record metric.");
707
+ T(e instanceof Error ? e.message : o("atheletebridge.pages.performance.error.recordFailed", "Failed to record metric."));
659
708
  }
660
709
  },
661
710
  className: "space-y-4 px-1",
@@ -663,95 +712,95 @@ function ye({ open: e, onOpenChange: n, athleteId: r, displayName: i }) {
663
712
  /* @__PURE__ */ z("div", {
664
713
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
665
714
  children: [/* @__PURE__ */ R(_, {
666
- label: "Type",
715
+ label: o("atheletebridge.pages.performance.label.metricType", "Metric type"),
667
716
  htmlFor: "metricType",
668
717
  children: /* @__PURE__ */ R("select", {
669
718
  id: "metricType",
670
719
  className: v,
671
- value: s,
672
- onChange: (e) => c(e.target.value),
720
+ value: c,
721
+ onChange: (e) => l(e.target.value),
673
722
  children: J.map((e) => /* @__PURE__ */ R("option", {
674
723
  value: e,
675
- children: a[e]
724
+ children: D(e)
676
725
  }, e))
677
726
  })
678
727
  }), /* @__PURE__ */ R(_, {
679
- label: "Recorded at",
728
+ label: o("atheletebridge.pages.performance.label.recordedAt", "Recorded at"),
680
729
  htmlFor: "metricRecordedAt",
681
730
  required: !0,
682
731
  children: /* @__PURE__ */ R("input", {
683
732
  id: "metricRecordedAt",
684
733
  type: "datetime-local",
685
734
  className: v,
686
- value: b,
687
- onChange: (e) => S(e.target.value)
735
+ value: S,
736
+ onChange: (e) => C(e.target.value)
688
737
  })
689
738
  })]
690
739
  }),
691
740
  /* @__PURE__ */ R(_, {
692
- label: "Label",
741
+ label: o("atheletebridge.pages.performance.label.metricLabel", "Label"),
693
742
  htmlFor: "metricLabel",
694
743
  required: !0,
695
744
  children: /* @__PURE__ */ R("input", {
696
745
  id: "metricLabel",
697
746
  className: v,
698
- value: l,
699
- onChange: (e) => u(e.target.value),
700
- placeholder: "e.g. 40m sprint"
747
+ value: u,
748
+ onChange: (e) => d(e.target.value),
749
+ placeholder: o("atheletebridge.pages.performance.placeholder.metricLabel", "e.g. 40m sprint")
701
750
  })
702
751
  }),
703
752
  /* @__PURE__ */ z("div", {
704
753
  className: "grid grid-cols-2 gap-4",
705
754
  children: [/* @__PURE__ */ R(_, {
706
- label: "Value",
755
+ label: o("atheletebridge.pages.performance.label.value", "Value"),
707
756
  htmlFor: "metricValue",
708
757
  required: !0,
709
758
  children: /* @__PURE__ */ R("input", {
710
759
  id: "metricValue",
711
760
  inputMode: "decimal",
712
761
  className: v,
713
- value: d,
714
- onChange: (e) => f(e.target.value),
715
- placeholder: "e.g. 4.8"
762
+ value: f,
763
+ onChange: (e) => m(e.target.value),
764
+ placeholder: o("atheletebridge.pages.performance.placeholder.value", "e.g. 4.8")
716
765
  })
717
766
  }), /* @__PURE__ */ R(_, {
718
- label: "Unit",
767
+ label: o("atheletebridge.pages.performance.label.unit", "Unit"),
719
768
  htmlFor: "metricUnit",
720
769
  children: /* @__PURE__ */ R("input", {
721
770
  id: "metricUnit",
722
771
  className: v,
723
- value: m,
724
- onChange: (e) => h(e.target.value),
725
- placeholder: "e.g. s, kg, bpm"
772
+ value: h,
773
+ onChange: (e) => g(e.target.value),
774
+ placeholder: o("atheletebridge.pages.performance.placeholder.unit", "e.g. s, kg, bpm")
726
775
  })
727
776
  })]
728
777
  }),
729
778
  /* @__PURE__ */ R(_, {
730
- label: "Source",
779
+ label: o("atheletebridge.pages.performance.label.source", "Source"),
731
780
  htmlFor: "metricSource",
732
- hint: "Optional — device, test or coach.",
781
+ hint: o("atheletebridge.pages.performance.hint.source", "Optional — device, test or coach."),
733
782
  children: /* @__PURE__ */ R("input", {
734
783
  id: "metricSource",
735
784
  className: v,
736
- value: g,
737
- onChange: (e) => y(e.target.value),
738
- placeholder: "e.g. GPS vest"
785
+ value: y,
786
+ onChange: (e) => b(e.target.value),
787
+ placeholder: o("atheletebridge.pages.performance.placeholder.source", "e.g. GPS vest")
739
788
  })
740
789
  }),
741
- C && /* @__PURE__ */ R("p", {
790
+ w && /* @__PURE__ */ R("p", {
742
791
  className: "text-sm text-status-error-text",
743
- children: C
792
+ children: w
744
793
  }),
745
794
  /* @__PURE__ */ z(U, { children: [/* @__PURE__ */ R("button", {
746
795
  type: "button",
747
- onClick: () => n(!1),
796
+ onClick: () => r(!1),
748
797
  className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
749
- children: "Cancel"
798
+ children: o("common.cancel", "Cancel")
750
799
  }), /* @__PURE__ */ z("button", {
751
800
  type: "submit",
752
- disabled: o.isPending,
801
+ disabled: s.isPending,
753
802
  className: t(Z, "disabled:opacity-60"),
754
- children: [o.isPending ? /* @__PURE__ */ R(k, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ R(j, { className: "h-4 w-4" }), "Record metric"]
803
+ children: [s.isPending ? /* @__PURE__ */ R(k, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ R(j, { className: "h-4 w-4" }), o("atheletebridge.pages.performance.recordMetric", "Record metric")]
755
804
  })] })
756
805
  ]
757
806
  })] })