@burdenoff/microfe-atheletebridge 2026.827.1 → 2026.829.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -1,19 +1,20 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { StatusBadge as n } from "../../components/StatusBadge.js";
4
- import { PROGRAM_LEVEL_LABELS as r, SPORT_ICONS as i, SPORT_LABELS as a } from "../../components/domain.js";
5
- import { EmptyState as o } from "../../components/EmptyState.js";
6
- import { ErrorState as s, LoadingState as c } from "../../components/LoadingState.js";
7
- import { useAddDrill as l, useArchiveProgram as ee, useProgram as te, useRemoveDrill as ne, useTransitionProgram as re, useUploadFile as ie } from "../../hooks/useAthleteBridgeApi.js";
8
- import { FormField as u, fieldInputClass as d } from "../../components/form.js";
9
- import { DrillVideoLink as f } from "../../components/DrillVideoLink.js";
10
- import { useMemo as p, useState as m } from "react";
11
- import { Archive as h, ArrowLeft as g, Copy as _, Edit as v, FileVideo as y, Loader2 as b, Plus as x, Send as ae, Trash2 as oe, Undo2 as se } from "lucide-react";
12
- import { useParams as ce } from "react-router";
13
- import { Fragment as le, jsx as S, jsxs as C } from "react/jsx-runtime";
14
- import { Accordion as ue, AccordionContent as de, AccordionItem as fe, AccordionTrigger as pe, Badge as w, GlassCard as T, ResponsiveDialog as E, ResponsiveDialogContent as D, ResponsiveDialogFooter as O, ResponsiveDialogHeader as k, ResponsiveDialogTitle as A } from "@burdenoff/fe-libs/ui";
1
+ import { useAbTranslate as e } from "../../i18n.js";
2
+ import { useAthleteBridge as t } from "../../context/AthleteBridgeContext.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { StatusBadge as r } from "../../components/StatusBadge.js";
5
+ import { PROGRAM_LEVEL_LABELS as i, SPORT_ICONS as a, SPORT_LABELS as o } from "../../components/domain.js";
6
+ import { EmptyState as ee } from "../../components/EmptyState.js";
7
+ import { ErrorState as te, LoadingState as s } from "../../components/LoadingState.js";
8
+ import { useAddDrill as ne, useArchiveProgram as c, useProgram as l, useRemoveDrill as u, useTransitionProgram as d, useUploadFile as f } from "../../hooks/useAthleteBridgeApi.js";
9
+ import { FormField as p, fieldInputClass as m } from "../../components/form.js";
10
+ import { DrillVideoLink as h } from "../../components/DrillVideoLink.js";
11
+ import { useMemo as re, useState as g } from "react";
12
+ import { Archive as _, ArrowLeft as ie, Copy as ae, Edit as oe, FileVideo as se, Loader2 as v, Plus as y, Send as ce, Trash2 as le, Undo2 as ue } from "lucide-react";
13
+ import { useParams as b } from "react-router";
14
+ import { Fragment as de, jsx as x, jsxs as S } from "react/jsx-runtime";
15
+ import { Accordion as fe, AccordionContent as pe, AccordionItem as me, AccordionTrigger as he, Badge as C, GlassCard as w, ResponsiveDialog as T, ResponsiveDialogContent as E, ResponsiveDialogFooter as D, ResponsiveDialogHeader as O, ResponsiveDialogTitle as k } from "@burdenoff/fe-libs/ui";
15
16
  //#region src/atheletebridge/pages/programs/ProgramDetailPage.tsx
16
- var j = {
17
+ var A = {
17
18
  name: "",
18
19
  description: "",
19
20
  weekNumber: "1",
@@ -21,17 +22,17 @@ var j = {
21
22
  reps: "",
22
23
  durationSec: "",
23
24
  restSec: ""
24
- }, M = ({ children: e }) => /* @__PURE__ */ S("span", {
25
+ }, j = ({ children: e }) => /* @__PURE__ */ x("span", {
25
26
  className: "inline-flex items-center rounded-md border border-border-seam bg-bg-sunken px-2 py-0.5 text-xs font-medium tabular-nums text-text-secondary",
26
27
  children: e
27
- }), N = (e) => {
28
+ }), M = (e) => {
28
29
  let t = e.trim();
29
30
  if (!t) return;
30
31
  let n = Number.parseInt(t, 10);
31
32
  return Number.isNaN(n) ? void 0 : n;
32
33
  };
33
- function P() {
34
- let { id: P } = ce(), { navigateTo: F } = e(), I = te(P), L = re(), R = ee(), z = l(), B = ne(P), me = ie(), [he, V] = m(!1), [H, U] = m(j), [W, G] = m(null), [K, q] = m(!1), [J, Y] = m(null), X = p(() => {
34
+ function N() {
35
+ let N = e(), { id: P } = b(), { navigateTo: F } = t(), I = l(P), L = d(), R = c(), z = ne(), B = u(P), ge = f(), [_e, V] = g(!1), [H, U] = g(A), [W, G] = g(null), [K, q] = g(!1), [J, Y] = g(null), X = re(() => {
35
36
  let e = I.data?.drills?.items ?? [], t = /* @__PURE__ */ new Map();
36
37
  for (let n of e) {
37
38
  let e = t.get(n.weekNumber) ?? [];
@@ -42,44 +43,52 @@ function P() {
42
43
  drills: [...t].sort((e, t) => e.orderIndex - t.orderIndex)
43
44
  }));
44
45
  }, [I.data]);
45
- if (I.isLoading) return /* @__PURE__ */ S(t, {
46
- title: "Program",
47
- children: /* @__PURE__ */ S(c, { label: "Loading program…" })
46
+ if (I.isLoading) return /* @__PURE__ */ x(n, {
47
+ title: N("atheletebridge.pages.programDetail.title", "Program"),
48
+ children: /* @__PURE__ */ x(s, { label: N("atheletebridge.pages.programDetail.loading", "Loading program…") })
48
49
  });
49
- if (I.isError || !I.data) return /* @__PURE__ */ S(t, {
50
- title: "Program",
51
- children: /* @__PURE__ */ S(s, {
52
- title: "Program not found",
53
- message: "This program does not exist or you do not have access to it.",
50
+ if (I.isError || !I.data) return /* @__PURE__ */ x(n, {
51
+ title: N("atheletebridge.pages.programDetail.title", "Program"),
52
+ children: /* @__PURE__ */ x(te, {
53
+ title: N("atheletebridge.pages.programDetail.notFoundTitle", "Program not found"),
54
+ message: N("atheletebridge.pages.programDetail.notFoundMessage", "This program does not exist or you do not have access to it."),
54
55
  onRetry: () => F("/programs")
55
56
  })
56
57
  });
57
- let Z = I.data, Q = Z.drills?.items.length ?? 0, ge = i[Z.sport], _e = X.map(({ week: e }) => `week-${e}`), $ = (e) => {
58
+ let Z = I.data, Q = Z.drills?.items.length ?? 0, ve = a[Z.sport], ye = X.map(({ week: e }) => `week-${e}`), $ = (e) => {
58
59
  P && L.mutate({
59
60
  id: P,
60
61
  status: e
61
62
  });
62
63
  };
63
- return /* @__PURE__ */ C(t, {
64
+ return /* @__PURE__ */ S(n, {
64
65
  title: Z.name,
65
66
  gradientTitle: !0,
66
- description: `${a[Z.sport]} · ${r[Z.level]} · ${Z.weeks} ${Z.weeks === 1 ? "week" : "weeks"}`,
67
- actions: /* @__PURE__ */ C("div", {
67
+ description: `${o[Z.sport]} · ${i[Z.level]} · ${Z.weeks} ${Z.weeks === 1 ? "week" : "weeks"}`,
68
+ actions: /* @__PURE__ */ S("div", {
68
69
  className: "flex flex-wrap items-center gap-2",
69
70
  children: [
70
- /* @__PURE__ */ C("button", {
71
+ /* @__PURE__ */ S("button", {
71
72
  type: "button",
72
73
  onClick: () => F("/programs"),
73
74
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
74
- children: [/* @__PURE__ */ S(g, { className: "h-4 w-4" }), " Back"]
75
+ children: [
76
+ /* @__PURE__ */ x(ie, { className: "h-4 w-4" }),
77
+ " ",
78
+ N("atheletebridge.pages.programDetail.back", "Back")
79
+ ]
75
80
  }),
76
- /* @__PURE__ */ C("button", {
81
+ /* @__PURE__ */ S("button", {
77
82
  type: "button",
78
83
  onClick: () => F(`/programs/${Z.id}/edit`),
79
84
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
80
- children: [/* @__PURE__ */ S(v, { className: "h-4 w-4" }), " Edit"]
85
+ children: [
86
+ /* @__PURE__ */ x(oe, { className: "h-4 w-4" }),
87
+ " ",
88
+ N("atheletebridge.pages.programDetail.edit", "Edit")
89
+ ]
81
90
  }),
82
- Z.status !== "ARCHIVED" && /* @__PURE__ */ C("button", {
91
+ Z.status !== "ARCHIVED" && /* @__PURE__ */ S("button", {
83
92
  type: "button",
84
93
  onClick: async () => {
85
94
  P && (await R.mutateAsync(P), F("/programs"));
@@ -87,46 +96,46 @@ function P() {
87
96
  disabled: R.isPending,
88
97
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-60",
89
98
  children: [
90
- R.isPending ? /* @__PURE__ */ S(b, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ S(h, { className: "h-4 w-4" }),
99
+ R.isPending ? /* @__PURE__ */ x(v, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ x(_, { className: "h-4 w-4" }),
91
100
  " ",
92
- "Archive"
101
+ N("atheletebridge.pages.programDetail.archive", "Archive")
93
102
  ]
94
103
  })
95
104
  ]
96
105
  }),
97
106
  children: [
98
- /* @__PURE__ */ C(T, {
107
+ /* @__PURE__ */ S(w, {
99
108
  treatment: "insight",
100
109
  className: "mb-8 p-6",
101
110
  children: [
102
- /* @__PURE__ */ C("div", {
111
+ /* @__PURE__ */ S("div", {
103
112
  className: "flex items-start gap-4",
104
- children: [/* @__PURE__ */ S("div", {
113
+ children: [/* @__PURE__ */ x("div", {
105
114
  className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-[var(--color-accent-soft)] text-text-primary",
106
- children: /* @__PURE__ */ S(ge, {
115
+ children: /* @__PURE__ */ x(ve, {
107
116
  className: "h-7 w-7",
108
117
  "aria-hidden": "true"
109
118
  })
110
- }), /* @__PURE__ */ C("div", {
119
+ }), /* @__PURE__ */ S("div", {
111
120
  className: "min-w-0 flex-1",
112
- children: [/* @__PURE__ */ C("div", {
121
+ children: [/* @__PURE__ */ S("div", {
113
122
  className: "flex flex-wrap items-center gap-2",
114
123
  children: [
115
- /* @__PURE__ */ S(w, {
124
+ /* @__PURE__ */ x(C, {
116
125
  variant: "secondary",
117
- children: a[Z.sport]
126
+ children: o[Z.sport]
118
127
  }),
119
- /* @__PURE__ */ S(w, {
128
+ /* @__PURE__ */ x(C, {
120
129
  variant: "secondary",
121
- children: r[Z.level]
130
+ children: i[Z.level]
122
131
  }),
123
- /* @__PURE__ */ S(n, { status: Z.status }),
124
- Z.isTemplate && /* @__PURE__ */ C("span", {
132
+ /* @__PURE__ */ x(r, { status: Z.status }),
133
+ Z.isTemplate && /* @__PURE__ */ S("span", {
125
134
  className: "inline-flex items-center gap-1 text-xs text-text-secondary",
126
- children: [/* @__PURE__ */ S(_, { className: "h-3.5 w-3.5" }), " Template"]
135
+ children: [/* @__PURE__ */ x(ae, { className: "h-3.5 w-3.5" }), " Template"]
127
136
  })
128
137
  ]
129
- }), /* @__PURE__ */ C("p", {
138
+ }), /* @__PURE__ */ S("p", {
130
139
  className: "mt-2 text-sm text-text-secondary",
131
140
  children: [
132
141
  Z.weeks,
@@ -140,93 +149,110 @@ function P() {
140
149
  })]
141
150
  })]
142
151
  }),
143
- Z.summary && /* @__PURE__ */ S("p", {
152
+ Z.summary && /* @__PURE__ */ x("p", {
144
153
  className: "mt-4 text-sm text-text-secondary",
145
154
  children: Z.summary
146
155
  }),
147
- Z.tags.length > 0 && /* @__PURE__ */ S("div", {
156
+ Z.tags.length > 0 && /* @__PURE__ */ x("div", {
148
157
  className: "mt-4 flex flex-wrap gap-1.5",
149
- children: Z.tags.map((e) => /* @__PURE__ */ S("span", {
158
+ children: Z.tags.map((e) => /* @__PURE__ */ x("span", {
150
159
  className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
151
160
  children: e
152
161
  }, e))
153
162
  }),
154
- /* @__PURE__ */ C("div", {
163
+ /* @__PURE__ */ S("div", {
155
164
  className: "mt-5 flex flex-wrap items-center gap-2 border-t border-border-seam pt-5",
156
165
  children: [
157
- /* @__PURE__ */ S("span", {
166
+ /* @__PURE__ */ x("span", {
158
167
  className: "text-sm font-medium text-text-primary",
159
- children: "Publish lifecycle:"
168
+ children: N("atheletebridge.pages.programDetail.lifecycle", "Publish lifecycle:")
160
169
  }),
161
- Z.status === "DRAFT" && /* @__PURE__ */ C("button", {
170
+ Z.status === "DRAFT" && /* @__PURE__ */ S("button", {
162
171
  type: "button",
163
172
  onClick: () => $("PUBLISHED"),
164
173
  disabled: L.isPending,
165
174
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
166
- children: [/* @__PURE__ */ S(ae, { className: "h-4 w-4" }), " Publish"]
175
+ children: [
176
+ /* @__PURE__ */ x(ce, { className: "h-4 w-4" }),
177
+ " ",
178
+ N("atheletebridge.pages.programDetail.publish", "Publish")
179
+ ]
167
180
  }),
168
- Z.status === "PUBLISHED" && /* @__PURE__ */ C(le, { children: [/* @__PURE__ */ C("button", {
181
+ Z.status === "PUBLISHED" && /* @__PURE__ */ S(de, { children: [/* @__PURE__ */ S("button", {
169
182
  type: "button",
170
183
  onClick: () => $("DRAFT"),
171
184
  disabled: L.isPending,
172
185
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60",
173
- children: [/* @__PURE__ */ S(se, { className: "h-4 w-4" }), " Pull back to draft"]
174
- }), /* @__PURE__ */ C("button", {
186
+ children: [
187
+ /* @__PURE__ */ x(ue, { className: "h-4 w-4" }),
188
+ " ",
189
+ N("atheletebridge.pages.programDetail.pullBackToDraft", "Pull back to draft")
190
+ ]
191
+ }), /* @__PURE__ */ S("button", {
175
192
  type: "button",
176
193
  onClick: () => $("ARCHIVED"),
177
194
  disabled: L.isPending,
178
195
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-60",
179
- children: [/* @__PURE__ */ S(h, { className: "h-4 w-4" }), " Archive"]
196
+ children: [
197
+ /* @__PURE__ */ x(_, { className: "h-4 w-4" }),
198
+ " ",
199
+ N("atheletebridge.pages.programDetail.archiveAction", "Archive")
200
+ ]
180
201
  })] }),
181
- Z.status === "ARCHIVED" && /* @__PURE__ */ S("span", {
202
+ Z.status === "ARCHIVED" && /* @__PURE__ */ x("span", {
182
203
  className: "text-sm text-text-secondary",
183
- children: "This program is archived."
204
+ children: N("atheletebridge.pages.programDetail.archived", "This program is archived.")
184
205
  }),
185
- L.isPending && /* @__PURE__ */ S(b, { className: "h-4 w-4 animate-spin text-text-secondary" })
206
+ L.isPending && /* @__PURE__ */ x(v, { className: "h-4 w-4 animate-spin text-text-secondary" })
186
207
  ]
187
208
  })
188
209
  ]
189
210
  }),
190
- /* @__PURE__ */ C("section", { children: [/* @__PURE__ */ C("div", {
211
+ /* @__PURE__ */ S("section", { children: [/* @__PURE__ */ S("div", {
191
212
  className: "mb-4 flex items-center justify-between",
192
- children: [/* @__PURE__ */ C("h2", {
213
+ children: [/* @__PURE__ */ S("h2", {
193
214
  className: "text-lg font-semibold text-text-primary",
194
215
  children: [
195
- "Drills (",
216
+ N("atheletebridge.pages.programDetail.drillsTitle", "Drills"),
217
+ " (",
196
218
  Q,
197
219
  ")"
198
220
  ]
199
- }), /* @__PURE__ */ C("button", {
221
+ }), /* @__PURE__ */ S("button", {
200
222
  type: "button",
201
223
  onClick: () => {
202
224
  Y(null), V(!0);
203
225
  },
204
226
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90",
205
- children: [/* @__PURE__ */ S(x, { className: "h-4 w-4" }), " Add drill"]
227
+ children: [
228
+ /* @__PURE__ */ x(y, { className: "h-4 w-4" }),
229
+ " ",
230
+ N("atheletebridge.pages.programDetail.addDrill", "Add drill")
231
+ ]
206
232
  })]
207
- }), Q === 0 ? /* @__PURE__ */ S(o, {
233
+ }), Q === 0 ? /* @__PURE__ */ x(ee, {
208
234
  illustration: "empty-data",
209
- icon: /* @__PURE__ */ S(x, { className: "h-10 w-10" }),
210
- title: "No drills yet",
211
- description: "Add drills with sets, reps and durations, organized by week."
212
- }) : /* @__PURE__ */ S(ue, {
235
+ icon: /* @__PURE__ */ x(y, { className: "h-10 w-10" }),
236
+ title: N("atheletebridge.pages.programDetail.noDrillsTitle", "No drills yet"),
237
+ description: N("atheletebridge.pages.programDetail.noDrillsHint", "Add drills with sets, reps and durations, organized by week.")
238
+ }) : /* @__PURE__ */ x(fe, {
213
239
  type: "multiple",
214
- defaultValue: _e,
240
+ defaultValue: ye,
215
241
  className: "flex flex-col gap-3",
216
- children: X.map(({ week: e, drills: t }) => /* @__PURE__ */ S(T, {
242
+ children: X.map(({ week: e, drills: t }) => /* @__PURE__ */ x(w, {
217
243
  treatment: "insight",
218
244
  className: "overflow-hidden px-4 py-0",
219
- children: /* @__PURE__ */ C(fe, {
245
+ children: /* @__PURE__ */ S(me, {
220
246
  value: `week-${e}`,
221
247
  className: "border-b-0",
222
- children: [/* @__PURE__ */ S(pe, {
248
+ children: [/* @__PURE__ */ x(he, {
223
249
  className: "py-4",
224
- children: /* @__PURE__ */ C("span", {
250
+ children: /* @__PURE__ */ S("span", {
225
251
  className: "flex items-center gap-2.5",
226
- children: [/* @__PURE__ */ C("span", {
252
+ children: [/* @__PURE__ */ S("span", {
227
253
  className: "text-sm font-semibold text-text-primary",
228
254
  children: ["Week ", e]
229
- }), /* @__PURE__ */ C(w, {
255
+ }), /* @__PURE__ */ S(C, {
230
256
  variant: "secondary",
231
257
  children: [
232
258
  t.length,
@@ -235,41 +261,41 @@ function P() {
235
261
  ]
236
262
  })]
237
263
  })
238
- }), /* @__PURE__ */ S(de, {
264
+ }), /* @__PURE__ */ x(pe, {
239
265
  className: "pb-2",
240
- children: /* @__PURE__ */ S("div", {
266
+ children: /* @__PURE__ */ x("div", {
241
267
  className: "divide-y divide-border-seam",
242
- children: t.map((e) => /* @__PURE__ */ C("div", {
268
+ children: t.map((e) => /* @__PURE__ */ S("div", {
243
269
  className: "flex items-start gap-4 py-3",
244
- children: [/* @__PURE__ */ C("div", {
270
+ children: [/* @__PURE__ */ S("div", {
245
271
  className: "min-w-0 flex-1",
246
272
  children: [
247
- /* @__PURE__ */ S("p", {
273
+ /* @__PURE__ */ x("p", {
248
274
  className: "text-sm font-medium text-text-primary",
249
275
  children: e.name
250
276
  }),
251
- e.description && /* @__PURE__ */ S("p", {
277
+ e.description && /* @__PURE__ */ x("p", {
252
278
  className: "mt-0.5 text-xs text-text-secondary",
253
279
  children: e.description
254
280
  }),
255
- /* @__PURE__ */ C("div", {
281
+ /* @__PURE__ */ S("div", {
256
282
  className: "mt-2 flex flex-wrap gap-1.5",
257
283
  children: [
258
- e.sets !== null && /* @__PURE__ */ C(M, { children: [e.sets, " sets"] }),
259
- e.reps !== null && /* @__PURE__ */ C(M, { children: [e.reps, " reps"] }),
260
- e.durationSec !== null && /* @__PURE__ */ C(M, { children: [e.durationSec, "s work"] }),
261
- e.restSec !== null && /* @__PURE__ */ C(M, { children: [e.restSec, "s rest"] })
284
+ e.sets !== null && /* @__PURE__ */ S(j, { children: [e.sets, " sets"] }),
285
+ e.reps !== null && /* @__PURE__ */ S(j, { children: [e.reps, " reps"] }),
286
+ e.durationSec !== null && /* @__PURE__ */ S(j, { children: [e.durationSec, "s work"] }),
287
+ e.restSec !== null && /* @__PURE__ */ S(j, { children: [e.restSec, "s rest"] })
262
288
  ]
263
289
  }),
264
- e.video?.id && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(f, { fileId: e.video.id }) })
290
+ e.video?.id && /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(h, { fileId: e.video.id }) })
265
291
  ]
266
- }), /* @__PURE__ */ S("button", {
292
+ }), /* @__PURE__ */ x("button", {
267
293
  type: "button",
268
294
  onClick: () => void B.mutate(e.id),
269
295
  disabled: B.isPending,
270
- "aria-label": `Remove ${e.name}`,
296
+ "aria-label": `${N("common.delete", "Delete")} ${e.name}`,
271
297
  className: "rounded-lg p-2 text-text-secondary transition-colors hover:bg-status-error-bg-subtle hover:text-status-error-text disabled:opacity-60",
272
- children: /* @__PURE__ */ S(oe, { className: "h-4 w-4" })
298
+ children: /* @__PURE__ */ x(le, { className: "h-4 w-4" })
273
299
  })]
274
300
  }, e.id))
275
301
  })
@@ -277,21 +303,21 @@ function P() {
277
303
  })
278
304
  }, e))
279
305
  })] }),
280
- /* @__PURE__ */ S(E, {
281
- open: he,
306
+ /* @__PURE__ */ x(T, {
307
+ open: _e,
282
308
  onOpenChange: V,
283
- children: /* @__PURE__ */ C(D, { children: [/* @__PURE__ */ S(k, { children: /* @__PURE__ */ S(A, { children: "Add drill" }) }), /* @__PURE__ */ C("form", {
309
+ children: /* @__PURE__ */ S(E, { children: [/* @__PURE__ */ x(O, { children: /* @__PURE__ */ x(k, { children: N("atheletebridge.pages.programDetail.addDrill", "Add drill") }) }), /* @__PURE__ */ S("form", {
284
310
  onSubmit: async (e) => {
285
311
  if (e.preventDefault(), Y(null), !P) return;
286
312
  if (!H.name.trim()) {
287
313
  Y("Drill name is required.");
288
314
  return;
289
315
  }
290
- let t = N(H.weekNumber) ?? 1, n;
316
+ let t = M(H.weekNumber) ?? 1, n;
291
317
  if (W) {
292
318
  q(!0);
293
319
  try {
294
- n = await me(W);
320
+ n = await ge(W);
295
321
  } catch (e) {
296
322
  Y(e instanceof Error ? e.message : "Failed to upload the demo video."), q(!1);
297
323
  return;
@@ -305,25 +331,25 @@ function P() {
305
331
  description: H.description.trim() || void 0,
306
332
  weekNumber: t,
307
333
  orderIndex: I.data?.drills?.items.filter((e) => e.weekNumber === t).length ?? 0,
308
- sets: N(H.sets),
309
- reps: N(H.reps),
310
- durationSec: N(H.durationSec),
311
- restSec: N(H.restSec),
334
+ sets: M(H.sets),
335
+ reps: M(H.reps),
336
+ durationSec: M(H.durationSec),
337
+ restSec: M(H.restSec),
312
338
  videoFileId: n
313
- }), U(j), G(null), V(!1);
339
+ }), U(A), G(null), V(!1);
314
340
  } catch (e) {
315
341
  Y(e instanceof Error ? e.message : "Failed to add drill.");
316
342
  }
317
343
  },
318
344
  className: "space-y-4 px-1",
319
345
  children: [
320
- /* @__PURE__ */ S(u, {
346
+ /* @__PURE__ */ x(p, {
321
347
  label: "Name",
322
348
  htmlFor: "drillName",
323
349
  required: !0,
324
- children: /* @__PURE__ */ S("input", {
350
+ children: /* @__PURE__ */ x("input", {
325
351
  id: "drillName",
326
- className: d,
352
+ className: m,
327
353
  value: H.name,
328
354
  onChange: (e) => U((t) => ({
329
355
  ...t,
@@ -332,12 +358,12 @@ function P() {
332
358
  placeholder: "e.g. Box jumps"
333
359
  })
334
360
  }),
335
- /* @__PURE__ */ S(u, {
361
+ /* @__PURE__ */ x(p, {
336
362
  label: "Description",
337
363
  htmlFor: "drillDesc",
338
- children: /* @__PURE__ */ S("textarea", {
364
+ children: /* @__PURE__ */ x("textarea", {
339
365
  id: "drillDesc",
340
- className: d,
366
+ className: m,
341
367
  rows: 2,
342
368
  value: H.description,
343
369
  onChange: (e) => U((t) => ({
@@ -347,16 +373,16 @@ function P() {
347
373
  placeholder: "How to perform the drill."
348
374
  })
349
375
  }),
350
- /* @__PURE__ */ C("div", {
376
+ /* @__PURE__ */ S("div", {
351
377
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
352
378
  children: [
353
- /* @__PURE__ */ S(u, {
379
+ /* @__PURE__ */ x(p, {
354
380
  label: "Week",
355
381
  htmlFor: "drillWeek",
356
- children: /* @__PURE__ */ S("input", {
382
+ children: /* @__PURE__ */ x("input", {
357
383
  id: "drillWeek",
358
384
  inputMode: "numeric",
359
- className: d,
385
+ className: m,
360
386
  value: H.weekNumber,
361
387
  onChange: (e) => U((t) => ({
362
388
  ...t,
@@ -364,13 +390,13 @@ function P() {
364
390
  }))
365
391
  })
366
392
  }),
367
- /* @__PURE__ */ S(u, {
393
+ /* @__PURE__ */ x(p, {
368
394
  label: "Sets",
369
395
  htmlFor: "drillSets",
370
- children: /* @__PURE__ */ S("input", {
396
+ children: /* @__PURE__ */ x("input", {
371
397
  id: "drillSets",
372
398
  inputMode: "numeric",
373
- className: d,
399
+ className: m,
374
400
  value: H.sets,
375
401
  onChange: (e) => U((t) => ({
376
402
  ...t,
@@ -378,13 +404,13 @@ function P() {
378
404
  }))
379
405
  })
380
406
  }),
381
- /* @__PURE__ */ S(u, {
407
+ /* @__PURE__ */ x(p, {
382
408
  label: "Reps",
383
409
  htmlFor: "drillReps",
384
- children: /* @__PURE__ */ S("input", {
410
+ children: /* @__PURE__ */ x("input", {
385
411
  id: "drillReps",
386
412
  inputMode: "numeric",
387
- className: d,
413
+ className: m,
388
414
  value: H.reps,
389
415
  onChange: (e) => U((t) => ({
390
416
  ...t,
@@ -394,28 +420,28 @@ function P() {
394
420
  })
395
421
  ]
396
422
  }),
397
- /* @__PURE__ */ C("div", {
423
+ /* @__PURE__ */ S("div", {
398
424
  className: "grid grid-cols-2 gap-4",
399
- children: [/* @__PURE__ */ S(u, {
425
+ children: [/* @__PURE__ */ x(p, {
400
426
  label: "Work (sec)",
401
427
  htmlFor: "drillDuration",
402
- children: /* @__PURE__ */ S("input", {
428
+ children: /* @__PURE__ */ x("input", {
403
429
  id: "drillDuration",
404
430
  inputMode: "numeric",
405
- className: d,
431
+ className: m,
406
432
  value: H.durationSec,
407
433
  onChange: (e) => U((t) => ({
408
434
  ...t,
409
435
  durationSec: e.target.value
410
436
  }))
411
437
  })
412
- }), /* @__PURE__ */ S(u, {
438
+ }), /* @__PURE__ */ x(p, {
413
439
  label: "Rest (sec)",
414
440
  htmlFor: "drillRest",
415
- children: /* @__PURE__ */ S("input", {
441
+ children: /* @__PURE__ */ x("input", {
416
442
  id: "drillRest",
417
443
  inputMode: "numeric",
418
- className: d,
444
+ className: m,
419
445
  value: H.restSec,
420
446
  onChange: (e) => U((t) => ({
421
447
  ...t,
@@ -424,41 +450,41 @@ function P() {
424
450
  })
425
451
  })]
426
452
  }),
427
- /* @__PURE__ */ C(u, {
453
+ /* @__PURE__ */ S(p, {
428
454
  label: "Demo video",
429
455
  htmlFor: "drillVideo",
430
456
  hint: "Optional — attach a short demo clip; it's stored in workspace files.",
431
- children: [/* @__PURE__ */ S("input", {
457
+ children: [/* @__PURE__ */ x("input", {
432
458
  id: "drillVideo",
433
459
  type: "file",
434
460
  accept: "video/*",
435
- className: d,
461
+ className: m,
436
462
  onChange: (e) => G(e.target.files?.[0] ?? null)
437
- }), W && /* @__PURE__ */ C("p", {
463
+ }), W && /* @__PURE__ */ S("p", {
438
464
  className: "mt-1 inline-flex items-center gap-1 text-xs text-text-secondary",
439
465
  children: [
440
- /* @__PURE__ */ S(y, { className: "h-3.5 w-3.5" }),
466
+ /* @__PURE__ */ x(se, { className: "h-3.5 w-3.5" }),
441
467
  " ",
442
468
  W.name
443
469
  ]
444
470
  })]
445
471
  }),
446
- J && /* @__PURE__ */ S("p", {
472
+ J && /* @__PURE__ */ x("p", {
447
473
  className: "text-sm text-status-error-text",
448
474
  children: J
449
475
  }),
450
- /* @__PURE__ */ C(O, { children: [/* @__PURE__ */ S("button", {
476
+ /* @__PURE__ */ S(D, { children: [/* @__PURE__ */ x("button", {
451
477
  type: "button",
452
478
  onClick: () => {
453
479
  V(!1), G(null);
454
480
  },
455
481
  className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
456
- children: "Cancel"
457
- }), /* @__PURE__ */ C("button", {
482
+ children: N("common.cancel", "Cancel")
483
+ }), /* @__PURE__ */ S("button", {
458
484
  type: "submit",
459
485
  disabled: z.isPending || K,
460
486
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
461
- children: [(z.isPending || K) && /* @__PURE__ */ S(b, { className: "h-4 w-4 animate-spin" }), K ? "Uploading video…" : "Add drill"]
487
+ children: [(z.isPending || K) && /* @__PURE__ */ x(v, { className: "h-4 w-4 animate-spin" }), K ? N("atheletebridge.pages.programDetail.uploadingVideo", "Uploading video…") : N("atheletebridge.pages.programDetail.addDrill", "Add drill")]
462
488
  })] })
463
489
  ]
464
490
  })] })
@@ -467,6 +493,6 @@ function P() {
467
493
  });
468
494
  }
469
495
  //#endregion
470
- export { P as ProgramDetailPage };
496
+ export { N as ProgramDetailPage };
471
497
 
472
498
  //# sourceMappingURL=ProgramDetailPage.js.map