@burdenoff/microfe-atheletebridge 2026.1023.1 → 2026.1024.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,53 +5,55 @@ import { RatingStars as r } from "../../components/viz/RatingStars.js";
5
5
  import "../../components/viz/index.js";
6
6
  import { StatusBadge as i } from "../../components/StatusBadge.js";
7
7
  import { SESSION_TYPE_LABELS as a } from "../../components/domain.js";
8
- import { formatDate as o, formatDuration as ee } from "../../utils/formatters.js";
9
- import { UserAvatar as s } from "../../components/UserAvatar.js";
10
- import { ErrorState as c, LoadingState as te } from "../../components/LoadingState.js";
11
- import { useCancelSession as l, useCompleteSession as ne, useConfirmSession as u, useSession as d, useUserDirectory as f } from "../../hooks/useAthleteBridgeApi.js";
12
- import { FormField as p, fieldInputClass as m } from "../../components/form.js";
13
- import { SessionStatusTimeline as h } from "../../components/SessionStatusTimeline.js";
8
+ import { formatDate as o, formatDuration as s } from "../../utils/formatters.js";
9
+ import { UserAvatar as c } from "../../components/UserAvatar.js";
10
+ import { ErrorState as ee, LoadingState as te } from "../../components/LoadingState.js";
11
+ import { useCancelSession as ne, useCompleteSession as l, useConfirmSession as u, useSession as d, useUserDirectory as f } from "../../hooks/useAthleteBridgeApi.js";
12
+ import { useScheduledTimeGate as p } from "../../hooks/useScheduledTimeGate.js";
13
+ import "../../hooks/index.js";
14
+ import { FormField as m, fieldInputClass as h } from "../../components/form.js";
15
+ import { SessionStatusTimeline as re } from "../../components/SessionStatusTimeline.js";
14
16
  import { safeExternalHref as g } from "../../utils/url.js";
15
- import { useMemo as _, useState as v } from "react";
16
- import { ArrowLeft as re, CalendarClock as ie, CheckCircle2 as y, Clock as ae, ExternalLink as b, Loader2 as x, Mail as S, MapPin as C, Video as w, XCircle as T } from "lucide-react";
17
- import { useParams as oe } from "react-router";
18
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
19
- import { EmphasisPanel as se, GlassCard as O, ResponsiveDialog as k, ResponsiveDialogContent as A, ResponsiveDialogFooter as j, ResponsiveDialogHeader as M, ResponsiveDialogTitle as N } from "@burdenoff/fe-libs/ui";
17
+ import { useMemo as ie, useState as _ } from "react";
18
+ import { ArrowLeft as ae, 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";
20
22
  //#region src/atheletebridge/pages/sessions/SessionDetailPage.tsx
21
- function P({ role: e, name: t, email: n, id: r }) {
23
+ function M({ role: e, name: t, email: n, id: r }) {
22
24
  let i = t?.trim() || `User ${r.slice(0, 6)}`;
23
- return /* @__PURE__ */ D(O, {
25
+ return /* @__PURE__ */ E(D, {
24
26
  treatment: "metric",
25
27
  className: "p-4",
26
28
  children: [
27
- /* @__PURE__ */ E("p", {
29
+ /* @__PURE__ */ T("p", {
28
30
  className: "text-xs font-medium uppercase tracking-wide text-text-muted",
29
31
  children: e
30
32
  }),
31
- /* @__PURE__ */ D("div", {
33
+ /* @__PURE__ */ E("div", {
32
34
  className: "mt-3 flex items-center gap-3",
33
- children: [/* @__PURE__ */ E(s, {
35
+ children: [/* @__PURE__ */ T(c, {
34
36
  name: t,
35
37
  id: r,
36
38
  size: "lg"
37
- }), /* @__PURE__ */ D("div", {
39
+ }), /* @__PURE__ */ E("div", {
38
40
  className: "min-w-0",
39
- children: [/* @__PURE__ */ E("p", {
41
+ children: [/* @__PURE__ */ T("p", {
40
42
  className: "truncate text-sm font-semibold text-text-primary",
41
43
  children: i
42
- }), /* @__PURE__ */ E("p", {
44
+ }), /* @__PURE__ */ T("p", {
43
45
  className: "truncate text-xs text-text-secondary",
44
46
  children: e
45
47
  })]
46
48
  })]
47
49
  }),
48
- n ? /* @__PURE__ */ D("a", {
50
+ n ? /* @__PURE__ */ E("a", {
49
51
  href: `mailto:${n}`,
50
52
  className: "mt-3 flex items-center gap-1.5 text-xs text-text-secondary hover:text-text-primary hover:underline",
51
- children: [/* @__PURE__ */ E(S, {
53
+ children: [/* @__PURE__ */ T(C, {
52
54
  className: "h-3.5 w-3.5 shrink-0",
53
55
  "aria-hidden": "true"
54
- }), /* @__PURE__ */ E("span", {
56
+ }), /* @__PURE__ */ T("span", {
55
57
  className: "truncate",
56
58
  children: n
57
59
  })]
@@ -59,97 +61,97 @@ function P({ role: e, name: t, email: n, id: r }) {
59
61
  ]
60
62
  });
61
63
  }
62
- function F() {
63
- let s = e(), { id: S } = oe(), { navigateTo: F } = t(), I = d(S), L = u(), R = ne(), z = l(), [B, V] = v(!1), [H, U] = v(""), [W, G] = v(0), [K, q] = v(null), J = f(_(() => I.data ? [I.data.coachId, I.data.athleteId] : [], [I.data]));
64
- if (I.isLoading) return /* @__PURE__ */ E(n, {
65
- title: s("atheletebridge.pages.sessionDetail.title", "Session"),
66
- children: /* @__PURE__ */ E(te, { label: s("atheletebridge.pages.sessionDetail.loading", "Loading session…") })
64
+ function N() {
65
+ let c = e(), { id: C } = ce(), { navigateTo: N } = t(), P = d(C), F = u(), I = l(), L = ne(), [R, z] = _(!1), [B, V] = _(""), [H, U] = _(0), [W, G] = _(null), K = p(P.data?.scheduledAt), q = f(ie(() => P.data ? [P.data.coachId, P.data.athleteId] : [], [P.data]));
66
+ if (P.isLoading) return /* @__PURE__ */ T(n, {
67
+ title: c("atheletebridge.pages.sessionDetail.title", "Session"),
68
+ children: /* @__PURE__ */ T(te, { label: c("atheletebridge.pages.sessionDetail.loading", "Loading session…") })
67
69
  });
68
- if (I.isError || !I.data) return /* @__PURE__ */ E(n, {
69
- title: s("atheletebridge.pages.sessionDetail.title", "Session"),
70
- children: /* @__PURE__ */ E(c, {
71
- title: s("atheletebridge.pages.sessionDetail.notFoundTitle", "Session not found"),
72
- message: s("atheletebridge.pages.sessionDetail.notFoundMessage", "This session does not exist or you do not have access to it."),
73
- onRetry: () => F("/sessions")
70
+ if (P.isError || !P.data) return /* @__PURE__ */ T(n, {
71
+ title: c("atheletebridge.pages.sessionDetail.title", "Session"),
72
+ children: /* @__PURE__ */ T(ee, {
73
+ title: c("atheletebridge.pages.sessionDetail.notFoundTitle", "Session not found"),
74
+ message: c("atheletebridge.pages.sessionDetail.notFoundMessage", "This session does not exist or you do not have access to it."),
75
+ onRetry: () => N("/sessions")
74
76
  })
75
77
  });
76
- let Y = I.data, X = Y.status === "REQUESTED", Z = Y.status === "CONFIRMED", Q = Y.status === "REQUESTED" || Y.status === "CONFIRMED", $ = g(Y.meetingUrl);
77
- return /* @__PURE__ */ D(n, {
78
- title: Y.title,
79
- description: a[Y.type],
80
- actions: /* @__PURE__ */ D("button", {
78
+ let J = P.data, Y = J.status === "REQUESTED", X = J.status === "CONFIRMED", Z = X && K, de = X && !K, Q = J.status === "REQUESTED" || J.status === "CONFIRMED", $ = g(J.meetingUrl);
79
+ return /* @__PURE__ */ E(n, {
80
+ title: J.title,
81
+ description: a[J.type],
82
+ actions: /* @__PURE__ */ E("button", {
81
83
  type: "button",
82
- onClick: () => F("/sessions"),
84
+ onClick: () => N("/sessions"),
83
85
  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",
84
86
  children: [
85
- /* @__PURE__ */ E(re, { className: "h-4 w-4" }),
87
+ /* @__PURE__ */ T(ae, { className: "h-4 w-4" }),
86
88
  " ",
87
- s("atheletebridge.pages.sessionDetail.back", "Back")
89
+ c("atheletebridge.pages.sessionDetail.back", "Back")
88
90
  ]
89
91
  }),
90
92
  children: [
91
- /* @__PURE__ */ D(O, {
93
+ /* @__PURE__ */ E(D, {
92
94
  treatment: "insight",
93
95
  className: "mb-6 p-5 sm:p-6",
94
- children: [/* @__PURE__ */ D("div", {
96
+ children: [/* @__PURE__ */ E("div", {
95
97
  className: "mb-5 flex items-center justify-between gap-3",
96
- children: [/* @__PURE__ */ E("span", {
98
+ children: [/* @__PURE__ */ T("span", {
97
99
  className: "text-xs font-medium uppercase tracking-wide text-text-muted",
98
- children: s("atheletebridge.pages.sessionDetail.lifecycle", "Lifecycle")
99
- }), /* @__PURE__ */ E(i, { status: Y.status })]
100
- }), /* @__PURE__ */ E(h, {
101
- status: Y.status,
102
- createdAt: Y.createdAt,
103
- completedAt: Y.completedAt
100
+ children: c("atheletebridge.pages.sessionDetail.lifecycle", "Lifecycle")
101
+ }), /* @__PURE__ */ T(i, { status: J.status })]
102
+ }), /* @__PURE__ */ T(re, {
103
+ status: J.status,
104
+ createdAt: J.createdAt,
105
+ completedAt: J.completedAt
104
106
  })]
105
107
  }),
106
- /* @__PURE__ */ D("div", {
108
+ /* @__PURE__ */ E("div", {
107
109
  className: "mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
108
110
  children: [
109
- /* @__PURE__ */ E(P, {
110
- role: s("atheletebridge.pages.sessionDetail.coach", "Coach"),
111
- id: Y.coachId,
112
- name: J.nameOf(Y.coachId),
113
- email: J.emailOf(Y.coachId)
111
+ /* @__PURE__ */ T(M, {
112
+ role: c("atheletebridge.pages.sessionDetail.coach", "Coach"),
113
+ id: J.coachId,
114
+ name: q.nameOf(J.coachId),
115
+ email: q.emailOf(J.coachId)
114
116
  }),
115
- /* @__PURE__ */ E(P, {
116
- role: s("atheletebridge.pages.sessionDetail.athlete", "Athlete"),
117
- id: Y.athleteId,
118
- name: J.nameOf(Y.athleteId),
119
- email: J.emailOf(Y.athleteId)
117
+ /* @__PURE__ */ T(M, {
118
+ role: c("atheletebridge.pages.sessionDetail.athlete", "Athlete"),
119
+ id: J.athleteId,
120
+ name: q.nameOf(J.athleteId),
121
+ email: q.emailOf(J.athleteId)
120
122
  }),
121
- /* @__PURE__ */ D(O, {
123
+ /* @__PURE__ */ E(D, {
122
124
  treatment: "metric",
123
125
  className: "p-4",
124
- children: [/* @__PURE__ */ E("p", {
126
+ children: [/* @__PURE__ */ T("p", {
125
127
  className: "text-xs font-medium uppercase tracking-wide text-text-muted",
126
- children: s("atheletebridge.pages.sessionDetail.schedule", "Schedule")
127
- }), /* @__PURE__ */ D("div", {
128
+ children: c("atheletebridge.pages.sessionDetail.schedule", "Schedule")
129
+ }), /* @__PURE__ */ E("div", {
128
130
  className: "mt-3 space-y-2.5 text-sm text-text-primary",
129
131
  children: [
130
- /* @__PURE__ */ D("span", {
132
+ /* @__PURE__ */ E("span", {
131
133
  className: "flex items-center gap-2",
132
- children: [/* @__PURE__ */ E(ie, {
134
+ children: [/* @__PURE__ */ T(v, {
133
135
  className: "h-4 w-4 shrink-0 text-text-secondary",
134
136
  "aria-hidden": "true"
135
- }), o(Y.scheduledAt)]
137
+ }), o(J.scheduledAt)]
136
138
  }),
137
- /* @__PURE__ */ D("span", {
139
+ /* @__PURE__ */ E("span", {
138
140
  className: "flex items-center gap-2 text-text-secondary",
139
- children: [/* @__PURE__ */ E(ae, {
141
+ children: [/* @__PURE__ */ T(b, {
140
142
  className: "h-4 w-4 shrink-0",
141
143
  "aria-hidden": "true"
142
- }), ee(Y.durationMin)]
144
+ }), s(J.durationMin)]
143
145
  }),
144
- Y.type === "IN_PERSON" && Y.location ? /* @__PURE__ */ D("span", {
146
+ J.type === "IN_PERSON" && J.location ? /* @__PURE__ */ E("span", {
145
147
  className: "flex items-center gap-2 text-text-secondary",
146
148
  children: [
147
- /* @__PURE__ */ E(C, {
149
+ /* @__PURE__ */ T(w, {
148
150
  className: "h-4 w-4 shrink-0",
149
151
  "aria-hidden": "true"
150
152
  }),
151
153
  " ",
152
- Y.location
154
+ J.location
153
155
  ]
154
156
  }) : null
155
157
  ]
@@ -157,57 +159,57 @@ function F() {
157
159
  })
158
160
  ]
159
161
  }),
160
- /* @__PURE__ */ D("div", {
162
+ /* @__PURE__ */ E("div", {
161
163
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
162
- children: [/* @__PURE__ */ E("div", {
164
+ children: [/* @__PURE__ */ T("div", {
163
165
  className: "space-y-6",
164
- children: /* @__PURE__ */ D(O, {
166
+ children: /* @__PURE__ */ E(D, {
165
167
  treatment: "glass",
166
168
  className: "p-5 sm:p-6",
167
169
  children: [
168
- /* @__PURE__ */ E("h2", {
170
+ /* @__PURE__ */ T("h2", {
169
171
  className: "text-sm font-semibold text-text-primary",
170
- children: s("atheletebridge.pages.sessionDetail.sessionDetails", "Session details")
172
+ children: c("atheletebridge.pages.sessionDetail.sessionDetails", "Session details")
171
173
  }),
172
- /* @__PURE__ */ D("p", {
174
+ /* @__PURE__ */ E("p", {
173
175
  className: "mt-2 text-sm text-text-secondary",
174
176
  children: [
175
- a[Y.type],
177
+ a[J.type],
176
178
  " ",
177
- s("atheletebridge.pages.sessionDetail.sessionTypeSuffix", "session"),
178
- Y.location ? ` · ${Y.location}` : "",
179
+ c("atheletebridge.pages.sessionDetail.sessionTypeSuffix", "session"),
180
+ J.location ? ` · ${J.location}` : "",
179
181
  "."
180
182
  ]
181
183
  }),
182
- $ ? /* @__PURE__ */ D("a", {
184
+ $ ? /* @__PURE__ */ E("a", {
183
185
  href: $,
184
186
  target: "_blank",
185
187
  rel: "noopener noreferrer",
186
188
  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)]",
187
189
  children: [
188
- /* @__PURE__ */ E("span", {
190
+ /* @__PURE__ */ T("span", {
189
191
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
190
- children: /* @__PURE__ */ E(w, {
192
+ children: /* @__PURE__ */ T(oe, {
191
193
  className: "h-5 w-5",
192
194
  "aria-hidden": "true"
193
195
  })
194
196
  }),
195
- /* @__PURE__ */ D("span", {
197
+ /* @__PURE__ */ E("span", {
196
198
  className: "min-w-0 flex-1",
197
- children: [/* @__PURE__ */ E("span", {
199
+ children: [/* @__PURE__ */ T("span", {
198
200
  className: "block text-sm font-medium text-text-primary",
199
- children: s("atheletebridge.pages.sessionDetail.meetingLink", "Meeting link")
200
- }), /* @__PURE__ */ E("span", {
201
+ children: c("atheletebridge.pages.sessionDetail.meetingLink", "Meeting link")
202
+ }), /* @__PURE__ */ T("span", {
201
203
  className: "block truncate text-xs text-text-secondary",
202
- children: s("atheletebridge.pages.sessionDetail.onlineSessionHint", "Online session — tap to join")
204
+ children: c("atheletebridge.pages.sessionDetail.onlineSessionHint", "Online session — tap to join")
203
205
  })]
204
206
  }),
205
- /* @__PURE__ */ D("span", {
207
+ /* @__PURE__ */ E("span", {
206
208
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-link",
207
209
  children: [
208
- s("atheletebridge.pages.sessionDetail.join", "Join"),
210
+ c("atheletebridge.pages.sessionDetail.join", "Join"),
209
211
  " ",
210
- /* @__PURE__ */ E(b, {
212
+ /* @__PURE__ */ T(x, {
211
213
  className: "h-4 w-4",
212
214
  "aria-hidden": "true"
213
215
  })
@@ -215,34 +217,34 @@ function F() {
215
217
  })
216
218
  ]
217
219
  }) : null,
218
- Y.completedAt ? /* @__PURE__ */ D("div", {
220
+ J.completedAt ? /* @__PURE__ */ E("div", {
219
221
  className: "mt-5 border-t border-border-seam pt-5",
220
222
  children: [
221
- /* @__PURE__ */ E("h3", {
223
+ /* @__PURE__ */ T("h3", {
222
224
  className: "mb-2 text-sm font-semibold text-text-primary",
223
- children: s("atheletebridge.pages.sessionDetail.outcome", "Outcome")
225
+ children: c("atheletebridge.pages.sessionDetail.outcome", "Outcome")
224
226
  }),
225
- /* @__PURE__ */ D("p", {
227
+ /* @__PURE__ */ E("p", {
226
228
  className: "text-sm text-text-secondary",
227
229
  children: [
228
- s("atheletebridge.pages.sessionDetail.completed", "Completed"),
230
+ c("atheletebridge.pages.sessionDetail.completed", "Completed"),
229
231
  " ",
230
- o(Y.completedAt)
232
+ o(J.completedAt)
231
233
  ]
232
234
  }),
233
- Y.rating === null ? null : /* @__PURE__ */ E("div", {
235
+ J.rating === null ? null : /* @__PURE__ */ T("div", {
234
236
  className: "mt-2",
235
- children: /* @__PURE__ */ E(r, {
236
- value: Y.rating,
237
+ children: /* @__PURE__ */ T(r, {
238
+ value: J.rating,
237
239
  size: 18,
238
240
  showValue: !0
239
241
  })
240
242
  }),
241
- Y.feedback ? /* @__PURE__ */ D("p", {
243
+ J.feedback ? /* @__PURE__ */ E("p", {
242
244
  className: "mt-3 rounded-lg bg-bg-sunken p-3 text-sm italic text-text-secondary",
243
245
  children: [
244
246
  "“",
245
- Y.feedback,
247
+ J.feedback,
246
248
  "”"
247
249
  ]
248
250
  }) : null
@@ -250,114 +252,117 @@ function F() {
250
252
  }) : null
251
253
  ]
252
254
  })
253
- }), X || Z || Q ? /* @__PURE__ */ D(se, {
255
+ }), Y || Z || Q ? /* @__PURE__ */ E(le, {
254
256
  className: "h-fit",
255
257
  children: [
256
- /* @__PURE__ */ E("h2", {
258
+ /* @__PURE__ */ T("h2", {
257
259
  className: "mb-4 text-sm font-semibold text-text-primary",
258
- children: s("atheletebridge.pages.sessionDetail.actions", "Actions")
260
+ children: c("atheletebridge.pages.sessionDetail.actions", "Actions")
259
261
  }),
260
- /* @__PURE__ */ D("div", {
262
+ /* @__PURE__ */ E("div", {
261
263
  className: "flex flex-col gap-2.5",
262
264
  children: [
263
- X && /* @__PURE__ */ D("button", {
265
+ Y && /* @__PURE__ */ E("button", {
264
266
  type: "button",
265
- onClick: () => S && L.mutate(S),
266
- disabled: L.isPending,
267
+ onClick: () => C && F.mutate(C),
268
+ disabled: F.isPending,
267
269
  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",
268
- children: [L.isPending ? /* @__PURE__ */ E(x, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(y, { className: "h-4 w-4" }), s("atheletebridge.pages.sessionDetail.confirm", "Confirm")]
270
+ children: [F.isPending ? /* @__PURE__ */ T(S, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(y, { className: "h-4 w-4" }), c("atheletebridge.pages.sessionDetail.confirm", "Confirm")]
269
271
  }),
270
- Z && /* @__PURE__ */ D("button", {
272
+ Z && /* @__PURE__ */ E("button", {
271
273
  type: "button",
272
274
  onClick: () => {
273
- q(null), U(Y.feedback ?? ""), G(Y.rating ?? 0), V(!0);
275
+ G(null), V(J.feedback ?? ""), U(J.rating ?? 0), z(!0);
274
276
  },
275
277
  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",
276
278
  children: [
277
- /* @__PURE__ */ E(y, { className: "h-4 w-4" }),
279
+ /* @__PURE__ */ T(y, { className: "h-4 w-4" }),
278
280
  " ",
279
- s("atheletebridge.pages.sessionDetail.complete", "Complete")
281
+ c("atheletebridge.pages.sessionDetail.complete", "Complete")
280
282
  ]
281
283
  }),
282
- Q && /* @__PURE__ */ D("button", {
284
+ Q && /* @__PURE__ */ E("button", {
283
285
  type: "button",
284
- onClick: () => S && z.mutate(S),
285
- disabled: z.isPending,
286
+ onClick: () => C && L.mutate(C),
287
+ disabled: L.isPending,
286
288
  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",
287
- children: [z.isPending ? /* @__PURE__ */ E(x, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(T, { className: "h-4 w-4" }), s("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
289
+ children: [L.isPending ? /* @__PURE__ */ T(S, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(se, { className: "h-4 w-4" }), c("atheletebridge.pages.sessionDetail.cancelSession", "Cancel session")]
288
290
  })
289
291
  ]
290
292
  }),
291
- Z ? /* @__PURE__ */ E("p", {
293
+ Z ? /* @__PURE__ */ T("p", {
294
+ className: "mt-3 text-xs text-text-muted",
295
+ children: c("atheletebridge.pages.sessionDetail.completeTooltip", "Completing lets you leave feedback and a 1–5 star rating for the athlete.")
296
+ }) : de ? /* @__PURE__ */ T("p", {
292
297
  className: "mt-3 text-xs text-text-muted",
293
- children: s("atheletebridge.pages.sessionDetail.completeTooltip", "Completing lets you leave feedback and a 1–5 star rating for the athlete.")
298
+ children: c("atheletebridge.pages.sessionDetail.completeUnavailable", "This session can be completed once its scheduled date and time arrives.")
294
299
  }) : null
295
300
  ]
296
301
  }) : null]
297
302
  }),
298
- /* @__PURE__ */ E(k, {
299
- open: B,
300
- onOpenChange: V,
301
- children: /* @__PURE__ */ D(A, { children: [/* @__PURE__ */ E(M, { children: /* @__PURE__ */ E(N, { children: s("atheletebridge.pages.sessionDetail.completeDialogTitle", "Complete session") }) }), /* @__PURE__ */ D("form", {
303
+ /* @__PURE__ */ T(ue, {
304
+ open: R,
305
+ onOpenChange: z,
306
+ children: /* @__PURE__ */ E(O, { children: [/* @__PURE__ */ T(A, { children: /* @__PURE__ */ T(j, { children: c("atheletebridge.pages.sessionDetail.completeDialogTitle", "Complete session") }) }), /* @__PURE__ */ E("form", {
302
307
  onSubmit: async (e) => {
303
- if (e.preventDefault(), q(null), !S) return;
304
- let t = W > 0 ? W : void 0;
308
+ if (e.preventDefault(), G(null), !C) return;
309
+ let t = H > 0 ? H : void 0;
305
310
  if (t !== void 0 && (t < 1 || t > 5)) {
306
- q("Rating must be between 1 and 5.");
311
+ G("Rating must be between 1 and 5.");
307
312
  return;
308
313
  }
309
314
  try {
310
- await R.mutateAsync({
311
- id: S,
315
+ await I.mutateAsync({
316
+ id: C,
312
317
  input: {
313
- feedback: H.trim() || void 0,
318
+ feedback: B.trim() || void 0,
314
319
  rating: t
315
320
  }
316
- }), V(!1);
321
+ }), z(!1);
317
322
  } catch (e) {
318
- q(e instanceof Error ? e.message : "Failed to complete session.");
323
+ G(e instanceof Error ? e.message : "Failed to complete session.");
319
324
  }
320
325
  },
321
326
  className: "space-y-4 px-1",
322
327
  children: [
323
- /* @__PURE__ */ E(p, {
324
- label: s("atheletebridge.pages.sessionDetail.feedbackLabel", "Feedback"),
328
+ /* @__PURE__ */ T(m, {
329
+ label: c("atheletebridge.pages.sessionDetail.feedbackLabel", "Feedback"),
325
330
  htmlFor: "feedback",
326
- hint: s("atheletebridge.pages.sessionDetail.feedbackHint", "Optional post-session notes."),
327
- children: /* @__PURE__ */ E("textarea", {
331
+ hint: c("atheletebridge.pages.sessionDetail.feedbackHint", "Optional post-session notes."),
332
+ children: /* @__PURE__ */ T("textarea", {
328
333
  id: "feedback",
329
- className: m,
334
+ className: h,
330
335
  rows: 3,
331
- value: H,
332
- onChange: (e) => U(e.target.value),
333
- placeholder: s("atheletebridge.pages.sessionDetail.feedbackPlaceholder", "How did the session go?")
336
+ value: B,
337
+ onChange: (e) => V(e.target.value),
338
+ placeholder: c("atheletebridge.pages.sessionDetail.feedbackPlaceholder", "How did the session go?")
334
339
  })
335
340
  }),
336
- /* @__PURE__ */ E(p, {
337
- label: s("atheletebridge.pages.sessionDetail.ratingLabel", "Rating"),
338
- hint: s("atheletebridge.pages.sessionDetail.ratingHint", "Optional — tap a star."),
339
- children: /* @__PURE__ */ E(r, {
340
- value: W,
341
- onChange: G,
341
+ /* @__PURE__ */ T(m, {
342
+ label: c("atheletebridge.pages.sessionDetail.ratingLabel", "Rating"),
343
+ hint: c("atheletebridge.pages.sessionDetail.ratingHint", "Optional — tap a star."),
344
+ children: /* @__PURE__ */ T(r, {
345
+ value: H,
346
+ onChange: U,
342
347
  size: 30,
343
348
  showLabels: !0,
344
- ariaLabel: s("atheletebridge.pages.sessionDetail.ratingAria", "Rate this session out of 5")
349
+ ariaLabel: c("atheletebridge.pages.sessionDetail.ratingAria", "Rate this session out of 5")
345
350
  })
346
351
  }),
347
- K && /* @__PURE__ */ E("p", {
352
+ W && /* @__PURE__ */ T("p", {
348
353
  className: "text-sm text-status-error-text",
349
- children: K
354
+ children: W
350
355
  }),
351
- /* @__PURE__ */ D(j, { children: [/* @__PURE__ */ E("button", {
356
+ /* @__PURE__ */ E(k, { children: [/* @__PURE__ */ T("button", {
352
357
  type: "button",
353
- onClick: () => V(!1),
358
+ onClick: () => z(!1),
354
359
  className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
355
- children: s("common.cancel", "Cancel")
356
- }), /* @__PURE__ */ D("button", {
360
+ children: c("common.cancel", "Cancel")
361
+ }), /* @__PURE__ */ E("button", {
357
362
  type: "submit",
358
- disabled: R.isPending,
363
+ disabled: I.isPending,
359
364
  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",
360
- children: [R.isPending && /* @__PURE__ */ E(x, { className: "h-4 w-4 animate-spin" }), s("atheletebridge.pages.sessionDetail.completeAction", "Complete session")]
365
+ children: [I.isPending && /* @__PURE__ */ T(S, { className: "h-4 w-4 animate-spin" }), c("atheletebridge.pages.sessionDetail.completeAction", "Complete session")]
361
366
  })] })
362
367
  ]
363
368
  })] })
@@ -366,6 +371,6 @@ function F() {
366
371
  });
367
372
  }
368
373
  //#endregion
369
- export { F as SessionDetailPage };
374
+ export { N as SessionDetailPage };
370
375
 
371
376
  //# sourceMappingURL=SessionDetailPage.js.map