@burdenoff/microfe-atheletebridge 2026.1109.1 → 2026.1110.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 (43) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoutes.js +45 -21
  2. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  3. package/dist/atheletebridge/components/MemberCard.d.ts +7 -0
  4. package/dist/atheletebridge/components/MemberCard.js +45 -0
  5. package/dist/atheletebridge/components/MemberCard.js.map +1 -0
  6. package/dist/atheletebridge/components/StatusBadge.js +8 -0
  7. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  8. package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts +15 -1
  9. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +63 -41
  10. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  11. package/dist/atheletebridge/hooks/useAuditApi.d.ts +14 -0
  12. package/dist/atheletebridge/hooks/useAuditApi.js +38 -0
  13. package/dist/atheletebridge/hooks/useAuditApi.js.map +1 -0
  14. package/dist/atheletebridge/hooks/useRegistrationApi.d.ts +15 -0
  15. package/dist/atheletebridge/hooks/useRegistrationApi.js +38 -19
  16. package/dist/atheletebridge/hooks/useRegistrationApi.js.map +1 -1
  17. package/dist/atheletebridge/pages/audit/AuditLogPage.d.ts +11 -0
  18. package/dist/atheletebridge/pages/audit/AuditLogPage.js +277 -0
  19. package/dist/atheletebridge/pages/audit/AuditLogPage.js.map +1 -0
  20. package/dist/atheletebridge/pages/control/ClubControlPage.d.ts +11 -0
  21. package/dist/atheletebridge/pages/control/ClubControlPage.js +208 -0
  22. package/dist/atheletebridge/pages/control/ClubControlPage.js.map +1 -0
  23. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +126 -65
  24. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
  25. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +366 -196
  26. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
  27. package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js +243 -217
  28. package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js.map +1 -1
  29. package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js +136 -83
  30. package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js.map +1 -1
  31. package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js +173 -146
  32. package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js.map +1 -1
  33. package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.d.ts +11 -0
  34. package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.js +259 -0
  35. package/dist/atheletebridge/pages/sessions/SessionsCalendarPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +59 -47
  37. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
  38. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +110 -83
  39. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
  40. package/dist/atheletebridge/types/audit.d.ts +47 -0
  41. package/dist/atheletebridge/types/index.d.ts +25 -0
  42. package/dist/atheletebridge/types/registration.d.ts +22 -1
  43. package/package.json +1 -1
@@ -2,20 +2,21 @@ import { SubjectDecisions as e } from "../../components/ai/SubjectDecisions.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { StatusBadge as n } from "../../components/StatusBadge.js";
4
4
  import { EmptyState as ee } from "../../components/EmptyState.js";
5
- import { ErrorState as te, LoadingState as r } from "../../components/LoadingState.js";
6
- import { FormField as i, fieldInputClass as a } from "../../components/form.js";
7
- import { DrillVideoLink as o } from "../../components/DrillVideoLink.js";
8
- import { PROGRAM_LEVEL_LABELS as s, SPORT_ICONS as c, SPORT_LABELS as l } from "../../components/domain.js";
9
- import { useAthleteBridge as u } from "../../context/AthleteBridgeContext.js";
10
- import { useAddDrill as ne, useArchiveProgram as re, useProgram as ie, useRemoveDrill as ae, useTransitionProgram as oe, useUploadFile as d } from "../../hooks/useAthleteBridgeApi.js";
11
- import { useAbTranslate as se } from "../../i18n.js";
12
- import { useMemo as f, useState as p } from "react";
13
- import { Archive as m, ArrowLeft as ce, Copy as h, Edit as g, FileVideo as _, Loader2 as v, Plus as y, Send as b, Trash2 as le, Undo2 as ue } from "lucide-react";
14
- import { useParams as de } from "react-router";
15
- import { Fragment as fe, jsx as x, jsxs as S } from "react/jsx-runtime";
16
- import { Accordion as pe, AccordionContent as me, AccordionItem as he, AccordionTrigger as ge, 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";
5
+ import { ErrorState as te, LoadingState as ne } from "../../components/LoadingState.js";
6
+ import { FormField as r, fieldInputClass as i } from "../../components/form.js";
7
+ import { DrillVideoLink as re } from "../../components/DrillVideoLink.js";
8
+ import { PROGRAM_LEVEL_LABELS as a, SPORT_ICONS as ie, SPORT_LABELS as o } from "../../components/domain.js";
9
+ import { useAthleteBridge as ae } from "../../context/AthleteBridgeContext.js";
10
+ import { useAddDrill as oe, useArchiveProgram as se, useAssignProgram as ce, useProgram as le, useRemoveDrill as ue, useTeam as de, useTeams as fe, useTransitionProgram as pe, useUploadFile as me, useUserDirectory as he } from "../../hooks/useAthleteBridgeApi.js";
11
+ import { UserSearchSelect as ge } from "../../components/UserSearchSelect.js";
12
+ import { useAbTranslate as _e } from "../../i18n.js";
13
+ import { useMemo as ve, useState as s } from "react";
14
+ import { Archive as c, ArrowLeft as ye, Copy as be, Edit as xe, FileVideo as Se, Loader2 as l, Plus as u, Send as Ce, Trash2 as we, Undo2 as Te, UserCheck as Ee } from "lucide-react";
15
+ import { useParams as De } from "react-router";
16
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
17
+ import { Accordion as Oe, AccordionContent as ke, AccordionItem as Ae, AccordionTrigger as je, Badge as m, GlassCard as h, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogFooter as v, ResponsiveDialogHeader as Me, ResponsiveDialogTitle as y } from "@burdenoff/fe-libs/ui";
17
18
  // src/atheletebridge/pages/programs/ProgramDetailPage.tsx
18
- var A = {
19
+ var b = {
19
20
  name: "",
20
21
  description: "",
21
22
  weekNumber: "1",
@@ -23,18 +24,21 @@ var A = {
23
24
  reps: "",
24
25
  durationSec: "",
25
26
  restSec: ""
26
- }, j = ({ children: e }) => /* @__PURE__ */ x("span", {
27
+ }, x = ({ children: e }) => /* @__PURE__ */ f("span", {
27
28
  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",
28
29
  children: e
29
- }), M = (e) => {
30
+ }), S = (e) => {
30
31
  let t = e.trim();
31
32
  if (!t) return;
32
33
  let n = Number.parseInt(t, 10);
33
34
  return Number.isNaN(n) ? void 0 : n;
34
35
  };
35
- function N() {
36
- let N = se(), { id: P } = de(), { navigateTo: F } = u(), I = ie(P), L = oe(), R = re(), z = ne(), B = ae(P), _e = d(), [ve, V] = p(!1), [H, U] = p(A), [W, G] = p(null), [K, q] = p(!1), [J, Y] = p(null), X = f(() => {
37
- let e = I.data?.drills?.items ?? [], t = /* @__PURE__ */ new Map();
36
+ function C() {
37
+ let C = _e(), { id: w } = De(), { navigateTo: T } = ae(), E = le(w), D = pe(), O = se(), k = ce(), A = oe(), j = ue(w), Ne = me(), Pe = fe(), Fe = de(E.data?.assignedTeamId ?? void 0), M = he([E.data?.assignedAthleteId, E.data?.coachId]), [Ie, N] = s(!1), [P, F] = s(b), [I, L] = s(null), [R, z] = s(!1), [B, V] = s(null), [Le, H] = s(!1), [U, W] = s("none"), [G, K] = s({
38
+ userId: "",
39
+ displayName: ""
40
+ }), [q, J] = s(""), [Y, X] = s(null), Re = ve(() => {
41
+ let e = E.data?.drills?.items ?? [], t = /* @__PURE__ */ new Map();
38
42
  for (let n of e) {
39
43
  let e = t.get(n.weekNumber) ?? [];
40
44
  e.push(n), t.set(n.weekNumber, e);
@@ -43,100 +47,100 @@ function N() {
43
47
  week: e,
44
48
  drills: [...t].sort((e, t) => e.orderIndex - t.orderIndex)
45
49
  }));
46
- }, [I.data]);
47
- if (I.isLoading) return /* @__PURE__ */ x(t, {
48
- title: N("atheletebridge.pages.programDetail.title", "Program"),
49
- children: /* @__PURE__ */ x(r, { label: N("atheletebridge.pages.programDetail.loading", "Loading program…") })
50
+ }, [E.data]);
51
+ if (E.isLoading) return /* @__PURE__ */ f(t, {
52
+ title: C("atheletebridge.pages.programDetail.title", "Program"),
53
+ children: /* @__PURE__ */ f(ne, { label: C("atheletebridge.pages.programDetail.loading", "Loading program…") })
50
54
  });
51
- if (I.isError || !I.data) return /* @__PURE__ */ x(t, {
52
- title: N("atheletebridge.pages.programDetail.title", "Program"),
53
- children: /* @__PURE__ */ x(te, {
54
- title: N("atheletebridge.pages.programDetail.notFoundTitle", "Program not found"),
55
- message: N("atheletebridge.pages.programDetail.notFoundMessage", "This program does not exist or you do not have access to it."),
56
- onRetry: () => F("/programs")
55
+ if (E.isError || !E.data) return /* @__PURE__ */ f(t, {
56
+ title: C("atheletebridge.pages.programDetail.title", "Program"),
57
+ children: /* @__PURE__ */ f(te, {
58
+ title: C("atheletebridge.pages.programDetail.notFoundTitle", "Program not found"),
59
+ message: C("atheletebridge.pages.programDetail.notFoundMessage", "This program does not exist or you do not have access to it."),
60
+ onRetry: () => T("/programs")
57
61
  })
58
62
  });
59
- let Z = I.data, Q = Z.drills?.items.length ?? 0, ye = c[Z.sport], be = X.map(({ week: e }) => `week-${e}`), $ = (e) => {
60
- P && L.mutate({
61
- id: P,
63
+ let Z = E.data, Q = Z.drills?.items.length ?? 0, ze = ie[Z.sport], Be = Re.map(({ week: e }) => `week-${e}`), $ = (e) => {
64
+ w && D.mutate({
65
+ id: w,
62
66
  status: e
63
67
  });
64
68
  };
65
- return /* @__PURE__ */ S(t, {
69
+ return /* @__PURE__ */ p(t, {
66
70
  title: Z.name,
67
71
  gradientTitle: !0,
68
- description: `${l[Z.sport]} · ${s[Z.level]} · ${Z.weeks} ${Z.weeks === 1 ? "week" : "weeks"}`,
69
- actions: /* @__PURE__ */ S("div", {
72
+ description: `${o[Z.sport]} · ${a[Z.level]} · ${Z.weeks} ${Z.weeks === 1 ? "week" : "weeks"}`,
73
+ actions: /* @__PURE__ */ p("div", {
70
74
  className: "flex flex-wrap items-center gap-2",
71
75
  children: [
72
- /* @__PURE__ */ S("button", {
76
+ /* @__PURE__ */ p("button", {
73
77
  type: "button",
74
- onClick: () => F("/programs"),
78
+ onClick: () => T("/programs"),
75
79
  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",
76
80
  children: [
77
- /* @__PURE__ */ x(ce, { className: "h-4 w-4" }),
81
+ /* @__PURE__ */ f(ye, { className: "h-4 w-4" }),
78
82
  " ",
79
- N("atheletebridge.pages.programDetail.back", "Back")
83
+ C("atheletebridge.pages.programDetail.back", "Back")
80
84
  ]
81
85
  }),
82
- /* @__PURE__ */ S("button", {
86
+ /* @__PURE__ */ p("button", {
83
87
  type: "button",
84
- onClick: () => F(`/programs/${Z.id}/edit`),
88
+ onClick: () => T(`/programs/${Z.id}/edit`),
85
89
  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",
86
90
  children: [
87
- /* @__PURE__ */ x(g, { className: "h-4 w-4" }),
91
+ /* @__PURE__ */ f(xe, { className: "h-4 w-4" }),
88
92
  " ",
89
- N("atheletebridge.pages.programDetail.edit", "Edit")
93
+ C("atheletebridge.pages.programDetail.edit", "Edit")
90
94
  ]
91
95
  }),
92
- Z.status !== "ARCHIVED" && /* @__PURE__ */ S("button", {
96
+ Z.status !== "ARCHIVED" && /* @__PURE__ */ p("button", {
93
97
  type: "button",
94
98
  onClick: async () => {
95
- P && (await R.mutateAsync(P), F("/programs"));
99
+ w && (await O.mutateAsync(w), T("/programs"));
96
100
  },
97
- disabled: R.isPending,
101
+ disabled: O.isPending,
98
102
  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",
99
103
  children: [
100
- R.isPending ? /* @__PURE__ */ x(v, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ x(m, { className: "h-4 w-4" }),
104
+ O.isPending ? /* @__PURE__ */ f(l, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(c, { className: "h-4 w-4" }),
101
105
  " ",
102
- N("atheletebridge.pages.programDetail.archive", "Archive")
106
+ C("atheletebridge.pages.programDetail.archive", "Archive")
103
107
  ]
104
108
  })
105
109
  ]
106
110
  }),
107
111
  children: [
108
- /* @__PURE__ */ S(w, {
112
+ /* @__PURE__ */ p(h, {
109
113
  treatment: "insight",
110
114
  className: "mb-8 p-6",
111
115
  children: [
112
- /* @__PURE__ */ S("div", {
116
+ /* @__PURE__ */ p("div", {
113
117
  className: "flex items-start gap-4",
114
- children: [/* @__PURE__ */ x("div", {
118
+ children: [/* @__PURE__ */ f("div", {
115
119
  className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-[var(--color-accent-soft)] text-text-primary",
116
- children: /* @__PURE__ */ x(ye, {
120
+ children: /* @__PURE__ */ f(ze, {
117
121
  className: "h-7 w-7",
118
122
  "aria-hidden": "true"
119
123
  })
120
- }), /* @__PURE__ */ S("div", {
124
+ }), /* @__PURE__ */ p("div", {
121
125
  className: "min-w-0 flex-1",
122
- children: [/* @__PURE__ */ S("div", {
126
+ children: [/* @__PURE__ */ p("div", {
123
127
  className: "flex flex-wrap items-center gap-2",
124
128
  children: [
125
- /* @__PURE__ */ x(C, {
129
+ /* @__PURE__ */ f(m, {
126
130
  variant: "secondary",
127
- children: l[Z.sport]
131
+ children: o[Z.sport]
128
132
  }),
129
- /* @__PURE__ */ x(C, {
133
+ /* @__PURE__ */ f(m, {
130
134
  variant: "secondary",
131
- children: s[Z.level]
135
+ children: a[Z.level]
132
136
  }),
133
- /* @__PURE__ */ x(n, { status: Z.status }),
134
- Z.isTemplate && /* @__PURE__ */ S("span", {
137
+ /* @__PURE__ */ f(n, { status: Z.status }),
138
+ Z.isTemplate && /* @__PURE__ */ p("span", {
135
139
  className: "inline-flex items-center gap-1 text-xs text-text-secondary",
136
- children: [/* @__PURE__ */ x(h, { className: "h-3.5 w-3.5" }), " Template"]
140
+ children: [/* @__PURE__ */ f(be, { className: "h-3.5 w-3.5" }), " Template"]
137
141
  })
138
142
  ]
139
- }), /* @__PURE__ */ S("p", {
143
+ }), /* @__PURE__ */ p("p", {
140
144
  className: "mt-2 text-sm text-text-secondary",
141
145
  children: [
142
146
  Z.weeks,
@@ -150,110 +154,197 @@ function N() {
150
154
  })]
151
155
  })]
152
156
  }),
153
- Z.summary && /* @__PURE__ */ x("p", {
157
+ Z.summary && /* @__PURE__ */ f("p", {
154
158
  className: "mt-4 text-sm text-text-secondary",
155
159
  children: Z.summary
156
160
  }),
157
- Z.tags.length > 0 && /* @__PURE__ */ x("div", {
161
+ Z.tags.length > 0 && /* @__PURE__ */ f("div", {
158
162
  className: "mt-4 flex flex-wrap gap-1.5",
159
- children: Z.tags.map((e) => /* @__PURE__ */ x("span", {
163
+ children: Z.tags.map((e) => /* @__PURE__ */ f("span", {
160
164
  className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
161
165
  children: e
162
166
  }, e))
163
167
  }),
164
- /* @__PURE__ */ S("div", {
168
+ /* @__PURE__ */ p("div", {
165
169
  className: "mt-5 flex flex-wrap items-center gap-2 border-t border-border-seam pt-5",
166
170
  children: [
167
- /* @__PURE__ */ x("span", {
171
+ /* @__PURE__ */ f("span", {
168
172
  className: "text-sm font-medium text-text-primary",
169
- children: N("atheletebridge.pages.programDetail.lifecycle", "Publish lifecycle:")
173
+ children: C("atheletebridge.pages.programDetail.lifecycle", "Publish lifecycle:")
170
174
  }),
171
- Z.status === "DRAFT" && /* @__PURE__ */ S("button", {
175
+ Z.status === "DRAFT" && /* @__PURE__ */ p("button", {
172
176
  type: "button",
173
177
  onClick: () => $("PUBLISHED"),
174
- disabled: L.isPending,
178
+ disabled: D.isPending,
175
179
  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",
176
180
  children: [
177
- /* @__PURE__ */ x(b, { className: "h-4 w-4" }),
181
+ /* @__PURE__ */ f(Ce, { className: "h-4 w-4" }),
178
182
  " ",
179
- N("atheletebridge.pages.programDetail.publish", "Publish")
183
+ C("atheletebridge.pages.programDetail.publish", "Publish")
180
184
  ]
181
185
  }),
182
- Z.status === "PUBLISHED" && /* @__PURE__ */ S(fe, { children: [/* @__PURE__ */ S("button", {
186
+ Z.status === "PUBLISHED" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("button", {
183
187
  type: "button",
184
188
  onClick: () => $("DRAFT"),
185
- disabled: L.isPending,
189
+ disabled: D.isPending,
186
190
  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",
187
191
  children: [
188
- /* @__PURE__ */ x(ue, { className: "h-4 w-4" }),
192
+ /* @__PURE__ */ f(Te, { className: "h-4 w-4" }),
189
193
  " ",
190
- N("atheletebridge.pages.programDetail.pullBackToDraft", "Pull back to draft")
194
+ C("atheletebridge.pages.programDetail.pullBackToDraft", "Pull back to draft")
191
195
  ]
192
- }), /* @__PURE__ */ S("button", {
196
+ }), /* @__PURE__ */ p("button", {
193
197
  type: "button",
194
198
  onClick: () => $("ARCHIVED"),
195
- disabled: L.isPending,
199
+ disabled: D.isPending,
196
200
  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",
197
201
  children: [
198
- /* @__PURE__ */ x(m, { className: "h-4 w-4" }),
202
+ /* @__PURE__ */ f(c, { className: "h-4 w-4" }),
199
203
  " ",
200
- N("atheletebridge.pages.programDetail.archiveAction", "Archive")
204
+ C("atheletebridge.pages.programDetail.archiveAction", "Archive")
201
205
  ]
202
206
  })] }),
203
- Z.status === "ARCHIVED" && /* @__PURE__ */ x("span", {
207
+ Z.status === "ARCHIVED" && /* @__PURE__ */ f("span", {
204
208
  className: "text-sm text-text-secondary",
205
- children: N("atheletebridge.pages.programDetail.archived", "This program is archived.")
209
+ children: C("atheletebridge.pages.programDetail.archived", "This program is archived.")
206
210
  }),
207
- L.isPending && /* @__PURE__ */ x(v, { className: "h-4 w-4 animate-spin text-text-secondary" })
211
+ D.isPending && /* @__PURE__ */ f(l, { className: "h-4 w-4 animate-spin text-text-secondary" })
208
212
  ]
209
213
  })
210
214
  ]
211
215
  }),
212
- /* @__PURE__ */ S("section", { children: [/* @__PURE__ */ S("div", {
216
+ /* @__PURE__ */ f(h, {
217
+ treatment: "insight",
218
+ className: "mb-8 p-6",
219
+ children: /* @__PURE__ */ p("div", {
220
+ className: "flex flex-wrap items-start justify-between gap-4",
221
+ children: [/* @__PURE__ */ p("div", {
222
+ className: "min-w-0 flex-1",
223
+ children: [
224
+ /* @__PURE__ */ f("h2", {
225
+ className: "text-sm font-semibold text-text-primary",
226
+ children: C("atheletebridge.pages.programDetail.assignmentTitle", "Assignment")
227
+ }),
228
+ /* @__PURE__ */ f("p", {
229
+ className: "mt-1 text-sm text-text-secondary",
230
+ children: Z.assignedTeamId ? /* @__PURE__ */ p(d, { children: [
231
+ C("atheletebridge.pages.programDetail.assignedToTeam", "Assigned to team"),
232
+ " ",
233
+ /* @__PURE__ */ f("button", {
234
+ type: "button",
235
+ onClick: () => T(`/teams/${Z.assignedTeamId}`),
236
+ className: "font-medium text-text-link hover:underline",
237
+ children: Fe.data?.name ?? Z.assignedTeamId
238
+ })
239
+ ] }) : Z.assignedAthleteId ? /* @__PURE__ */ p(d, { children: [
240
+ C("atheletebridge.pages.programDetail.assignedToAthlete", "Assigned to"),
241
+ " ",
242
+ /* @__PURE__ */ f("span", {
243
+ className: "font-medium text-text-primary",
244
+ children: M.nameOf(Z.assignedAthleteId) ?? Z.assignedAthleteId
245
+ })
246
+ ] }) : C("atheletebridge.pages.programDetail.unassigned", "Not assigned yet — assign it to a team or an athlete to track adherence.")
247
+ }),
248
+ Z.adherence && /* @__PURE__ */ p("div", {
249
+ className: "mt-4",
250
+ children: [
251
+ /* @__PURE__ */ p("div", {
252
+ className: "flex flex-wrap items-center justify-between gap-2",
253
+ children: [/* @__PURE__ */ f("span", {
254
+ className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
255
+ children: C("atheletebridge.pages.programDetail.adherenceTitle", "Adherence")
256
+ }), /* @__PURE__ */ f("span", {
257
+ className: "text-sm font-semibold tabular-nums text-text-primary",
258
+ children: C("atheletebridge.pages.programDetail.adherencePct", "{pct}%").replace("{pct}", String(Z.adherence.adherencePct))
259
+ })]
260
+ }),
261
+ /* @__PURE__ */ f("div", {
262
+ role: "progressbar",
263
+ "aria-valuenow": Z.adherence.adherencePct,
264
+ "aria-valuemin": 0,
265
+ "aria-valuemax": 100,
266
+ className: "mt-2 h-2 overflow-hidden rounded-full bg-bg-sunken",
267
+ children: /* @__PURE__ */ f("div", {
268
+ className: "h-full rounded-full bg-action-primary-bg transition-[width]",
269
+ style: { width: `${Z.adherence.adherencePct}%` }
270
+ })
271
+ }),
272
+ /* @__PURE__ */ f("p", {
273
+ className: "mt-2 text-xs text-text-secondary",
274
+ children: C("atheletebridge.pages.programDetail.adherenceSummary", "{completed} of {planned} planned drills completed · {skipped} skipped · {logged} workouts logged").replace("{completed}", String(Z.adherence.completedWorkouts)).replace("{planned}", String(Z.adherence.plannedDrills)).replace("{skipped}", String(Z.adherence.skippedWorkouts)).replace("{logged}", String(Z.adherence.loggedWorkouts))
275
+ })
276
+ ]
277
+ })
278
+ ]
279
+ }), /* @__PURE__ */ p("button", {
280
+ type: "button",
281
+ onClick: () => {
282
+ X(null), E.data?.assignedTeamId ? (W("team"), J(E.data.assignedTeamId), K({
283
+ userId: "",
284
+ displayName: ""
285
+ })) : E.data?.assignedAthleteId ? (W("athlete"), K({
286
+ userId: E.data.assignedAthleteId,
287
+ displayName: M.nameOf(E.data.assignedAthleteId) ?? ""
288
+ }), J("")) : (W("none"), K({
289
+ userId: "",
290
+ displayName: ""
291
+ }), J("")), H(!0);
292
+ },
293
+ disabled: Z.status === "ARCHIVED",
294
+ 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",
295
+ children: [
296
+ /* @__PURE__ */ f(Ee, { className: "h-4 w-4" }),
297
+ " ",
298
+ C("atheletebridge.pages.programDetail.assignAction", "Assign")
299
+ ]
300
+ })]
301
+ })
302
+ }),
303
+ /* @__PURE__ */ p("section", { children: [/* @__PURE__ */ p("div", {
213
304
  className: "mb-4 flex items-center justify-between",
214
- children: [/* @__PURE__ */ S("h2", {
305
+ children: [/* @__PURE__ */ p("h2", {
215
306
  className: "text-lg font-semibold text-text-primary",
216
307
  children: [
217
- N("atheletebridge.pages.programDetail.drillsTitle", "Drills"),
308
+ C("atheletebridge.pages.programDetail.drillsTitle", "Drills"),
218
309
  " (",
219
310
  Q,
220
311
  ")"
221
312
  ]
222
- }), /* @__PURE__ */ S("button", {
313
+ }), /* @__PURE__ */ p("button", {
223
314
  type: "button",
224
315
  onClick: () => {
225
- Y(null), V(!0);
316
+ V(null), N(!0);
226
317
  },
227
318
  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",
228
319
  children: [
229
- /* @__PURE__ */ x(y, { className: "h-4 w-4" }),
320
+ /* @__PURE__ */ f(u, { className: "h-4 w-4" }),
230
321
  " ",
231
- N("atheletebridge.pages.programDetail.addDrill", "Add drill")
322
+ C("atheletebridge.pages.programDetail.addDrill", "Add drill")
232
323
  ]
233
324
  })]
234
- }), Q === 0 ? /* @__PURE__ */ x(ee, {
325
+ }), Q === 0 ? /* @__PURE__ */ f(ee, {
235
326
  illustration: "empty-data",
236
- icon: /* @__PURE__ */ x(y, { className: "h-10 w-10" }),
237
- title: N("atheletebridge.pages.programDetail.noDrillsTitle", "No drills yet"),
238
- description: N("atheletebridge.pages.programDetail.noDrillsHint", "Add drills with sets, reps and durations, organized by week.")
239
- }) : /* @__PURE__ */ x(pe, {
327
+ icon: /* @__PURE__ */ f(u, { className: "h-10 w-10" }),
328
+ title: C("atheletebridge.pages.programDetail.noDrillsTitle", "No drills yet"),
329
+ description: C("atheletebridge.pages.programDetail.noDrillsHint", "Add drills with sets, reps and durations, organized by week.")
330
+ }) : /* @__PURE__ */ f(Oe, {
240
331
  type: "multiple",
241
- defaultValue: be,
332
+ defaultValue: Be,
242
333
  className: "flex flex-col gap-3",
243
- children: X.map(({ week: e, drills: t }) => /* @__PURE__ */ x(w, {
334
+ children: Re.map(({ week: e, drills: t }) => /* @__PURE__ */ f(h, {
244
335
  treatment: "insight",
245
336
  className: "overflow-hidden px-4 py-0",
246
- children: /* @__PURE__ */ S(he, {
337
+ children: /* @__PURE__ */ p(Ae, {
247
338
  value: `week-${e}`,
248
339
  className: "border-b-0",
249
- children: [/* @__PURE__ */ x(ge, {
340
+ children: [/* @__PURE__ */ f(je, {
250
341
  className: "py-4",
251
- children: /* @__PURE__ */ S("span", {
342
+ children: /* @__PURE__ */ p("span", {
252
343
  className: "flex items-center gap-2.5",
253
- children: [/* @__PURE__ */ S("span", {
344
+ children: [/* @__PURE__ */ p("span", {
254
345
  className: "text-sm font-semibold text-text-primary",
255
346
  children: ["Week ", e]
256
- }), /* @__PURE__ */ S(C, {
347
+ }), /* @__PURE__ */ p(m, {
257
348
  variant: "secondary",
258
349
  children: [
259
350
  t.length,
@@ -262,41 +353,41 @@ function N() {
262
353
  ]
263
354
  })]
264
355
  })
265
- }), /* @__PURE__ */ x(me, {
356
+ }), /* @__PURE__ */ f(ke, {
266
357
  className: "pb-2",
267
- children: /* @__PURE__ */ x("div", {
358
+ children: /* @__PURE__ */ f("div", {
268
359
  className: "divide-y divide-border-seam",
269
- children: t.map((e) => /* @__PURE__ */ S("div", {
360
+ children: t.map((e) => /* @__PURE__ */ p("div", {
270
361
  className: "flex items-start gap-4 py-3",
271
- children: [/* @__PURE__ */ S("div", {
362
+ children: [/* @__PURE__ */ p("div", {
272
363
  className: "min-w-0 flex-1",
273
364
  children: [
274
- /* @__PURE__ */ x("p", {
365
+ /* @__PURE__ */ f("p", {
275
366
  className: "text-sm font-medium text-text-primary",
276
367
  children: e.name
277
368
  }),
278
- e.description && /* @__PURE__ */ x("p", {
369
+ e.description && /* @__PURE__ */ f("p", {
279
370
  className: "mt-0.5 text-xs text-text-secondary",
280
371
  children: e.description
281
372
  }),
282
- /* @__PURE__ */ S("div", {
373
+ /* @__PURE__ */ p("div", {
283
374
  className: "mt-2 flex flex-wrap gap-1.5",
284
375
  children: [
285
- e.sets !== null && /* @__PURE__ */ S(j, { children: [e.sets, " sets"] }),
286
- e.reps !== null && /* @__PURE__ */ S(j, { children: [e.reps, " reps"] }),
287
- e.durationSec !== null && /* @__PURE__ */ S(j, { children: [e.durationSec, "s work"] }),
288
- e.restSec !== null && /* @__PURE__ */ S(j, { children: [e.restSec, "s rest"] })
376
+ e.sets !== null && /* @__PURE__ */ p(x, { children: [e.sets, " sets"] }),
377
+ e.reps !== null && /* @__PURE__ */ p(x, { children: [e.reps, " reps"] }),
378
+ e.durationSec !== null && /* @__PURE__ */ p(x, { children: [e.durationSec, "s work"] }),
379
+ e.restSec !== null && /* @__PURE__ */ p(x, { children: [e.restSec, "s rest"] })
289
380
  ]
290
381
  }),
291
- e.video?.id && /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(o, { fileId: e.video.id }) })
382
+ e.video?.id && /* @__PURE__ */ f("div", { children: /* @__PURE__ */ f(re, { fileId: e.video.id }) })
292
383
  ]
293
- }), /* @__PURE__ */ x("button", {
384
+ }), /* @__PURE__ */ f("button", {
294
385
  type: "button",
295
- onClick: () => void B.mutate(e.id),
296
- disabled: B.isPending,
297
- "aria-label": `${N("common.delete", "Delete")} ${e.name}`,
386
+ onClick: () => void j.mutate(e.id),
387
+ disabled: j.isPending,
388
+ "aria-label": `${C("common.delete", "Delete")} ${e.name}`,
298
389
  className: "rounded-lg p-2 text-text-secondary transition-colors hover:bg-status-error-bg-subtle hover:text-status-error-text disabled:opacity-60",
299
- children: /* @__PURE__ */ x(le, { className: "h-4 w-4" })
390
+ children: /* @__PURE__ */ f(we, { className: "h-4 w-4" })
300
391
  })]
301
392
  }, e.id))
302
393
  })
@@ -304,123 +395,202 @@ function N() {
304
395
  })
305
396
  }, e))
306
397
  })] }),
307
- /* @__PURE__ */ x(e, {
398
+ /* @__PURE__ */ f(e, {
308
399
  className: "mt-8",
309
400
  subject: {
310
401
  kind: "program",
311
402
  programId: Z.id
312
403
  }
313
404
  }),
314
- /* @__PURE__ */ x(T, {
315
- open: ve,
316
- onOpenChange: V,
317
- children: /* @__PURE__ */ S(E, { children: [/* @__PURE__ */ x(O, { children: /* @__PURE__ */ x(k, { children: N("atheletebridge.pages.programDetail.addDrill", "Add drill") }) }), /* @__PURE__ */ S("form", {
405
+ /* @__PURE__ */ f(g, {
406
+ open: Le,
407
+ onOpenChange: H,
408
+ children: /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ f(Me, { children: /* @__PURE__ */ f(y, { children: C("atheletebridge.pages.programDetail.assignTitle", "Assign program") }) }), /* @__PURE__ */ p("form", {
409
+ onSubmit: async (e) => {
410
+ if (e.preventDefault(), X(null), w) {
411
+ if (U === "athlete" && !G.userId.trim()) X(C("atheletebridge.pages.programDetail.assignAthleteRequired", "Pick an athlete."));
412
+ else if (U === "team" && !q) X(C("atheletebridge.pages.programDetail.assignTeamRequired", "Pick a team."));
413
+ else try {
414
+ await k.mutateAsync({
415
+ id: w,
416
+ input: U === "athlete" ? { athleteId: G.userId.trim() } : U === "team" ? { teamId: q } : {}
417
+ }), H(!1);
418
+ } catch (e) {
419
+ X(e instanceof Error ? e.message : "Failed to update the assignment.");
420
+ }
421
+ }
422
+ },
423
+ className: "space-y-4 px-1",
424
+ children: [
425
+ /* @__PURE__ */ f("div", {
426
+ className: "flex flex-wrap gap-2",
427
+ children: [
428
+ ["none", C("atheletebridge.pages.programDetail.assignNone", "Unassigned")],
429
+ ["athlete", C("atheletebridge.pages.programDetail.assignAthlete", "Athlete")],
430
+ ["team", C("atheletebridge.pages.programDetail.assignTeam", "Team")]
431
+ ].map(([e, t]) => /* @__PURE__ */ f("button", {
432
+ type: "button",
433
+ onClick: () => W(e),
434
+ "aria-pressed": U === e,
435
+ className: `rounded-full border px-3 py-1 text-xs font-medium transition-colors ${U === e ? "border-border-strong bg-bg-sunken text-text-primary" : "border-border-seam text-text-secondary hover:bg-bg-sunken"}`,
436
+ children: t
437
+ }, e))
438
+ }),
439
+ U === "athlete" && /* @__PURE__ */ f(ge, {
440
+ userId: G.userId,
441
+ displayName: G.displayName,
442
+ onSelect: ({ userId: e, displayName: t }) => K({
443
+ userId: e,
444
+ displayName: t
445
+ }),
446
+ required: !0
447
+ }),
448
+ U === "team" && /* @__PURE__ */ f(r, {
449
+ label: C("atheletebridge.pages.programDetail.assignTeam", "Team"),
450
+ htmlFor: "assignTeam",
451
+ required: !0,
452
+ children: /* @__PURE__ */ p("select", {
453
+ id: "assignTeam",
454
+ className: i,
455
+ value: q,
456
+ onChange: (e) => J(e.target.value),
457
+ children: [/* @__PURE__ */ f("option", {
458
+ value: "",
459
+ children: C("atheletebridge.pages.programDetail.assignTeamPlaceholder", "Select a team")
460
+ }), (Pe.data?.items ?? []).map((e) => /* @__PURE__ */ f("option", {
461
+ value: e.id,
462
+ children: e.name
463
+ }, e.id))]
464
+ })
465
+ }),
466
+ Y && /* @__PURE__ */ f("p", {
467
+ className: "text-sm text-status-error-text",
468
+ children: Y
469
+ }),
470
+ /* @__PURE__ */ p(v, { children: [/* @__PURE__ */ f("button", {
471
+ type: "button",
472
+ onClick: () => H(!1),
473
+ className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
474
+ children: C("common.cancel", "Cancel")
475
+ }), /* @__PURE__ */ p("button", {
476
+ type: "submit",
477
+ disabled: k.isPending,
478
+ className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
479
+ children: [k.isPending && /* @__PURE__ */ f(l, { className: "h-4 w-4 animate-spin" }), C("common.save", "Save")]
480
+ })] })
481
+ ]
482
+ })] })
483
+ }),
484
+ /* @__PURE__ */ f(g, {
485
+ open: Ie,
486
+ onOpenChange: N,
487
+ children: /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ f(Me, { children: /* @__PURE__ */ f(y, { children: C("atheletebridge.pages.programDetail.addDrill", "Add drill") }) }), /* @__PURE__ */ p("form", {
318
488
  onSubmit: async (e) => {
319
- if (e.preventDefault(), Y(null), !P) return;
320
- if (!H.name.trim()) {
321
- Y("Drill name is required.");
489
+ if (e.preventDefault(), V(null), !w) return;
490
+ if (!P.name.trim()) {
491
+ V("Drill name is required.");
322
492
  return;
323
493
  }
324
- let t = M(H.weekNumber) ?? 1, n;
325
- if (W) {
326
- q(!0);
494
+ let t = S(P.weekNumber) ?? 1, n;
495
+ if (I) {
496
+ z(!0);
327
497
  try {
328
- n = await _e(W);
498
+ n = await Ne(I);
329
499
  } catch (e) {
330
- Y(e instanceof Error ? e.message : "Failed to upload the demo video."), q(!1);
500
+ V(e instanceof Error ? e.message : "Failed to upload the demo video."), z(!1);
331
501
  return;
332
502
  }
333
- q(!1);
503
+ z(!1);
334
504
  }
335
505
  try {
336
- await z.mutateAsync({
337
- programId: P,
338
- name: H.name.trim(),
339
- description: H.description.trim() || void 0,
506
+ await A.mutateAsync({
507
+ programId: w,
508
+ name: P.name.trim(),
509
+ description: P.description.trim() || void 0,
340
510
  weekNumber: t,
341
- orderIndex: I.data?.drills?.items.filter((e) => e.weekNumber === t).length ?? 0,
342
- sets: M(H.sets),
343
- reps: M(H.reps),
344
- durationSec: M(H.durationSec),
345
- restSec: M(H.restSec),
511
+ orderIndex: E.data?.drills?.items.filter((e) => e.weekNumber === t).length ?? 0,
512
+ sets: S(P.sets),
513
+ reps: S(P.reps),
514
+ durationSec: S(P.durationSec),
515
+ restSec: S(P.restSec),
346
516
  videoFileId: n
347
- }), U(A), G(null), V(!1);
517
+ }), F(b), L(null), N(!1);
348
518
  } catch (e) {
349
- Y(e instanceof Error ? e.message : "Failed to add drill.");
519
+ V(e instanceof Error ? e.message : "Failed to add drill.");
350
520
  }
351
521
  },
352
522
  className: "space-y-4 px-1",
353
523
  children: [
354
- /* @__PURE__ */ x(i, {
524
+ /* @__PURE__ */ f(r, {
355
525
  label: "Name",
356
526
  htmlFor: "drillName",
357
527
  required: !0,
358
- children: /* @__PURE__ */ x("input", {
528
+ children: /* @__PURE__ */ f("input", {
359
529
  id: "drillName",
360
- className: a,
361
- value: H.name,
362
- onChange: (e) => U((t) => ({
530
+ className: i,
531
+ value: P.name,
532
+ onChange: (e) => F((t) => ({
363
533
  ...t,
364
534
  name: e.target.value
365
535
  })),
366
536
  placeholder: "e.g. Box jumps"
367
537
  })
368
538
  }),
369
- /* @__PURE__ */ x(i, {
539
+ /* @__PURE__ */ f(r, {
370
540
  label: "Description",
371
541
  htmlFor: "drillDesc",
372
- children: /* @__PURE__ */ x("textarea", {
542
+ children: /* @__PURE__ */ f("textarea", {
373
543
  id: "drillDesc",
374
- className: a,
544
+ className: i,
375
545
  rows: 2,
376
- value: H.description,
377
- onChange: (e) => U((t) => ({
546
+ value: P.description,
547
+ onChange: (e) => F((t) => ({
378
548
  ...t,
379
549
  description: e.target.value
380
550
  })),
381
551
  placeholder: "How to perform the drill."
382
552
  })
383
553
  }),
384
- /* @__PURE__ */ S("div", {
554
+ /* @__PURE__ */ p("div", {
385
555
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
386
556
  children: [
387
- /* @__PURE__ */ x(i, {
557
+ /* @__PURE__ */ f(r, {
388
558
  label: "Week",
389
559
  htmlFor: "drillWeek",
390
- children: /* @__PURE__ */ x("input", {
560
+ children: /* @__PURE__ */ f("input", {
391
561
  id: "drillWeek",
392
562
  inputMode: "numeric",
393
- className: a,
394
- value: H.weekNumber,
395
- onChange: (e) => U((t) => ({
563
+ className: i,
564
+ value: P.weekNumber,
565
+ onChange: (e) => F((t) => ({
396
566
  ...t,
397
567
  weekNumber: e.target.value
398
568
  }))
399
569
  })
400
570
  }),
401
- /* @__PURE__ */ x(i, {
571
+ /* @__PURE__ */ f(r, {
402
572
  label: "Sets",
403
573
  htmlFor: "drillSets",
404
- children: /* @__PURE__ */ x("input", {
574
+ children: /* @__PURE__ */ f("input", {
405
575
  id: "drillSets",
406
576
  inputMode: "numeric",
407
- className: a,
408
- value: H.sets,
409
- onChange: (e) => U((t) => ({
577
+ className: i,
578
+ value: P.sets,
579
+ onChange: (e) => F((t) => ({
410
580
  ...t,
411
581
  sets: e.target.value
412
582
  }))
413
583
  })
414
584
  }),
415
- /* @__PURE__ */ x(i, {
585
+ /* @__PURE__ */ f(r, {
416
586
  label: "Reps",
417
587
  htmlFor: "drillReps",
418
- children: /* @__PURE__ */ x("input", {
588
+ children: /* @__PURE__ */ f("input", {
419
589
  id: "drillReps",
420
590
  inputMode: "numeric",
421
- className: a,
422
- value: H.reps,
423
- onChange: (e) => U((t) => ({
591
+ className: i,
592
+ value: P.reps,
593
+ onChange: (e) => F((t) => ({
424
594
  ...t,
425
595
  reps: e.target.value
426
596
  }))
@@ -428,71 +598,71 @@ function N() {
428
598
  })
429
599
  ]
430
600
  }),
431
- /* @__PURE__ */ S("div", {
601
+ /* @__PURE__ */ p("div", {
432
602
  className: "grid grid-cols-2 gap-4",
433
- children: [/* @__PURE__ */ x(i, {
603
+ children: [/* @__PURE__ */ f(r, {
434
604
  label: "Work (sec)",
435
605
  htmlFor: "drillDuration",
436
- children: /* @__PURE__ */ x("input", {
606
+ children: /* @__PURE__ */ f("input", {
437
607
  id: "drillDuration",
438
608
  inputMode: "numeric",
439
- className: a,
440
- value: H.durationSec,
441
- onChange: (e) => U((t) => ({
609
+ className: i,
610
+ value: P.durationSec,
611
+ onChange: (e) => F((t) => ({
442
612
  ...t,
443
613
  durationSec: e.target.value
444
614
  }))
445
615
  })
446
- }), /* @__PURE__ */ x(i, {
616
+ }), /* @__PURE__ */ f(r, {
447
617
  label: "Rest (sec)",
448
618
  htmlFor: "drillRest",
449
- children: /* @__PURE__ */ x("input", {
619
+ children: /* @__PURE__ */ f("input", {
450
620
  id: "drillRest",
451
621
  inputMode: "numeric",
452
- className: a,
453
- value: H.restSec,
454
- onChange: (e) => U((t) => ({
622
+ className: i,
623
+ value: P.restSec,
624
+ onChange: (e) => F((t) => ({
455
625
  ...t,
456
626
  restSec: e.target.value
457
627
  }))
458
628
  })
459
629
  })]
460
630
  }),
461
- /* @__PURE__ */ S(i, {
631
+ /* @__PURE__ */ p(r, {
462
632
  label: "Demo video",
463
633
  htmlFor: "drillVideo",
464
634
  hint: "Optional — attach a short demo clip; it's stored in workspace files.",
465
- children: [/* @__PURE__ */ x("input", {
635
+ children: [/* @__PURE__ */ f("input", {
466
636
  id: "drillVideo",
467
637
  type: "file",
468
638
  accept: "video/*",
469
- className: a,
470
- onChange: (e) => G(e.target.files?.[0] ?? null)
471
- }), W && /* @__PURE__ */ S("p", {
639
+ className: i,
640
+ onChange: (e) => L(e.target.files?.[0] ?? null)
641
+ }), I && /* @__PURE__ */ p("p", {
472
642
  className: "mt-1 inline-flex items-center gap-1 text-xs text-text-secondary",
473
643
  children: [
474
- /* @__PURE__ */ x(_, { className: "h-3.5 w-3.5" }),
644
+ /* @__PURE__ */ f(Se, { className: "h-3.5 w-3.5" }),
475
645
  " ",
476
- W.name
646
+ I.name
477
647
  ]
478
648
  })]
479
649
  }),
480
- J && /* @__PURE__ */ x("p", {
650
+ B && /* @__PURE__ */ f("p", {
481
651
  className: "text-sm text-status-error-text",
482
- children: J
652
+ children: B
483
653
  }),
484
- /* @__PURE__ */ S(D, { children: [/* @__PURE__ */ x("button", {
654
+ /* @__PURE__ */ p(v, { children: [/* @__PURE__ */ f("button", {
485
655
  type: "button",
486
656
  onClick: () => {
487
- V(!1), G(null);
657
+ N(!1), L(null);
488
658
  },
489
659
  className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
490
- children: N("common.cancel", "Cancel")
491
- }), /* @__PURE__ */ S("button", {
660
+ children: C("common.cancel", "Cancel")
661
+ }), /* @__PURE__ */ p("button", {
492
662
  type: "submit",
493
- disabled: z.isPending || K,
663
+ disabled: A.isPending || R,
494
664
  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",
495
- 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")]
665
+ children: [(A.isPending || R) && /* @__PURE__ */ f(l, { className: "h-4 w-4 animate-spin" }), R ? C("atheletebridge.pages.programDetail.uploadingVideo", "Uploading video…") : C("atheletebridge.pages.programDetail.addDrill", "Add drill")]
496
666
  })] })
497
667
  ]
498
668
  })] })
@@ -500,6 +670,6 @@ function N() {
500
670
  ]
501
671
  });
502
672
  }
503
- export { N as ProgramDetailPage };
673
+ export { C as ProgramDetailPage };
504
674
 
505
675
  //# sourceMappingURL=ProgramDetailPage.js.map