@burdenoff/microfe-atheletebridge 2026.1031.2 → 2026.1031.3

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.
@@ -1,42 +1,25 @@
1
1
  import { useAbTranslate as e } from "../../i18n.js";
2
2
  import { useAthleteBridge as t } from "../../context/AthleteBridgeContext.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { FIXTURE_TYPE_LABELS as ee } from "../../components/domain.js";
5
- import { Crest as r } from "../../components/Crest.js";
6
- import { Scoreboard as te } from "../../components/Scoreboard.js";
7
- import { ErrorState as i, LoadingState as a } from "../../components/LoadingState.js";
8
- import { useFixture as o, useRecordFixtureResult as ne } from "../../hooks/useAthleteBridgeApi.js";
9
- import { useScheduledTimeGate as s } from "../../hooks/useScheduledTimeGate.js";
4
+ import { FIXTURE_TYPE_LABELS as r } from "../../components/domain.js";
5
+ import { Crest as i } from "../../components/Crest.js";
6
+ import { Scoreboard as a } from "../../components/Scoreboard.js";
7
+ import { ErrorState as o, LoadingState as s } from "../../components/LoadingState.js";
8
+ import { useFixture as c, useRecordFixtureResult as l } from "../../hooks/useAthleteBridgeApi.js";
9
+ import { useScheduledTimeGate as u } from "../../hooks/useScheduledTimeGate.js";
10
10
  import "../../hooks/index.js";
11
- import { FormField as c, fieldInputClass as l } from "../../components/form.js";
12
- import { AvailabilityRsvpControl as re } from "../../components/availability/AvailabilityRsvpControl.js";
13
- import { AvailabilityRosterPanel as u } from "../../components/availability/AvailabilityRosterPanel.js";
14
- import { buildCricketResultInput as ie, buildRecordResultInput as d, parseScoreInput as f } from "../../utils/recordResult.js";
15
- import { useState as p } from "react";
16
- import { ArrowLeft as ae, Flag as oe, Loader2 as se, Minus as m, Trophy as h } from "lucide-react";
17
- import { useParams as ce } from "react-router";
18
- import { Fragment as le, jsx as g, jsxs as _ } from "react/jsx-runtime";
19
- import { EmphasisPanel as v, GlassCard as y } from "@burdenoff/fe-libs/ui";
11
+ import { FormField as d, fieldInputClass as f } from "../../components/form.js";
12
+ import { AvailabilityRsvpControl as p } from "../../components/availability/AvailabilityRsvpControl.js";
13
+ import { AvailabilityRosterPanel as m } from "../../components/availability/AvailabilityRosterPanel.js";
14
+ import { buildRecordResultInput as h, parseScoreInput as g } from "../../utils/recordResult.js";
15
+ import { useState as _ } from "react";
16
+ import { ArrowLeft as v, Flag as y, Loader2 as b, Minus as x, Trophy as S } from "lucide-react";
17
+ import { useParams as C } from "react-router";
18
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
19
+ import { EmphasisPanel as D, GlassCard as O } from "@burdenoff/fe-libs/ui";
20
20
  //#region src/atheletebridge/pages/fixtures/FixtureDetailPage.tsx
21
- function b() {
22
- let b = e(), { id: x } = ce(), { navigateTo: S } = t(), C = o(x), w = ne(), [T, E] = p(""), [D, O] = p(""), [k, A] = p(""), [j, M] = p(""), [N, P] = p(""), [F, I] = p(""), [L, R] = p({
23
- homeRuns: "",
24
- homeWickets: "",
25
- homeOvers: "",
26
- homeBalls: "",
27
- awayRuns: "",
28
- awayWickets: "",
29
- awayOvers: "",
30
- awayBalls: "",
31
- winner: "HOME",
32
- decidedBy: "RUNS",
33
- margin: "",
34
- superOver: !1,
35
- dls: !1
36
- }), [z, B] = p(null), V = s(C.data?.scheduledAt), H = (e, t) => R((n) => ({
37
- ...n,
38
- [e]: t
39
- })), U = () => R({
21
+ function k() {
22
+ let k = e(), { id: A } = C(), { navigateTo: j } = t(), M = c(A), N = l(), [P, F] = _(""), [I, L] = _(""), [R, z] = _(""), [B, V] = _(""), [H, U] = _(""), [W, G] = _(""), [ee, te] = _({
40
23
  homeRuns: "",
41
24
  homeWickets: "",
42
25
  homeOvers: "",
@@ -50,486 +33,210 @@ function b() {
50
33
  margin: "",
51
34
  superOver: !1,
52
35
  dls: !1
36
+ }), [K, q] = _(null), J = u(M.data?.scheduledAt);
37
+ if (M.isLoading) return /* @__PURE__ */ T(n, {
38
+ title: k("atheletebridge.pages.fixtureDetail.title", "Fixture"),
39
+ children: /* @__PURE__ */ T(s, { label: k("atheletebridge.pages.fixtureDetail.loading", "Loading fixture…") })
53
40
  });
54
- if (C.isLoading) return /* @__PURE__ */ g(n, {
55
- title: b("atheletebridge.pages.fixtureDetail.title", "Fixture"),
56
- children: /* @__PURE__ */ g(a, { label: b("atheletebridge.pages.fixtureDetail.loading", "Loading fixture…") })
57
- });
58
- if (C.isError || !C.data) return /* @__PURE__ */ g(n, {
59
- title: b("atheletebridge.pages.fixtureDetail.title", "Fixture"),
60
- children: /* @__PURE__ */ g(i, {
61
- title: b("atheletebridge.pages.fixtureDetail.notFoundTitle", "Fixture not found"),
62
- message: b("atheletebridge.pages.fixtureDetail.notFoundMessage", "This fixture does not exist or you do not have access to it."),
63
- onRetry: () => S("/fixtures")
41
+ if (M.isError || !M.data) return /* @__PURE__ */ T(n, {
42
+ title: k("atheletebridge.pages.fixtureDetail.title", "Fixture"),
43
+ children: /* @__PURE__ */ T(o, {
44
+ title: k("atheletebridge.pages.fixtureDetail.notFoundTitle", "Fixture not found"),
45
+ message: k("atheletebridge.pages.fixtureDetail.notFoundMessage", "This fixture does not exist or you do not have access to it."),
46
+ onRetry: () => j("/fixtures")
64
47
  })
65
48
  });
66
- let W = C.data, G = W.homeTeam?.name ?? b("atheletebridge.pages.fixtureDetail.home", "Home"), K = W.awayTeam?.name ?? (W.awayTeamId ? b("atheletebridge.pages.fixtureDetail.away", "Away") : "TBD"), q = !!W.awayTeamId && (W.status === "SCHEDULED" || W.status === "LIVE"), ue = q && V, de = q && !V, J = W.homeTeam?.sport === "CRICKET", Y = f(T), X = f(D), Z = Y !== null && X !== null && Y === X, fe = k !== "" || j !== "", Q = f(k), $ = f(j), pe = Z && (!fe || Q !== null && $ !== null && Q === $);
67
- return /* @__PURE__ */ _(n, {
68
- title: `${G} vs ${K}`,
69
- description: `${ee[W.type]}${W.competition ? ` · ${W.competition}` : ""}`,
70
- actions: /* @__PURE__ */ _("button", {
49
+ let Y = M.data, X = Y.homeTeam?.name ?? k("atheletebridge.pages.fixtureDetail.home", "Home"), Z = Y.awayTeam?.name ?? (Y.awayTeamId ? k("atheletebridge.pages.fixtureDetail.away", "Away") : "TBD"), Q = !!Y.awayTeamId && (Y.status === "SCHEDULED" || Y.status === "LIVE"), $ = Q && J, ne = Q && !J;
50
+ return g(P), g(I), g(R), g(B), /* @__PURE__ */ E(n, {
51
+ title: `${X} vs ${Z}`,
52
+ description: `${r[Y.type]}${Y.competition ? ` · ${Y.competition}` : ""}`,
53
+ actions: /* @__PURE__ */ E("button", {
71
54
  type: "button",
72
- onClick: () => S("/fixtures"),
55
+ onClick: () => j("/fixtures"),
73
56
  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",
74
57
  children: [
75
- /* @__PURE__ */ g(ae, { className: "h-4 w-4" }),
58
+ /* @__PURE__ */ T(v, { className: "h-4 w-4" }),
76
59
  " ",
77
- b("atheletebridge.pages.fixtureDetail.back", "Back")
60
+ k("atheletebridge.pages.fixtureDetail.back", "Back")
78
61
  ]
79
62
  }),
80
63
  children: [
81
- /* @__PURE__ */ g(te, {
82
- fixture: W,
64
+ /* @__PURE__ */ T(a, {
65
+ fixture: Y,
83
66
  variant: "hero",
84
67
  className: "mb-8"
85
68
  }),
86
- /* @__PURE__ */ _("div", {
69
+ /* @__PURE__ */ E("div", {
87
70
  className: "mb-8 grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_2fr]",
88
- children: [/* @__PURE__ */ g(re, {
89
- teamId: W.homeTeamId,
90
- fixtureId: W.id
91
- }), /* @__PURE__ */ g(u, {
92
- teamId: W.homeTeamId,
93
- fixtureId: W.id
71
+ children: [/* @__PURE__ */ T(p, {
72
+ teamId: Y.homeTeamId,
73
+ fixtureId: Y.id
74
+ }), /* @__PURE__ */ T(m, {
75
+ teamId: Y.homeTeamId,
76
+ fixtureId: Y.id
94
77
  })]
95
78
  }),
96
- W.notes && /* @__PURE__ */ _(v, {
79
+ Y.notes && /* @__PURE__ */ E(D, {
97
80
  className: "mb-8",
98
- children: [/* @__PURE__ */ g("h2", {
81
+ children: [/* @__PURE__ */ T("h2", {
99
82
  className: "mb-2 text-sm font-semibold text-text-primary",
100
- children: b("atheletebridge.pages.fixtureDetail.notes", "Notes")
101
- }), /* @__PURE__ */ g("p", {
83
+ children: k("atheletebridge.pages.fixtureDetail.notes", "Notes")
84
+ }), /* @__PURE__ */ T("p", {
102
85
  className: "text-sm text-text-secondary",
103
- children: W.notes
86
+ children: Y.notes
104
87
  })]
105
88
  }),
106
- de && /* @__PURE__ */ g(v, {
89
+ ne && /* @__PURE__ */ T(D, {
107
90
  className: "mb-8",
108
- children: /* @__PURE__ */ g("p", {
91
+ children: /* @__PURE__ */ T("p", {
109
92
  className: "text-sm text-text-secondary",
110
- children: b("atheletebridge.pages.fixtureDetail.recordResultUnavailable", "A result can be recorded once this fixture has started — after its scheduled date and time.")
93
+ children: k("atheletebridge.pages.fixtureDetail.recordResultUnavailable", "A result can be recorded once this fixture has started — after its scheduled date and time.")
111
94
  })
112
95
  }),
113
- ue && /* @__PURE__ */ _("section", {
96
+ $ && /* @__PURE__ */ E("section", {
114
97
  className: "mb-8",
115
- children: [/* @__PURE__ */ _("h2", {
98
+ children: [/* @__PURE__ */ E("h2", {
116
99
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
117
100
  children: [
118
- /* @__PURE__ */ g(oe, { className: "h-5 w-5" }),
101
+ /* @__PURE__ */ T(y, { className: "h-5 w-5" }),
119
102
  " ",
120
- b("atheletebridge.pages.fixtureDetail.recordResult", "Record result")
103
+ k("atheletebridge.pages.fixtureDetail.recordResult", "Record result")
121
104
  ]
122
- }), /* @__PURE__ */ _(y, {
105
+ }), /* @__PURE__ */ E(O, {
123
106
  treatment: "insight",
124
107
  className: "p-5 sm:p-6",
125
108
  children: [
126
- /* @__PURE__ */ g("p", {
109
+ /* @__PURE__ */ T("p", {
127
110
  className: "mb-5 text-sm text-text-secondary",
128
- children: b("atheletebridge.pages.fixtureDetail.recordResultDescription", "Recording a final score marks this fixture Completed and recomputes the competition standings for both teams.")
111
+ children: k("atheletebridge.pages.fixtureDetail.recordResultDescription", "Recording a final score marks this fixture Completed and recomputes the competition standings for both teams.")
129
112
  }),
130
- /* @__PURE__ */ _("form", {
113
+ /* @__PURE__ */ E("form", {
131
114
  onSubmit: async (e) => {
132
- if (e.preventDefault(), B(null), !x) return;
133
- if (J) {
134
- let e = ie({ ...L }, {
135
- required: b("atheletebridge.pages.fixtureDetail.cricketRequired", "All innings scores, overs and the margin are required."),
136
- negative: b("atheletebridge.pages.fixtureDetail.cricketNegative", "Scores and overs cannot be negative."),
137
- wicketsRange: b("atheletebridge.pages.fixtureDetail.cricketWicketsRange", "Wickets must be between 0 and 10."),
138
- ballsRange: b("atheletebridge.pages.fixtureDetail.cricketBallsRange", "Balls must be between 0 and 5."),
139
- marginMinimum: b("atheletebridge.pages.fixtureDetail.cricketMarginMinimum", "The margin must be at least 1."),
140
- wicketMarginMax: b("atheletebridge.pages.fixtureDetail.cricketWicketMarginMax", "A win by wickets cannot exceed a margin of 10.")
141
- });
142
- if (!e.ok) {
143
- B(e.error);
144
- return;
145
- }
146
- try {
147
- await w.mutateAsync({
148
- id: x,
149
- input: e.input
150
- }), U();
151
- } catch (e) {
152
- B(e instanceof Error ? e.message : b("atheletebridge.pages.fixtureDetail.recordFailed", "Failed to record result."));
153
- }
154
- return;
155
- }
156
- let t = d({
157
- homeScore: T,
158
- awayScore: D,
159
- extraTimeHome: k,
160
- extraTimeAway: j,
161
- penaltyHome: N,
162
- penaltyAway: F
115
+ if (e.preventDefault(), q(null), !A) return;
116
+ let t = h({
117
+ homeScore: P,
118
+ awayScore: I,
119
+ extraTimeHome: R,
120
+ extraTimeAway: B,
121
+ penaltyHome: H,
122
+ penaltyAway: W
163
123
  }, {
164
- scoresRequired: b("atheletebridge.pages.fixtureDetail.scoresRequired", "Both scores are required and must be numbers."),
165
- scoresNegative: b("atheletebridge.pages.fixtureDetail.scoresNegative", "Scores cannot be negative."),
166
- extraTimePair: b("atheletebridge.pages.fixtureDetail.extraTimePair", "Enter both extra-time scores."),
167
- extraTimeNumeric: b("atheletebridge.pages.fixtureDetail.extraTimeNumeric", "Extra-time scores must be numbers."),
168
- extraTimeNegative: b("atheletebridge.pages.fixtureDetail.extraTimeNegative", "Extra-time scores cannot be negative."),
169
- penaltyPair: b("atheletebridge.pages.fixtureDetail.penaltyPair", "Enter both penalty scores."),
170
- penaltyNumeric: b("atheletebridge.pages.fixtureDetail.penaltyNumeric", "Penalty scores must be numbers."),
171
- penaltyNegative: b("atheletebridge.pages.fixtureDetail.penaltyNegative", "Penalty scores cannot be negative."),
172
- extraTimeDecided: b("atheletebridge.pages.fixtureDetail.extraTimeDecided", "Extra time decided the tie — leave the penalty shootout empty."),
173
- extraTimeLevel: b("atheletebridge.pages.fixtureDetail.extraTimeLevel", "Still level after extra time — record the penalty shootout."),
174
- penaltyLevel: b("atheletebridge.pages.fixtureDetail.penaltyLevel", "Penalty scores must have a winner.")
124
+ scoresRequired: k("atheletebridge.pages.fixtureDetail.scoresRequired", "Both scores are required and must be numbers."),
125
+ scoresNegative: k("atheletebridge.pages.fixtureDetail.scoresNegative", "Scores cannot be negative."),
126
+ extraTimePair: k("atheletebridge.pages.fixtureDetail.extraTimePair", "Enter both extra-time scores."),
127
+ extraTimeNumeric: k("atheletebridge.pages.fixtureDetail.extraTimeNumeric", "Extra-time scores must be numbers."),
128
+ extraTimeNegative: k("atheletebridge.pages.fixtureDetail.extraTimeNegative", "Extra-time scores cannot be negative."),
129
+ penaltyPair: k("atheletebridge.pages.fixtureDetail.penaltyPair", "Enter both penalty scores."),
130
+ penaltyNumeric: k("atheletebridge.pages.fixtureDetail.penaltyNumeric", "Penalty scores must be numbers."),
131
+ penaltyNegative: k("atheletebridge.pages.fixtureDetail.penaltyNegative", "Penalty scores cannot be negative."),
132
+ extraTimeDecided: k("atheletebridge.pages.fixtureDetail.extraTimeDecided", "Extra time decided the tie — leave the penalty shootout empty."),
133
+ extraTimeLevel: k("atheletebridge.pages.fixtureDetail.extraTimeLevel", "Still level after extra time — record the penalty shootout."),
134
+ penaltyLevel: k("atheletebridge.pages.fixtureDetail.penaltyLevel", "Penalty scores must have a winner.")
175
135
  });
176
136
  if (!t.ok) {
177
- B(t.error);
137
+ q(t.error);
178
138
  return;
179
139
  }
180
140
  try {
181
- await w.mutateAsync({
182
- id: x,
141
+ await N.mutateAsync({
142
+ id: A,
183
143
  input: t.input
184
- }), E(""), O(""), A(""), M(""), P(""), I("");
144
+ }), F(""), L(""), z(""), V(""), U(""), G("");
185
145
  } catch (e) {
186
- B(e instanceof Error ? e.message : b("atheletebridge.pages.fixtureDetail.recordFailed", "Failed to record result."));
146
+ q(e instanceof Error ? e.message : k("atheletebridge.pages.fixtureDetail.recordFailed", "Failed to record result."));
187
147
  }
188
148
  },
189
- children: [J ? /* @__PURE__ */ _("div", {
190
- className: "flex flex-col items-center gap-5",
191
- children: [
192
- /* @__PURE__ */ g("p", {
193
- className: "text-center text-xs font-medium text-text-secondary",
194
- children: b("atheletebridge.pages.fixtureDetail.cricketScorecardDescription", "Record each innings score and how the match was decided — a cricket result is a margin, not a score comparison.")
195
- }),
196
- [{
197
- side: "home",
198
- name: G,
199
- sport: W.homeTeam?.sport
200
- }, {
201
- side: "away",
202
- name: K,
203
- sport: W.awayTeam?.sport
204
- }].map(({ side: e, name: t, sport: n }) => /* @__PURE__ */ _("div", {
205
- className: "flex flex-wrap items-end justify-center gap-3",
206
- children: [
207
- /* @__PURE__ */ _("div", {
208
- className: "flex flex-col items-center gap-2",
209
- children: [/* @__PURE__ */ g(r, {
210
- name: t,
211
- sport: n,
212
- size: 40
213
- }), /* @__PURE__ */ g("span", {
214
- className: "max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary",
215
- children: t
216
- })]
217
- }),
218
- /* @__PURE__ */ g(c, {
219
- label: b("atheletebridge.pages.fixtureDetail.runs", "Runs"),
220
- htmlFor: `cricket-${e}-runs`,
221
- className: "w-20",
222
- children: /* @__PURE__ */ g("input", {
223
- id: `cricket-${e}-runs`,
224
- inputMode: "numeric",
225
- className: `${l} text-center tabular-nums`,
226
- value: L[`${e}Runs`],
227
- onChange: (t) => H(`${e}Runs`, t.target.value),
228
- placeholder: "185"
229
- })
230
- }),
231
- /* @__PURE__ */ g("span", {
232
- className: "pb-3 text-lg font-bold text-text-muted",
233
- children: "/"
234
- }),
235
- /* @__PURE__ */ g(c, {
236
- label: b("atheletebridge.pages.fixtureDetail.wickets", "Wkts"),
237
- htmlFor: `cricket-${e}-wickets`,
238
- className: "w-16",
239
- children: /* @__PURE__ */ g("input", {
240
- id: `cricket-${e}-wickets`,
241
- inputMode: "numeric",
242
- className: `${l} text-center tabular-nums`,
243
- value: L[`${e}Wickets`],
244
- onChange: (t) => H(`${e}Wickets`, t.target.value),
245
- placeholder: "6"
246
- })
247
- }),
248
- /* @__PURE__ */ g(c, {
249
- label: b("atheletebridge.pages.fixtureDetail.overs", "Overs"),
250
- htmlFor: `cricket-${e}-overs`,
251
- className: "w-16",
252
- children: /* @__PURE__ */ g("input", {
253
- id: `cricket-${e}-overs`,
254
- inputMode: "numeric",
255
- className: `${l} text-center tabular-nums`,
256
- value: L[`${e}Overs`],
257
- onChange: (t) => H(`${e}Overs`, t.target.value),
258
- placeholder: "20"
259
- })
260
- }),
261
- /* @__PURE__ */ g(c, {
262
- label: b("atheletebridge.pages.fixtureDetail.balls", "Balls"),
263
- htmlFor: `cricket-${e}-balls`,
264
- className: "w-14",
265
- children: /* @__PURE__ */ g("input", {
266
- id: `cricket-${e}-balls`,
267
- inputMode: "numeric",
268
- className: `${l} text-center tabular-nums`,
269
- value: L[`${e}Balls`],
270
- onChange: (t) => H(`${e}Balls`, t.target.value),
271
- placeholder: "0"
272
- })
273
- })
274
- ]
275
- }, e)),
276
- /* @__PURE__ */ _("div", {
277
- className: "flex flex-wrap items-end justify-center gap-4",
278
- children: [
279
- /* @__PURE__ */ g(c, {
280
- label: b("atheletebridge.pages.fixtureDetail.winner", "Winner"),
281
- htmlFor: "cricket-winner",
282
- children: /* @__PURE__ */ _("select", {
283
- id: "cricket-winner",
284
- className: l,
285
- value: L.winner,
286
- onChange: (e) => H("winner", e.target.value),
287
- children: [/* @__PURE__ */ g("option", {
288
- value: "HOME",
289
- children: G
290
- }), /* @__PURE__ */ g("option", {
291
- value: "AWAY",
292
- children: K
293
- })]
294
- })
295
- }),
296
- /* @__PURE__ */ g(c, {
297
- label: b("atheletebridge.pages.fixtureDetail.decidedBy", "Decided by"),
298
- htmlFor: "cricket-decided-by",
299
- children: /* @__PURE__ */ _("select", {
300
- id: "cricket-decided-by",
301
- className: l,
302
- value: L.decidedBy,
303
- onChange: (e) => H("decidedBy", e.target.value),
304
- children: [/* @__PURE__ */ g("option", {
305
- value: "RUNS",
306
- children: b("atheletebridge.pages.fixtureDetail.runs", "Runs")
307
- }), /* @__PURE__ */ g("option", {
308
- value: "WICKETS",
309
- children: b("atheletebridge.pages.fixtureDetail.wickets", "Wkts")
310
- })]
311
- })
312
- }),
313
- /* @__PURE__ */ g(c, {
314
- label: b("atheletebridge.pages.fixtureDetail.margin", "Margin"),
315
- htmlFor: "cricket-margin",
316
- className: "w-20",
317
- children: /* @__PURE__ */ g("input", {
318
- id: "cricket-margin",
319
- inputMode: "numeric",
320
- className: `${l} text-center tabular-nums`,
321
- value: L.margin,
322
- onChange: (e) => H("margin", e.target.value),
323
- placeholder: "13"
324
- })
325
- })
326
- ]
327
- }),
328
- /* @__PURE__ */ _("div", {
329
- className: "flex items-center gap-6",
330
- children: [/* @__PURE__ */ _("label", {
331
- className: "flex items-center gap-2.5 text-sm text-text-primary",
332
- children: [/* @__PURE__ */ g("input", {
333
- type: "checkbox",
334
- checked: L.superOver,
335
- onChange: (e) => H("superOver", e.target.checked),
336
- className: "h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]"
337
- }), b("atheletebridge.pages.fixtureDetail.superOver", "Super Over")]
338
- }), /* @__PURE__ */ _("label", {
339
- className: "flex items-center gap-2.5 text-sm text-text-primary",
340
- children: [/* @__PURE__ */ g("input", {
341
- type: "checkbox",
342
- checked: L.dls,
343
- onChange: (e) => H("dls", e.target.checked),
344
- className: "h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]"
345
- }), b("atheletebridge.pages.fixtureDetail.dls", "DLS")]
346
- })]
347
- })
348
- ]
349
- }) : /* @__PURE__ */ _(le, { children: [/* @__PURE__ */ _("div", {
149
+ children: [/* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("div", {
350
150
  className: "flex flex-wrap items-end justify-center gap-4 sm:gap-6",
351
151
  children: [
352
- /* @__PURE__ */ _("div", {
152
+ /* @__PURE__ */ E("div", {
353
153
  className: "flex items-end gap-3",
354
- children: [/* @__PURE__ */ _("div", {
154
+ children: [/* @__PURE__ */ E("div", {
355
155
  className: "flex flex-col items-center gap-2",
356
- children: [/* @__PURE__ */ g(r, {
357
- name: G,
358
- sport: W.homeTeam?.sport,
156
+ children: [/* @__PURE__ */ T(i, {
157
+ name: X,
158
+ sport: Y.homeTeam?.sport,
359
159
  size: 40
360
- }), /* @__PURE__ */ g("span", {
160
+ }), /* @__PURE__ */ T("span", {
361
161
  className: "max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary",
362
- children: G
162
+ children: X
363
163
  })]
364
- }), /* @__PURE__ */ g(c, {
365
- label: b("atheletebridge.pages.fixtureDetail.home", "Home"),
164
+ }), /* @__PURE__ */ T(d, {
165
+ label: k("atheletebridge.pages.fixtureDetail.home", "Home"),
366
166
  htmlFor: "homeScore",
367
167
  className: "w-24",
368
- children: /* @__PURE__ */ g("input", {
168
+ children: /* @__PURE__ */ T("input", {
369
169
  id: "homeScore",
370
170
  inputMode: "numeric",
371
- className: `${l} text-center text-lg font-bold tabular-nums`,
372
- value: T,
373
- onChange: (e) => E(e.target.value),
171
+ className: `${f} text-center text-lg font-bold tabular-nums`,
172
+ value: P,
173
+ onChange: (e) => F(e.target.value),
374
174
  placeholder: "0"
375
175
  })
376
176
  })]
377
177
  }),
378
- /* @__PURE__ */ g(m, {
178
+ /* @__PURE__ */ T(x, {
379
179
  className: "mb-3 h-5 w-5 shrink-0 text-text-muted",
380
180
  "aria-hidden": "true"
381
181
  }),
382
- /* @__PURE__ */ _("div", {
182
+ /* @__PURE__ */ E("div", {
383
183
  className: "flex items-end gap-3",
384
- children: [/* @__PURE__ */ g(c, {
385
- label: b("atheletebridge.pages.fixtureDetail.away", "Away"),
184
+ children: [/* @__PURE__ */ T(d, {
185
+ label: k("atheletebridge.pages.fixtureDetail.away", "Away"),
386
186
  htmlFor: "awayScore",
387
187
  className: "w-24",
388
- children: /* @__PURE__ */ g("input", {
188
+ children: /* @__PURE__ */ T("input", {
389
189
  id: "awayScore",
390
190
  inputMode: "numeric",
391
- className: `${l} text-center text-lg font-bold tabular-nums`,
392
- value: D,
393
- onChange: (e) => O(e.target.value),
191
+ className: `${f} text-center text-lg font-bold tabular-nums`,
192
+ value: I,
193
+ onChange: (e) => L(e.target.value),
394
194
  placeholder: "0"
395
195
  })
396
- }), /* @__PURE__ */ _("div", {
196
+ }), /* @__PURE__ */ E("div", {
397
197
  className: "flex flex-col items-center gap-2",
398
- children: [/* @__PURE__ */ g(r, {
399
- name: K,
400
- sport: W.awayTeam?.sport,
198
+ children: [/* @__PURE__ */ T(i, {
199
+ name: Z,
200
+ sport: Y.awayTeam?.sport,
401
201
  size: 40
402
- }), /* @__PURE__ */ g("span", {
202
+ }), /* @__PURE__ */ T("span", {
403
203
  className: "max-w-[8rem] truncate text-center text-xs font-medium text-text-secondary",
404
- children: K
204
+ children: Z
405
205
  })]
406
206
  })]
407
207
  })
408
208
  ]
409
- }), Z && /* @__PURE__ */ _("div", {
410
- className: "mt-6 border-t border-border-seam pt-5",
411
- children: [/* @__PURE__ */ g("p", {
412
- className: "mb-4 text-center text-xs font-medium text-text-secondary",
413
- children: b("atheletebridge.pages.fixtureDetail.levelAtFullTime", "Level at full time — record how the tie was decided (optional).")
414
- }), /* @__PURE__ */ _("div", {
415
- className: "flex flex-col items-center gap-4",
416
- children: [/* @__PURE__ */ _("div", {
417
- className: "flex items-end justify-center gap-3",
418
- children: [
419
- /* @__PURE__ */ g("span", {
420
- className: "mb-2.5 w-16 text-right text-xs font-medium text-text-secondary",
421
- children: G
422
- }),
423
- /* @__PURE__ */ g(c, {
424
- label: b("atheletebridge.pages.fixtureDetail.extraTime", "Extra time"),
425
- htmlFor: "extraTimeHome",
426
- className: "w-20",
427
- children: /* @__PURE__ */ g("input", {
428
- id: "extraTimeHome",
429
- inputMode: "numeric",
430
- className: `${l} text-center tabular-nums`,
431
- value: k,
432
- onChange: (e) => A(e.target.value),
433
- placeholder: "–"
434
- })
435
- }),
436
- /* @__PURE__ */ g(m, {
437
- className: "mb-3 h-4 w-4 shrink-0 text-text-muted",
438
- "aria-hidden": "true"
439
- }),
440
- /* @__PURE__ */ g(c, {
441
- label: "\xA0",
442
- htmlFor: "extraTimeAway",
443
- className: "w-20",
444
- children: /* @__PURE__ */ g("input", {
445
- id: "extraTimeAway",
446
- inputMode: "numeric",
447
- className: `${l} text-center tabular-nums`,
448
- value: j,
449
- onChange: (e) => M(e.target.value),
450
- placeholder: "–"
451
- })
452
- }),
453
- /* @__PURE__ */ g("span", {
454
- className: "mb-2.5 w-16 truncate text-xs font-medium text-text-secondary",
455
- children: K
456
- })
457
- ]
458
- }), pe && /* @__PURE__ */ _("div", {
459
- className: "flex items-end justify-center gap-3",
460
- children: [
461
- /* @__PURE__ */ g("span", {
462
- className: "mb-2.5 w-16 text-right text-xs font-medium text-text-secondary",
463
- children: G
464
- }),
465
- /* @__PURE__ */ g(c, {
466
- label: b("atheletebridge.pages.fixtureDetail.penaltyShootout", "Penalties"),
467
- htmlFor: "penaltyHome",
468
- className: "w-20",
469
- children: /* @__PURE__ */ g("input", {
470
- id: "penaltyHome",
471
- inputMode: "numeric",
472
- className: `${l} text-center tabular-nums`,
473
- value: N,
474
- onChange: (e) => P(e.target.value),
475
- placeholder: "–"
476
- })
477
- }),
478
- /* @__PURE__ */ g(m, {
479
- className: "mb-3 h-4 w-4 shrink-0 text-text-muted",
480
- "aria-hidden": "true"
481
- }),
482
- /* @__PURE__ */ g(c, {
483
- label: "\xA0",
484
- htmlFor: "penaltyAway",
485
- className: "w-20",
486
- children: /* @__PURE__ */ g("input", {
487
- id: "penaltyAway",
488
- inputMode: "numeric",
489
- className: `${l} text-center tabular-nums`,
490
- value: F,
491
- onChange: (e) => I(e.target.value),
492
- placeholder: "–"
493
- })
494
- }),
495
- /* @__PURE__ */ g("span", {
496
- className: "mb-2.5 w-16 truncate text-xs font-medium text-text-secondary",
497
- children: K
498
- })
499
- ]
500
- })]
501
- })]
502
- })] }), /* @__PURE__ */ g("div", {
209
+ }), !1] }), /* @__PURE__ */ T("div", {
503
210
  className: "mt-6 flex justify-center",
504
- children: /* @__PURE__ */ _("button", {
211
+ children: /* @__PURE__ */ E("button", {
505
212
  type: "submit",
506
- disabled: w.isPending,
213
+ disabled: N.isPending,
507
214
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-6 py-2.5 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
508
- children: [w.isPending ? /* @__PURE__ */ g(se, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ g(h, { className: "h-4 w-4" }), b("atheletebridge.pages.fixtureDetail.recordResultAction", "Record result")]
215
+ children: [N.isPending ? /* @__PURE__ */ T(b, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(S, { className: "h-4 w-4" }), k("atheletebridge.pages.fixtureDetail.recordResultAction", "Record result")]
509
216
  })
510
217
  })]
511
218
  }),
512
- z && /* @__PURE__ */ g("p", {
219
+ K && /* @__PURE__ */ T("p", {
513
220
  className: "mt-3 text-center text-sm text-status-error-text",
514
- children: z
221
+ children: K
515
222
  })
516
223
  ]
517
224
  })]
518
225
  }),
519
- W.competition && /* @__PURE__ */ _("button", {
226
+ Y.competition && /* @__PURE__ */ E("button", {
520
227
  type: "button",
521
- onClick: () => S(`/standings?competition=${encodeURIComponent(W.competition ?? "")}`),
228
+ onClick: () => j(`/standings?competition=${encodeURIComponent(Y.competition ?? "")}`),
522
229
  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",
523
230
  children: [
524
- /* @__PURE__ */ g(h, { className: "h-4 w-4" }),
231
+ /* @__PURE__ */ T(S, { className: "h-4 w-4" }),
525
232
  " ",
526
- b("atheletebridge.pages.fixtureDetail.viewStandings", `View ${W.competition} standings`)
233
+ k("atheletebridge.pages.fixtureDetail.viewStandings", `View ${Y.competition} standings`)
527
234
  ]
528
235
  })
529
236
  ]
530
237
  });
531
238
  }
532
239
  //#endregion
533
- export { b as FixtureDetailPage };
240
+ export { k as FixtureDetailPage };
534
241
 
535
242
  //# sourceMappingURL=FixtureDetailPage.js.map