@burdenoff/microfe-atheletebridge 2026.1116.1 → 2026.1123.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 (37) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoot.js +71 -55
  2. package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
  3. package/dist/atheletebridge/AthleteBridgeRoutes.js +30 -6
  4. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  5. package/dist/atheletebridge/components/MatchupRow.js +11 -2
  6. package/dist/atheletebridge/components/MatchupRow.js.map +1 -1
  7. package/dist/atheletebridge/components/analytics/AiInsightsPanel.d.ts +5 -0
  8. package/dist/atheletebridge/components/analytics/AiInsightsPanel.js +617 -0
  9. package/dist/atheletebridge/components/analytics/AiInsightsPanel.js.map +1 -0
  10. package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.d.ts +5 -0
  11. package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.js +453 -0
  12. package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.js.map +1 -0
  13. package/dist/atheletebridge/hooks/index.d.ts +2 -0
  14. package/dist/atheletebridge/hooks/index.js +1 -0
  15. package/dist/atheletebridge/hooks/useInsightsWearablesMarketplaceApi.d.ts +62 -0
  16. package/dist/atheletebridge/hooks/useInsightsWearablesMarketplaceApi.js +362 -0
  17. package/dist/atheletebridge/hooks/useInsightsWearablesMarketplaceApi.js.map +1 -0
  18. package/dist/atheletebridge/pages/DashboardPage.js +71 -1
  19. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -1
  20. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.d.ts +3 -1
  21. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js +346 -317
  22. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js.map +1 -1
  23. package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js +171 -159
  24. package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js.map +1 -1
  25. package/dist/atheletebridge/pages/devices/ConnectedDevicesPage.d.ts +1 -0
  26. package/dist/atheletebridge/pages/devices/ConnectedDevicesPage.js +14 -0
  27. package/dist/atheletebridge/pages/devices/ConnectedDevicesPage.js.map +1 -0
  28. package/dist/atheletebridge/pages/marketplace/MarketplacePage.d.ts +1 -0
  29. package/dist/atheletebridge/pages/marketplace/MarketplacePage.js +756 -0
  30. package/dist/atheletebridge/pages/marketplace/MarketplacePage.js.map +1 -0
  31. package/dist/atheletebridge/pages/performance/PerformancePage.js +296 -277
  32. package/dist/atheletebridge/pages/performance/PerformancePage.js.map +1 -1
  33. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +279 -147
  34. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -1
  35. package/dist/atheletebridge/types/index.d.ts +1 -0
  36. package/dist/atheletebridge/types/insights.d.ts +270 -0
  37. package/package.json +1 -1
@@ -5,55 +5,68 @@ import { RatingStars as r } from "../../components/viz/RatingStars.js";
5
5
  import { SessionStatusTimeline as i } from "../../components/SessionStatusTimeline.js";
6
6
  import "../../components/viz/index.js";
7
7
  import { ErrorState as a, LoadingState as o } from "../../components/LoadingState.js";
8
- import { FormField as s, fieldInputClass as ee } from "../../components/form.js";
9
- import { SESSION_TYPE_LABELS as c } from "../../components/domain.js";
10
- import { formatDate as l, formatDuration as u } from "../../utils/formatters.js";
11
- import { safeExternalHref as te } from "../../utils/url.js";
12
- import { useScheduledTimeGate as ne } from "../../hooks/useScheduledTimeGate.js";
13
- import { useAthleteBridge as re } from "../../context/AthleteBridgeContext.js";
14
- import { useCancelSession as d, useCompleteSession as f, useConfirmSession as p, useSession as m, useUserDirectory as h } from "../../hooks/useAthleteBridgeApi.js";
8
+ import { FormField as s, fieldInputClass as c } from "../../components/form.js";
9
+ import { SESSION_TYPE_LABELS as l } from "../../components/domain.js";
10
+ import { formatDate as u, formatDuration as d } from "../../utils/formatters.js";
11
+ import { safeExternalHref as f } from "../../utils/url.js";
12
+ import { useScheduledTimeGate as p } from "../../hooks/useScheduledTimeGate.js";
13
+ import { useAthleteBridge as ee } from "../../context/AthleteBridgeContext.js";
14
+ import { useCancelSession as te, useCompleteSession as ne, useConfirmSession as re, useSession as ie, useUserDirectory as ae } from "../../hooks/useAthleteBridgeApi.js";
15
15
  import "../../hooks/index.js";
16
- import { useAbTranslate as ie } from "../../i18n.js";
17
- import { useMemo as ae, useState as g } from "react";
18
- import { ArrowLeft as _, CalendarClock as v, CheckCircle2 as y, Clock as b, ExternalLink as x, Loader2 as S, Mail as C, MapPin as w, Video as oe, XCircle as se } from "lucide-react";
19
- import { useParams as ce } from "react-router";
20
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
21
- import { EmphasisPanel as le, GlassCard as D, ResponsiveDialog as ue, ResponsiveDialogContent as O, ResponsiveDialogFooter as k, ResponsiveDialogHeader as A, ResponsiveDialogTitle as j } from "@burdenoff/fe-libs/ui";
16
+ import { useAbTranslate as oe } from "../../i18n.js";
17
+ import { useMemo as se, useState as m } from "react";
18
+ import { ArrowLeft as ce, CalendarClock as h, CheckCircle2 as g, Clock as _, ExternalLink as v, Loader2 as y, Mail as b, MapPin as x, ShieldCheck as S, Trophy as le, Video as C, XCircle as w } from "lucide-react";
19
+ import { useParams as T } from "react-router";
20
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
21
+ import { EmphasisPanel as ue, GlassCard as O, ResponsiveDialog as de, ResponsiveDialogContent as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as k, ResponsiveDialogTitle as A } from "@burdenoff/fe-libs/ui";
22
22
  // src/atheletebridge/pages/sessions/SessionDetailPage.tsx
23
- function M({ role: e, name: t, email: r, id: i }) {
24
- let a = t?.trim() || `User ${i.slice(0, 6)}`;
25
- return /* @__PURE__ */ E(D, {
23
+ function j({ role: e, name: t, email: r, id: i, scheduledAt: a, timeZoneLabel: o }) {
24
+ let s = t?.trim() || `User ${i.slice(0, 6)}`;
25
+ return /* @__PURE__ */ D(O, {
26
26
  treatment: "metric",
27
27
  className: "p-4",
28
28
  children: [
29
- /* @__PURE__ */ T("p", {
30
- className: "text-xs font-medium uppercase tracking-wide text-text-muted",
29
+ /* @__PURE__ */ E("p", {
30
+ className: "text-[0.7rem] font-semibold uppercase tracking-wide text-text-muted",
31
31
  children: e
32
32
  }),
33
- /* @__PURE__ */ E("div", {
34
- className: "mt-3 flex items-center gap-3",
35
- children: [/* @__PURE__ */ T(n, {
33
+ /* @__PURE__ */ D("div", {
34
+ className: "mt-2.5 flex items-center gap-2.5 sm:gap-3",
35
+ children: [/* @__PURE__ */ E(n, {
36
36
  name: t,
37
37
  id: i,
38
- size: "lg"
39
- }), /* @__PURE__ */ E("div", {
38
+ size: "md"
39
+ }), /* @__PURE__ */ D("div", {
40
40
  className: "min-w-0",
41
- children: [/* @__PURE__ */ T("p", {
41
+ children: [/* @__PURE__ */ E("p", {
42
42
  className: "truncate text-sm font-semibold text-text-primary",
43
- children: a
44
- }), /* @__PURE__ */ T("p", {
43
+ children: s
44
+ }), o ? /* @__PURE__ */ E("p", {
45
+ className: "mt-0.5 truncate text-[0.68rem] text-[var(--color-accent-teal)]",
46
+ children: o
47
+ }) : /* @__PURE__ */ E("p", {
45
48
  className: "truncate text-xs text-text-secondary",
46
49
  children: e
47
50
  })]
48
51
  })]
49
52
  }),
50
- r ? /* @__PURE__ */ E("a", {
53
+ a ? /* @__PURE__ */ D("p", {
54
+ className: "mt-3 flex items-center gap-1.5 text-xs font-medium tabular-nums text-text-primary",
55
+ children: [/* @__PURE__ */ E(h, {
56
+ className: "h-3.5 w-3.5 shrink-0 text-text-muted",
57
+ "aria-hidden": "true"
58
+ }), /* @__PURE__ */ E("span", {
59
+ className: "truncate",
60
+ children: u(a)
61
+ })]
62
+ }) : null,
63
+ r ? /* @__PURE__ */ D("a", {
51
64
  href: `mailto:${r}`,
52
- className: "mt-3 flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary hover:underline",
53
- children: [/* @__PURE__ */ T(C, {
65
+ className: "mt-2 flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary hover:underline",
66
+ children: [/* @__PURE__ */ E(b, {
54
67
  className: "h-3.5 w-3.5 shrink-0",
55
68
  "aria-hidden": "true"
56
- }), /* @__PURE__ */ T("span", {
69
+ }), /* @__PURE__ */ E("span", {
57
70
  className: "truncate",
58
71
  children: r
59
72
  })]
@@ -61,97 +74,101 @@ function M({ role: e, name: t, email: r, id: i }) {
61
74
  ]
62
75
  });
63
76
  }
64
- function N() {
65
- let n = ie(), { id: C } = ce(), { navigateTo: N } = re(), P = m(C), F = p(), I = f(), L = d(), [R, z] = g(!1), [B, V] = g(""), [H, U] = g(0), [W, G] = g(null), K = ne(P.data?.scheduledAt), de = ae(() => P.data ? [P.data.coachId, P.data.athleteId] : [], [P.data]), q = h(de);
66
- if (P.isLoading) return /* @__PURE__ */ T(e, {
77
+ function M() {
78
+ let n = oe(), { id: b } = T(), { navigateTo: M } = ee(), N = ie(b), P = re(), F = ne(), I = te(), [L, R] = m(!1), [z, B] = m(""), [V, H] = m(0), [U, W] = m(null), G = p(N.data?.scheduledAt), me = se(() => N.data ? [N.data.coachId, N.data.athleteId] : [], [N.data]), K = ae(me);
79
+ if (N.isLoading) return /* @__PURE__ */ E(e, {
67
80
  title: n("atheletebridge.pages.sessionDetail.title", "Session"),
68
- children: /* @__PURE__ */ T(o, { label: n("atheletebridge.pages.sessionDetail.loading", "Loading session…") })
81
+ children: /* @__PURE__ */ E(o, { label: n("atheletebridge.pages.sessionDetail.loading", "Loading session…") })
69
82
  });
70
- if (P.isError || !P.data) return /* @__PURE__ */ T(e, {
83
+ if (N.isError || !N.data) return /* @__PURE__ */ E(e, {
71
84
  title: n("atheletebridge.pages.sessionDetail.title", "Session"),
72
- children: /* @__PURE__ */ T(a, {
85
+ children: /* @__PURE__ */ E(a, {
73
86
  title: n("atheletebridge.pages.sessionDetail.notFoundTitle", "Session not found"),
74
87
  message: n("atheletebridge.pages.sessionDetail.notFoundMessage", "This session does not exist or you do not have access to it."),
75
- onRetry: () => N("/sessions")
88
+ onRetry: () => M("/sessions")
76
89
  })
77
90
  });
78
- let J = P.data, Y = J.status === "REQUESTED", X = J.status === "CONFIRMED", Z = X && K, fe = X && !K, Q = J.status === "REQUESTED" || J.status === "CONFIRMED", $ = te(J.meetingUrl);
79
- return /* @__PURE__ */ E(e, {
80
- title: J.title,
81
- description: c[J.type],
82
- actions: /* @__PURE__ */ E("button", {
91
+ let q = N.data, J = q.status === "REQUESTED", Y = q.status === "CONFIRMED", X = Y && G, he = Y && !G, Z = q.status === "REQUESTED" || q.status === "CONFIRMED", Q = f(q.meetingUrl), $ = Intl.DateTimeFormat().resolvedOptions().timeZone;
92
+ return /* @__PURE__ */ D(e, {
93
+ title: q.title,
94
+ description: l[q.type],
95
+ actions: /* @__PURE__ */ D("button", {
83
96
  type: "button",
84
- onClick: () => N("/sessions"),
97
+ onClick: () => M("/sessions"),
85
98
  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",
86
99
  children: [
87
- /* @__PURE__ */ T(_, { className: "h-4 w-4" }),
100
+ /* @__PURE__ */ E(ce, { className: "h-4 w-4" }),
88
101
  " ",
89
102
  n("atheletebridge.pages.sessionDetail.back", "Back")
90
103
  ]
91
104
  }),
92
105
  children: [
93
- /* @__PURE__ */ E(D, {
106
+ /* @__PURE__ */ D(O, {
94
107
  treatment: "insight",
95
108
  className: "mb-6 p-5 sm:p-6",
96
- children: [/* @__PURE__ */ E("div", {
109
+ children: [/* @__PURE__ */ D("div", {
97
110
  className: "mb-5 flex items-center justify-between gap-3",
98
- children: [/* @__PURE__ */ T("span", {
111
+ children: [/* @__PURE__ */ E("span", {
99
112
  className: "text-xs font-medium uppercase tracking-wide text-text-muted",
100
113
  children: n("atheletebridge.pages.sessionDetail.lifecycle", "Lifecycle")
101
- }), /* @__PURE__ */ T(t, { status: J.status })]
102
- }), /* @__PURE__ */ T(i, {
103
- status: J.status,
104
- createdAt: J.createdAt,
105
- completedAt: J.completedAt
114
+ }), /* @__PURE__ */ E(t, { status: q.status })]
115
+ }), /* @__PURE__ */ E(i, {
116
+ status: q.status,
117
+ createdAt: q.createdAt,
118
+ completedAt: q.completedAt
106
119
  })]
107
120
  }),
108
- /* @__PURE__ */ E("div", {
109
- className: "mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
121
+ /* @__PURE__ */ D("div", {
122
+ className: "mb-6 grid grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-3",
110
123
  children: [
111
- /* @__PURE__ */ T(M, {
112
- role: n("atheletebridge.pages.sessionDetail.coach", "Coach"),
113
- id: J.coachId,
114
- name: q.nameOf(J.coachId),
115
- email: q.emailOf(J.coachId)
124
+ /* @__PURE__ */ E(j, {
125
+ role: n("atheletebridge.pages.sessionDetail.coachTime", "Coach time"),
126
+ id: q.coachId,
127
+ name: K.nameOf(q.coachId),
128
+ email: K.emailOf(q.coachId),
129
+ scheduledAt: q.scheduledAt,
130
+ timeZoneLabel: $
116
131
  }),
117
- /* @__PURE__ */ T(M, {
118
- role: n("atheletebridge.pages.sessionDetail.athlete", "Athlete"),
119
- id: J.athleteId,
120
- name: q.nameOf(J.athleteId),
121
- email: q.emailOf(J.athleteId)
132
+ /* @__PURE__ */ E(j, {
133
+ role: n("atheletebridge.pages.sessionDetail.athleteTime", "Athlete time"),
134
+ id: q.athleteId,
135
+ name: K.nameOf(q.athleteId),
136
+ email: K.emailOf(q.athleteId),
137
+ scheduledAt: q.scheduledAt,
138
+ timeZoneLabel: $
122
139
  }),
123
- /* @__PURE__ */ E(D, {
140
+ /* @__PURE__ */ D(O, {
124
141
  treatment: "metric",
125
- className: "p-4",
126
- children: [/* @__PURE__ */ T("p", {
142
+ className: "col-span-2 p-4 lg:col-span-1",
143
+ children: [/* @__PURE__ */ E("p", {
127
144
  className: "text-xs font-medium uppercase tracking-wide text-text-muted",
128
145
  children: n("atheletebridge.pages.sessionDetail.schedule", "Schedule")
129
- }), /* @__PURE__ */ E("div", {
146
+ }), /* @__PURE__ */ D("div", {
130
147
  className: "mt-3 space-y-2.5 text-sm text-text-primary",
131
148
  children: [
132
- /* @__PURE__ */ E("span", {
149
+ /* @__PURE__ */ D("span", {
133
150
  className: "flex items-center gap-2",
134
- children: [/* @__PURE__ */ T(v, {
151
+ children: [/* @__PURE__ */ E(h, {
135
152
  className: "h-4 w-4 shrink-0 text-text-secondary",
136
153
  "aria-hidden": "true"
137
- }), l(J.scheduledAt)]
154
+ }), u(q.scheduledAt)]
138
155
  }),
139
- /* @__PURE__ */ E("span", {
156
+ /* @__PURE__ */ D("span", {
140
157
  className: "flex items-center gap-2 text-text-secondary",
141
- children: [/* @__PURE__ */ T(b, {
158
+ children: [/* @__PURE__ */ E(_, {
142
159
  className: "h-4 w-4 shrink-0",
143
160
  "aria-hidden": "true"
144
- }), u(J.durationMin)]
161
+ }), d(q.durationMin)]
145
162
  }),
146
- J.type === "IN_PERSON" && J.location ? /* @__PURE__ */ E("span", {
163
+ q.type === "IN_PERSON" && q.location ? /* @__PURE__ */ D("span", {
147
164
  className: "flex items-center gap-2 text-text-secondary",
148
165
  children: [
149
- /* @__PURE__ */ T(w, {
166
+ /* @__PURE__ */ E(x, {
150
167
  className: "h-4 w-4 shrink-0",
151
168
  "aria-hidden": "true"
152
169
  }),
153
170
  " ",
154
- J.location
171
+ q.location
155
172
  ]
156
173
  }) : null
157
174
  ]
@@ -159,57 +176,172 @@ function N() {
159
176
  })
160
177
  ]
161
178
  }),
162
- /* @__PURE__ */ E("div", {
179
+ Q ? /* @__PURE__ */ D("a", {
180
+ href: Q,
181
+ target: "_blank",
182
+ rel: "noopener noreferrer",
183
+ className: "mb-6 flex w-full items-center justify-center gap-2.5 rounded-xl bg-[linear-gradient(120deg,var(--color-action-primary-bg),color-mix(in_oklab,var(--color-action-primary-bg)_62%,var(--color-accent-purple)),var(--color-action-primary-bg))] px-5 py-3.5 text-base font-bold uppercase tracking-wide text-action-primary-text shadow-elevation-2 transition-[filter,box-shadow] hover:brightness-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
184
+ children: [
185
+ /* @__PURE__ */ E(C, {
186
+ className: "h-5 w-5",
187
+ "aria-hidden": "true"
188
+ }),
189
+ n("atheletebridge.pages.sessionDetail.joinMeeting", "Join Meeting"),
190
+ /* @__PURE__ */ E(v, {
191
+ className: "h-4 w-4",
192
+ "aria-hidden": "true"
193
+ })
194
+ ]
195
+ }) : null,
196
+ X || Z ? /* @__PURE__ */ D("section", {
197
+ className: "mb-6",
198
+ children: [/* @__PURE__ */ E("h2", {
199
+ className: "mb-3 text-xs font-semibold uppercase tracking-wide text-text-muted",
200
+ children: n("atheletebridge.pages.sessionDetail.sessionOutcome", "Session outcome")
201
+ }), /* @__PURE__ */ D("div", {
202
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
203
+ children: [X ? /* @__PURE__ */ D(O, {
204
+ treatment: "metric",
205
+ className: "flex flex-col justify-between gap-3 border-status-success-border/50 p-4",
206
+ children: [/* @__PURE__ */ D("div", {
207
+ className: "flex items-start gap-3",
208
+ children: [/* @__PURE__ */ E("span", {
209
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-status-success-bg-subtle text-status-success-text",
210
+ children: /* @__PURE__ */ E(le, {
211
+ className: "h-4 w-4",
212
+ "aria-hidden": "true"
213
+ })
214
+ }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
215
+ className: "text-xs font-bold uppercase tracking-wide text-status-success-text",
216
+ children: n("atheletebridge.pages.sessionDetail.completeSessionCard", "Complete session")
217
+ }), /* @__PURE__ */ E("p", {
218
+ className: "mt-0.5 text-xs text-text-secondary",
219
+ children: n("atheletebridge.pages.sessionDetail.completeSessionCardHint", "Mark as complete and rate this session")
220
+ })] })]
221
+ }), /* @__PURE__ */ D("div", {
222
+ className: "flex items-center justify-between gap-2 pt-1",
223
+ children: [/* @__PURE__ */ E(r, {
224
+ value: V,
225
+ onChange: (e) => {
226
+ W(null), B(q.feedback ?? ""), H(e), R(!0);
227
+ },
228
+ size: 22,
229
+ ariaLabel: "Quick-rate and complete session"
230
+ }), /* @__PURE__ */ E("button", {
231
+ type: "button",
232
+ onClick: () => {
233
+ W(null), B(q.feedback ?? ""), H(q.rating ?? 0), R(!0);
234
+ },
235
+ className: "rounded-lg bg-status-success-bg-subtle px-3 py-1.5 text-xs font-semibold text-status-success-text ring-1 ring-inset ring-status-success-border",
236
+ children: n("atheletebridge.pages.sessionDetail.complete", "Complete")
237
+ })]
238
+ })]
239
+ }) : null, Z ? /* @__PURE__ */ D(O, {
240
+ treatment: "metric",
241
+ className: "flex flex-col justify-between gap-3 border-status-error-border/50 p-4",
242
+ children: [/* @__PURE__ */ D("div", {
243
+ className: "flex items-start gap-3",
244
+ children: [/* @__PURE__ */ E("span", {
245
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-status-error-bg-subtle text-status-error-text",
246
+ children: /* @__PURE__ */ E(w, {
247
+ className: "h-4 w-4",
248
+ "aria-hidden": "true"
249
+ })
250
+ }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
251
+ className: "text-xs font-bold uppercase tracking-wide text-status-error-text",
252
+ children: n("atheletebridge.pages.sessionDetail.cancelSessionCard", "Cancel session")
253
+ }), /* @__PURE__ */ E("p", {
254
+ className: "mt-0.5 text-xs text-text-secondary",
255
+ children: n("atheletebridge.pages.sessionDetail.cancelSessionCardHint", "Cancel this session if schedules changed")
256
+ })] })]
257
+ }), /* @__PURE__ */ D("button", {
258
+ type: "button",
259
+ onClick: () => b && I.mutate(b),
260
+ disabled: I.isPending,
261
+ className: "inline-flex w-full items-center justify-center gap-1.5 rounded-lg border border-status-error-border px-3 py-2 text-xs font-semibold text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-60",
262
+ children: [I.isPending ? /* @__PURE__ */ E(y, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ E(w, { className: "h-3.5 w-3.5" }), n("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
263
+ })]
264
+ }) : null]
265
+ })]
266
+ }) : null,
267
+ /* @__PURE__ */ D(O, {
268
+ treatment: "metric",
269
+ className: "mb-6 flex items-start gap-3 p-4",
270
+ children: [/* @__PURE__ */ E("span", {
271
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-action-primary-bg",
272
+ children: /* @__PURE__ */ E(S, {
273
+ className: "h-4 w-4",
274
+ "aria-hidden": "true"
275
+ })
276
+ }), /* @__PURE__ */ D("div", {
277
+ className: "min-w-0 text-xs",
278
+ children: [
279
+ /* @__PURE__ */ E("p", {
280
+ className: "font-bold uppercase tracking-wide text-action-primary-bg",
281
+ children: n("atheletebridge.pages.sessionDetail.beforeSessionTitle", "Before your session")
282
+ }),
283
+ /* @__PURE__ */ E("p", {
284
+ className: "mt-1 text-text-primary",
285
+ children: n("atheletebridge.pages.sessionDetail.beforeSessionHint", "Warm up, review your assigned drills, and check your camera/audio before joining.")
286
+ }),
287
+ /* @__PURE__ */ E("p", {
288
+ className: "mt-1 text-text-muted",
289
+ children: n("atheletebridge.pages.sessionDetail.privacyNote", "Your coaching session details and feedback stay strictly isolated within your club workspace.")
290
+ })
291
+ ]
292
+ })]
293
+ }),
294
+ /* @__PURE__ */ D("div", {
163
295
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
164
- children: [/* @__PURE__ */ T("div", {
296
+ children: [/* @__PURE__ */ E("div", {
165
297
  className: "space-y-6",
166
- children: /* @__PURE__ */ E(D, {
298
+ children: /* @__PURE__ */ D(O, {
167
299
  treatment: "glass",
168
300
  className: "p-5 sm:p-6",
169
301
  children: [
170
- /* @__PURE__ */ T("h2", {
302
+ /* @__PURE__ */ E("h2", {
171
303
  className: "text-sm font-semibold text-text-primary",
172
304
  children: n("atheletebridge.pages.sessionDetail.sessionDetails", "Session details")
173
305
  }),
174
- /* @__PURE__ */ E("p", {
306
+ /* @__PURE__ */ D("p", {
175
307
  className: "mt-2 text-sm text-text-secondary",
176
308
  children: [
177
- c[J.type],
309
+ l[q.type],
178
310
  " ",
179
311
  n("atheletebridge.pages.sessionDetail.sessionTypeSuffix", "session"),
180
- J.location ? ` · ${J.location}` : "",
312
+ q.location ? ` · ${q.location}` : "",
181
313
  "."
182
314
  ]
183
315
  }),
184
- $ ? /* @__PURE__ */ E("a", {
185
- href: $,
316
+ Q ? /* @__PURE__ */ D("a", {
317
+ href: Q,
186
318
  target: "_blank",
187
319
  rel: "noopener noreferrer",
188
320
  className: "mt-4 flex items-center gap-3 rounded-xl border border-border-seam bg-bg-sunken p-3 transition-colors hover:bg-bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
189
321
  children: [
190
- /* @__PURE__ */ T("span", {
322
+ /* @__PURE__ */ E("span", {
191
323
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
192
- children: /* @__PURE__ */ T(oe, {
324
+ children: /* @__PURE__ */ E(C, {
193
325
  className: "h-5 w-5",
194
326
  "aria-hidden": "true"
195
327
  })
196
328
  }),
197
- /* @__PURE__ */ E("span", {
329
+ /* @__PURE__ */ D("span", {
198
330
  className: "min-w-0 flex-1",
199
- children: [/* @__PURE__ */ T("span", {
331
+ children: [/* @__PURE__ */ E("span", {
200
332
  className: "block text-sm font-medium text-text-primary",
201
333
  children: n("atheletebridge.pages.sessionDetail.meetingLink", "Meeting link")
202
- }), /* @__PURE__ */ T("span", {
334
+ }), /* @__PURE__ */ E("span", {
203
335
  className: "block truncate text-xs text-text-secondary",
204
336
  children: n("atheletebridge.pages.sessionDetail.onlineSessionHint", "Online session — tap to join")
205
337
  })]
206
338
  }),
207
- /* @__PURE__ */ E("span", {
339
+ /* @__PURE__ */ D("span", {
208
340
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-link",
209
341
  children: [
210
342
  n("atheletebridge.pages.sessionDetail.join", "Join"),
211
343
  " ",
212
- /* @__PURE__ */ T(x, {
344
+ /* @__PURE__ */ E(v, {
213
345
  className: "h-4 w-4",
214
346
  "aria-hidden": "true"
215
347
  })
@@ -217,34 +349,34 @@ function N() {
217
349
  })
218
350
  ]
219
351
  }) : null,
220
- J.completedAt ? /* @__PURE__ */ E("div", {
352
+ q.completedAt ? /* @__PURE__ */ D("div", {
221
353
  className: "mt-5 border-t border-border-seam pt-5",
222
354
  children: [
223
- /* @__PURE__ */ T("h3", {
355
+ /* @__PURE__ */ E("h3", {
224
356
  className: "mb-2 text-sm font-semibold text-text-primary",
225
357
  children: n("atheletebridge.pages.sessionDetail.outcome", "Outcome")
226
358
  }),
227
- /* @__PURE__ */ E("p", {
359
+ /* @__PURE__ */ D("p", {
228
360
  className: "text-sm text-text-secondary",
229
361
  children: [
230
362
  n("atheletebridge.pages.sessionDetail.completed", "Completed"),
231
363
  " ",
232
- l(J.completedAt)
364
+ u(q.completedAt)
233
365
  ]
234
366
  }),
235
- J.rating === null ? null : /* @__PURE__ */ T("div", {
367
+ q.rating === null ? null : /* @__PURE__ */ E("div", {
236
368
  className: "mt-2",
237
- children: /* @__PURE__ */ T(r, {
238
- value: J.rating,
369
+ children: /* @__PURE__ */ E(r, {
370
+ value: q.rating,
239
371
  size: 18,
240
372
  showValue: !0
241
373
  })
242
374
  }),
243
- J.feedback ? /* @__PURE__ */ E("p", {
375
+ q.feedback ? /* @__PURE__ */ D("p", {
244
376
  className: "mt-3 rounded-lg bg-bg-sunken p-3 text-sm italic text-text-secondary",
245
377
  children: [
246
378
  "“",
247
- J.feedback,
379
+ q.feedback,
248
380
  "”"
249
381
  ]
250
382
  }) : null
@@ -252,114 +384,114 @@ function N() {
252
384
  }) : null
253
385
  ]
254
386
  })
255
- }), Y || Z || Q ? /* @__PURE__ */ E(le, {
387
+ }), J || X || Z ? /* @__PURE__ */ D(ue, {
256
388
  className: "h-fit",
257
389
  children: [
258
- /* @__PURE__ */ T("h2", {
390
+ /* @__PURE__ */ E("h2", {
259
391
  className: "mb-4 text-sm font-semibold text-text-primary",
260
392
  children: n("atheletebridge.pages.sessionDetail.actions", "Actions")
261
393
  }),
262
- /* @__PURE__ */ E("div", {
394
+ /* @__PURE__ */ D("div", {
263
395
  className: "flex flex-col gap-2.5",
264
396
  children: [
265
- Y && /* @__PURE__ */ E("button", {
397
+ J && /* @__PURE__ */ D("button", {
266
398
  type: "button",
267
- onClick: () => C && F.mutate(C),
268
- disabled: F.isPending,
399
+ onClick: () => b && P.mutate(b),
400
+ disabled: P.isPending,
269
401
  className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
270
- children: [F.isPending ? /* @__PURE__ */ T(S, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(y, { className: "h-4 w-4" }), n("atheletebridge.pages.sessionDetail.confirm", "Confirm")]
402
+ children: [P.isPending ? /* @__PURE__ */ E(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(g, { className: "h-4 w-4" }), n("atheletebridge.pages.sessionDetail.confirm", "Confirm")]
271
403
  }),
272
- Z && /* @__PURE__ */ E("button", {
404
+ X && /* @__PURE__ */ D("button", {
273
405
  type: "button",
274
406
  onClick: () => {
275
- G(null), V(J.feedback ?? ""), U(J.rating ?? 0), z(!0);
407
+ W(null), B(q.feedback ?? ""), H(q.rating ?? 0), R(!0);
276
408
  },
277
409
  className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-status-success-bg-subtle px-4 py-2.5 text-sm font-medium text-status-success-text ring-1 ring-inset ring-status-success-border transition-colors hover:bg-status-success-bg-subtle/70",
278
410
  children: [
279
- /* @__PURE__ */ T(y, { className: "h-4 w-4" }),
411
+ /* @__PURE__ */ E(g, { className: "h-4 w-4" }),
280
412
  " ",
281
413
  n("atheletebridge.pages.sessionDetail.complete", "Complete")
282
414
  ]
283
415
  }),
284
- Q && /* @__PURE__ */ E("button", {
416
+ Z && /* @__PURE__ */ D("button", {
285
417
  type: "button",
286
- onClick: () => C && L.mutate(C),
287
- disabled: L.isPending,
418
+ onClick: () => b && I.mutate(b),
419
+ disabled: I.isPending,
288
420
  className: "inline-flex w-full items-center justify-center gap-2 rounded-lg border border-status-error-border px-4 py-2.5 text-sm font-medium text-status-error-text transition-colors hover:bg-status-error-bg-subtle disabled:opacity-60",
289
- children: [L.isPending ? /* @__PURE__ */ T(S, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(se, { className: "h-4 w-4" }), n("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
421
+ children: [I.isPending ? /* @__PURE__ */ E(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(w, { className: "h-4 w-4" }), n("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
290
422
  })
291
423
  ]
292
424
  }),
293
- Z ? /* @__PURE__ */ T("p", {
425
+ X ? /* @__PURE__ */ E("p", {
294
426
  className: "mt-3 text-xs text-text-muted",
295
427
  children: n("atheletebridge.pages.sessionDetail.completeTooltip", "Completing lets you leave feedback and a 1–5 star rating for the athlete.")
296
- }) : fe ? /* @__PURE__ */ T("p", {
428
+ }) : he ? /* @__PURE__ */ E("p", {
297
429
  className: "mt-3 text-xs text-text-muted",
298
430
  children: n("atheletebridge.pages.sessionDetail.completeUnavailable", "This session can be completed once its scheduled date and time arrives.")
299
431
  }) : null
300
432
  ]
301
433
  }) : null]
302
434
  }),
303
- /* @__PURE__ */ T(ue, {
304
- open: R,
305
- onOpenChange: z,
306
- children: /* @__PURE__ */ E(O, { children: [/* @__PURE__ */ T(A, { children: /* @__PURE__ */ T(j, { children: n("atheletebridge.pages.sessionDetail.completeDialogTitle", "Complete session") }) }), /* @__PURE__ */ E("form", {
435
+ /* @__PURE__ */ E(de, {
436
+ open: L,
437
+ onOpenChange: R,
438
+ children: /* @__PURE__ */ D(fe, { children: [/* @__PURE__ */ E(k, { children: /* @__PURE__ */ E(A, { children: n("atheletebridge.pages.sessionDetail.completeDialogTitle", "Complete session") }) }), /* @__PURE__ */ D("form", {
307
439
  onSubmit: async (e) => {
308
- if (e.preventDefault(), G(null), !C) return;
309
- let t = H > 0 ? H : void 0;
310
- if (t !== void 0 && (t < 1 || t > 5)) G("Rating must be between 1 and 5.");
440
+ if (e.preventDefault(), W(null), !b) return;
441
+ let t = V > 0 ? V : void 0;
442
+ if (t !== void 0 && (t < 1 || t > 5)) W("Rating must be between 1 and 5.");
311
443
  else try {
312
- await I.mutateAsync({
313
- id: C,
444
+ await F.mutateAsync({
445
+ id: b,
314
446
  input: {
315
- feedback: B.trim() || void 0,
447
+ feedback: z.trim() || void 0,
316
448
  rating: t
317
449
  }
318
- }), z(!1);
450
+ }), R(!1);
319
451
  } catch (e) {
320
- G(e instanceof Error ? e.message : "Failed to complete session.");
452
+ W(e instanceof Error ? e.message : "Failed to complete session.");
321
453
  }
322
454
  },
323
455
  className: "space-y-4 px-1",
324
456
  children: [
325
- /* @__PURE__ */ T(s, {
457
+ /* @__PURE__ */ E(s, {
326
458
  label: n("atheletebridge.pages.sessionDetail.feedbackLabel", "Feedback"),
327
459
  htmlFor: "feedback",
328
460
  hint: n("atheletebridge.pages.sessionDetail.feedbackHint", "Optional post-session notes."),
329
- children: /* @__PURE__ */ T("textarea", {
461
+ children: /* @__PURE__ */ E("textarea", {
330
462
  id: "feedback",
331
- className: ee,
463
+ className: c,
332
464
  rows: 3,
333
- value: B,
334
- onChange: (e) => V(e.target.value),
465
+ value: z,
466
+ onChange: (e) => B(e.target.value),
335
467
  placeholder: n("atheletebridge.pages.sessionDetail.feedbackPlaceholder", "How did the session go?")
336
468
  })
337
469
  }),
338
- /* @__PURE__ */ T(s, {
470
+ /* @__PURE__ */ E(s, {
339
471
  label: n("atheletebridge.pages.sessionDetail.ratingLabel", "Rating"),
340
472
  hint: n("atheletebridge.pages.sessionDetail.ratingHint", "Optional — tap a star."),
341
- children: /* @__PURE__ */ T(r, {
342
- value: H,
343
- onChange: U,
473
+ children: /* @__PURE__ */ E(r, {
474
+ value: V,
475
+ onChange: H,
344
476
  size: 30,
345
477
  showLabels: !0,
346
478
  ariaLabel: n("atheletebridge.pages.sessionDetail.ratingAria", "Rate this session out of 5")
347
479
  })
348
480
  }),
349
- W && /* @__PURE__ */ T("p", {
481
+ U && /* @__PURE__ */ E("p", {
350
482
  className: "text-sm text-status-error-text",
351
- children: W
483
+ children: U
352
484
  }),
353
- /* @__PURE__ */ E(k, { children: [/* @__PURE__ */ T("button", {
485
+ /* @__PURE__ */ D(pe, { children: [/* @__PURE__ */ E("button", {
354
486
  type: "button",
355
- onClick: () => z(!1),
487
+ onClick: () => R(!1),
356
488
  className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
357
489
  children: n("common.cancel", "Cancel")
358
- }), /* @__PURE__ */ E("button", {
490
+ }), /* @__PURE__ */ D("button", {
359
491
  type: "submit",
360
- disabled: I.isPending,
492
+ disabled: F.isPending,
361
493
  className: "inline-flex items-center gap-1.5 rounded-lg bg-status-success-bg-subtle px-4 py-2 text-sm font-medium text-status-success-text ring-1 ring-inset ring-status-success-border transition-colors hover:bg-status-success-bg-subtle/70 disabled:opacity-60",
362
- children: [I.isPending && /* @__PURE__ */ T(S, { className: "h-4 w-4 animate-spin" }), n("atheletebridge.pages.sessionDetail.completeAction", "Complete session")]
494
+ children: [F.isPending && /* @__PURE__ */ E(y, { className: "h-4 w-4 animate-spin" }), n("atheletebridge.pages.sessionDetail.completeAction", "Complete session")]
363
495
  })] })
364
496
  ]
365
497
  })] })
@@ -367,6 +499,6 @@ function N() {
367
499
  ]
368
500
  });
369
501
  }
370
- export { N as SessionDetailPage };
502
+ export { M as SessionDetailPage };
371
503
 
372
504
  //# sourceMappingURL=SessionDetailPage.js.map