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