@burdenoff/microfe-atheletebridge 2026.827.1 → 2026.829.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 (46) hide show
  1. package/dist/atheletebridge/components/LoadingState.d.ts.map +1 -1
  2. package/dist/atheletebridge/components/LoadingState.js +39 -32
  3. package/dist/atheletebridge/components/LoadingState.js.map +1 -1
  4. package/dist/atheletebridge/components/TeamCard.d.ts.map +1 -1
  5. package/dist/atheletebridge/components/TeamCard.js +45 -49
  6. package/dist/atheletebridge/components/TeamCard.js.map +1 -1
  7. package/dist/atheletebridge/pages/DashboardPage.d.ts.map +1 -1
  8. package/dist/atheletebridge/pages/DashboardPage.js +56 -24
  9. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -1
  10. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.d.ts.map +1 -1
  11. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js +58 -56
  12. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js.map +1 -1
  13. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts.map +1 -1
  14. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +110 -106
  15. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
  16. package/dist/atheletebridge/pages/fixtures/FixturesListPage.d.ts.map +1 -1
  17. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +80 -71
  18. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -1
  19. package/dist/atheletebridge/pages/onboarding/OnboardingPage.d.ts.map +1 -1
  20. package/dist/atheletebridge/pages/onboarding/OnboardingPage.js +244 -210
  21. package/dist/atheletebridge/pages/onboarding/OnboardingPage.js.map +1 -1
  22. package/dist/atheletebridge/pages/performance/PerformancePage.d.ts.map +1 -1
  23. package/dist/atheletebridge/pages/performance/PerformancePage.js +197 -148
  24. package/dist/atheletebridge/pages/performance/PerformancePage.js.map +1 -1
  25. package/dist/atheletebridge/pages/programs/ProgramDetailPage.d.ts.map +1 -1
  26. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +169 -143
  27. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
  28. package/dist/atheletebridge/pages/programs/ProgramsListPage.d.ts.map +1 -1
  29. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +77 -72
  30. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -1
  31. package/dist/atheletebridge/pages/sessions/SessionDetailPage.d.ts.map +1 -1
  32. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +104 -86
  33. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -1
  34. package/dist/atheletebridge/pages/sessions/SessionsListPage.d.ts.map +1 -1
  35. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +54 -49
  36. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
  37. package/dist/atheletebridge/pages/teams/TeamDetailPage.d.ts.map +1 -1
  38. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +286 -267
  39. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
  40. package/dist/atheletebridge/pages/teams/TeamFormPage.d.ts.map +1 -1
  41. package/dist/atheletebridge/pages/teams/TeamFormPage.js +185 -180
  42. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -1
  43. package/dist/atheletebridge/pages/teams/TeamsListPage.d.ts.map +1 -1
  44. package/dist/atheletebridge/pages/teams/TeamsListPage.js +70 -74
  45. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -1
  46. package/package.json +1 -1
@@ -1,53 +1,54 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { SPORT_ICONS as n, SPORT_LABELS as r } from "../../components/domain.js";
4
- import { UserAvatar as i } from "../../components/UserAvatar.js";
5
- import { ErrorState as a, LoadingState as o } from "../../components/LoadingState.js";
6
- import { directoryUserName as s, useCreateTeam as c, useTeam as l, useUpdateTeam as u, useUserDirectory as d, useUserSearch as f } from "../../hooks/useAthleteBridgeApi.js";
7
- import { FormField as p, fieldInputClass as m } from "../../components/form.js";
8
- import { useEffect as h, useState as g } from "react";
9
- import { ArrowLeft as _, CalendarDays as v, Loader2 as y, MapPin as b, Save as x, Search as S, X as C } from "lucide-react";
10
- import { useParams as w } from "react-router";
11
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
12
- import { GlassCard as D } from "@burdenoff/fe-libs/ui";
1
+ import { useAbTranslate as e } from "../../i18n.js";
2
+ import { useAthleteBridge as t } from "../../context/AthleteBridgeContext.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { SPORT_ICONS as r, SPORT_LABELS as i } from "../../components/domain.js";
5
+ import { UserAvatar as a } from "../../components/UserAvatar.js";
6
+ import { ErrorState as o, LoadingState as s } from "../../components/LoadingState.js";
7
+ import { directoryUserName as c, useCreateTeam as l, useTeam as u, useUpdateTeam as d, useUserDirectory as f, useUserSearch as p } from "../../hooks/useAthleteBridgeApi.js";
8
+ import { FormField as m, fieldInputClass as h } from "../../components/form.js";
9
+ import { useEffect as g, useState as _ } from "react";
10
+ import { ArrowLeft as v, CalendarDays as y, Loader2 as b, MapPin as x, Save as S, Search as C, X as w } from "lucide-react";
11
+ import { useParams as T } from "react-router";
12
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
13
+ import { GlassCard as O } from "@burdenoff/fe-libs/ui";
13
14
  //#region src/atheletebridge/pages/teams/TeamFormPage.tsx
14
- var O = Object.keys(r), k = [
15
+ var k = Object.keys(i), A = [
15
16
  "FORMING",
16
17
  "ACTIVE",
17
18
  "INACTIVE",
18
19
  "ARCHIVED"
19
- ], A = 300;
20
- function j({ sport: e }) {
21
- let t = n[e];
22
- return /* @__PURE__ */ T(t, {
20
+ ], j = 300;
21
+ function M({ sport: e }) {
22
+ let t = r[e];
23
+ return /* @__PURE__ */ E(t, {
23
24
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted",
24
25
  "aria-hidden": "true"
25
26
  });
26
27
  }
27
- function M({ userId: e, displayName: t, onSelect: n }) {
28
- let [r, a] = g(""), o = f(r), c = o.data ?? [], l = r.trim().length >= 2, u = o.isError;
29
- return e ? /* @__PURE__ */ T(p, {
28
+ function N({ userId: e, displayName: t, onSelect: n }) {
29
+ let [r, i] = _(""), o = p(r), s = o.data ?? [], l = r.trim().length >= 2, u = o.isError;
30
+ return e ? /* @__PURE__ */ E(m, {
30
31
  label: "Head coach",
31
32
  hint: "Optional — the coach who leads this squad.",
32
- children: /* @__PURE__ */ E("div", {
33
+ children: /* @__PURE__ */ D("div", {
33
34
  className: "flex items-center gap-2.5 rounded-lg border border-border-seam bg-bg-surface px-3 py-2",
34
35
  children: [
35
- /* @__PURE__ */ T(i, {
36
+ /* @__PURE__ */ E(a, {
36
37
  name: t,
37
38
  id: e,
38
39
  size: "sm"
39
40
  }),
40
- /* @__PURE__ */ E("div", {
41
+ /* @__PURE__ */ D("div", {
41
42
  className: "min-w-0 flex-1",
42
- children: [/* @__PURE__ */ T("p", {
43
+ children: [/* @__PURE__ */ E("p", {
43
44
  className: "truncate text-sm font-medium text-text-primary",
44
45
  children: t || "Selected coach"
45
- }), /* @__PURE__ */ T("p", {
46
+ }), /* @__PURE__ */ E("p", {
46
47
  className: "truncate text-xs text-text-secondary",
47
48
  children: e
48
49
  })]
49
50
  }),
50
- /* @__PURE__ */ T("button", {
51
+ /* @__PURE__ */ E("button", {
51
52
  type: "button",
52
53
  "aria-label": "Clear head coach",
53
54
  onClick: () => n({
@@ -55,17 +56,17 @@ function M({ userId: e, displayName: t, onSelect: n }) {
55
56
  displayName: ""
56
57
  }),
57
58
  className: "rounded-md p-1 text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary",
58
- children: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
59
+ children: /* @__PURE__ */ E(w, { className: "h-4 w-4" })
59
60
  })
60
61
  ]
61
62
  })
62
- }) : u ? /* @__PURE__ */ T(p, {
63
+ }) : u ? /* @__PURE__ */ E(m, {
63
64
  label: "Head coach",
64
65
  htmlFor: "headCoachId",
65
66
  hint: "Optional — directory unavailable here; paste the auth-svc user id.",
66
- children: /* @__PURE__ */ T("input", {
67
+ children: /* @__PURE__ */ E("input", {
67
68
  id: "headCoachId",
68
- className: m,
69
+ className: h,
69
70
  value: e,
70
71
  onChange: (e) => n({
71
72
  userId: e.target.value,
@@ -73,30 +74,30 @@ function M({ userId: e, displayName: t, onSelect: n }) {
73
74
  }),
74
75
  placeholder: "user-uuid"
75
76
  })
76
- }) : /* @__PURE__ */ T(p, {
77
+ }) : /* @__PURE__ */ E(m, {
77
78
  label: "Head coach",
78
79
  hint: "Optional — the coach who leads this squad.",
79
- children: /* @__PURE__ */ E("div", {
80
+ children: /* @__PURE__ */ D("div", {
80
81
  className: "space-y-2",
81
82
  children: [
82
- /* @__PURE__ */ E("div", {
83
+ /* @__PURE__ */ D("div", {
83
84
  className: "relative",
84
85
  children: [
85
- /* @__PURE__ */ T(S, {
86
+ /* @__PURE__ */ E(C, {
86
87
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted",
87
88
  "aria-hidden": "true"
88
89
  }),
89
- /* @__PURE__ */ T("input", {
90
- className: `${m} pl-9`,
90
+ /* @__PURE__ */ E("input", {
91
+ className: `${h} pl-9`,
91
92
  value: r,
92
- onChange: (e) => a(e.target.value),
93
+ onChange: (e) => i(e.target.value),
93
94
  placeholder: "Search coaches by name or email…",
94
95
  "aria-label": "Search for a head coach"
95
96
  }),
96
- o.isFetching && /* @__PURE__ */ T(y, { className: "absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-text-muted" })
97
+ o.isFetching && /* @__PURE__ */ E(b, { className: "absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 animate-spin text-text-muted" })
97
98
  ]
98
99
  }),
99
- l && !o.isFetching && c.length === 0 && /* @__PURE__ */ E("p", {
100
+ l && !o.isFetching && s.length === 0 && /* @__PURE__ */ D("p", {
100
101
  className: "text-xs text-text-secondary",
101
102
  children: [
102
103
  "No users match “",
@@ -104,27 +105,27 @@ function M({ userId: e, displayName: t, onSelect: n }) {
104
105
  "”."
105
106
  ]
106
107
  }),
107
- c.length > 0 && /* @__PURE__ */ T("ul", {
108
+ s.length > 0 && /* @__PURE__ */ E("ul", {
108
109
  className: "max-h-56 divide-y divide-border-seam overflow-auto rounded-lg border border-border-seam bg-bg-surface",
109
- children: c.map((e) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ E("button", {
110
+ children: s.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D("button", {
110
111
  type: "button",
111
112
  onClick: () => {
112
113
  n({
113
114
  userId: e.id,
114
- displayName: s(e)
115
- }), a("");
115
+ displayName: c(e)
116
+ }), i("");
116
117
  },
117
118
  className: "flex w-full items-center gap-2.5 px-3 py-2 text-left transition-colors hover:bg-bg-sunken",
118
- children: [/* @__PURE__ */ T(i, {
119
- name: s(e),
119
+ children: [/* @__PURE__ */ E(a, {
120
+ name: c(e),
120
121
  id: e.id,
121
122
  size: "sm"
122
- }), /* @__PURE__ */ E("span", {
123
+ }), /* @__PURE__ */ D("span", {
123
124
  className: "min-w-0 flex-1",
124
- children: [/* @__PURE__ */ T("span", {
125
+ children: [/* @__PURE__ */ E("span", {
125
126
  className: "block truncate text-sm font-medium text-text-primary",
126
- children: s(e)
127
- }), /* @__PURE__ */ T("span", {
127
+ children: c(e)
128
+ }), /* @__PURE__ */ E("span", {
128
129
  className: "block truncate text-xs text-text-secondary",
129
130
  children: e.email
130
131
  })]
@@ -135,7 +136,7 @@ function M({ userId: e, displayName: t, onSelect: n }) {
135
136
  })
136
137
  });
137
138
  }
138
- var N = {
139
+ var P = {
139
140
  name: "",
140
141
  sport: "OTHER",
141
142
  status: "FORMING",
@@ -147,11 +148,11 @@ var N = {
147
148
  headCoachName: "",
148
149
  tags: []
149
150
  };
150
- function P() {
151
- let { id: n } = w(), i = !!n, { navigateTo: s } = e(), f = l(n), S = c(), P = u(), [F, I] = g(N), [L, R] = g(""), [z, B] = g(null), V = d(i ? [f.data?.headCoachId] : []).nameOf(f.data?.headCoachId ?? void 0);
152
- h(() => {
153
- let e = f.data;
154
- i && e && I((t) => ({
151
+ function F() {
152
+ let r = e(), { id: a } = T(), c = !!a, { navigateTo: p } = t(), C = u(a), F = l(), I = d(), [L, R] = _(P), [z, B] = _(""), [V, H] = _(null), U = f(c ? [C.data?.headCoachId] : []).nameOf(C.data?.headCoachId ?? void 0);
153
+ g(() => {
154
+ let e = C.data;
155
+ c && e && R((t) => ({
155
156
  name: e.name,
156
157
  sport: e.sport,
157
158
  status: e.status,
@@ -160,247 +161,251 @@ function P() {
160
161
  season: e.season ?? "",
161
162
  homeVenue: e.homeVenue ?? "",
162
163
  headCoachId: e.headCoachId ?? "",
163
- headCoachName: V ?? t.headCoachName,
164
+ headCoachName: U ?? t.headCoachName,
164
165
  tags: e.tags
165
166
  }));
166
167
  }, [
167
- i,
168
- f.data,
169
- V
168
+ c,
169
+ C.data,
170
+ U
170
171
  ]);
171
- let H = (e, t) => I((n) => ({
172
+ let W = (e, t) => R((n) => ({
172
173
  ...n,
173
174
  [e]: t
174
- })), U = (e) => {
175
+ })), G = (e) => {
175
176
  let t = e.trim();
176
- t && (I((e) => e.tags.some((e) => e.toLowerCase() === t.toLowerCase()) ? e : {
177
+ t && (R((e) => e.tags.some((e) => e.toLowerCase() === t.toLowerCase()) ? e : {
177
178
  ...e,
178
179
  tags: [...e.tags, t]
179
- }), R(""));
180
- }, W = (e) => I((t) => ({
180
+ }), B(""));
181
+ }, K = (e) => R((t) => ({
181
182
  ...t,
182
183
  tags: t.tags.filter((t) => t !== e)
183
- })), G = (e) => {
184
- e.key === "Enter" || e.key === "," ? (e.preventDefault(), U(L)) : e.key === "Backspace" && !L && F.tags.length && W(F.tags[F.tags.length - 1]);
185
- }, K = async (e) => {
186
- if (e.preventDefault(), B(null), !F.name.trim()) {
187
- B("Team name is required.");
184
+ })), q = (e) => {
185
+ e.key === "Enter" || e.key === "," ? (e.preventDefault(), G(z)) : e.key === "Backspace" && !z && L.tags.length && K(L.tags[L.tags.length - 1]);
186
+ }, J = async (e) => {
187
+ if (e.preventDefault(), H(null), !L.name.trim()) {
188
+ H("Team name is required.");
188
189
  return;
189
190
  }
190
- let t = L.trim(), r = t && !F.tags.some((e) => e.toLowerCase() === t.toLowerCase()) ? [...F.tags, t] : F.tags, a = {
191
- name: F.name.trim(),
192
- sport: F.sport,
193
- status: F.status,
194
- description: F.description.trim() || void 0,
195
- ageGroup: F.ageGroup.trim() || void 0,
196
- season: F.season.trim() || void 0,
197
- homeVenue: F.homeVenue.trim() || void 0,
198
- headCoachId: F.headCoachId.trim() || void 0,
199
- tags: r
191
+ let t = z.trim(), n = t && !L.tags.some((e) => e.toLowerCase() === t.toLowerCase()) ? [...L.tags, t] : L.tags, r = {
192
+ name: L.name.trim(),
193
+ sport: L.sport,
194
+ status: L.status,
195
+ description: L.description.trim() || void 0,
196
+ ageGroup: L.ageGroup.trim() || void 0,
197
+ season: L.season.trim() || void 0,
198
+ homeVenue: L.homeVenue.trim() || void 0,
199
+ headCoachId: L.headCoachId.trim() || void 0,
200
+ tags: n
200
201
  };
201
202
  try {
202
- i && n ? (await P.mutateAsync({
203
- id: n,
204
- input: a
205
- }), s(`/teams/${n}`)) : s(`/teams/${(await S.mutateAsync(a)).id}`);
203
+ c && a ? (await I.mutateAsync({
204
+ id: a,
205
+ input: r
206
+ }), p(`/teams/${a}`)) : p(`/teams/${(await F.mutateAsync(r)).id}`);
206
207
  } catch (e) {
207
- B(e instanceof Error ? e.message : "Failed to save team.");
208
+ H(e instanceof Error ? e.message : "Failed to save team.");
208
209
  }
209
- }, q = S.isPending || P.isPending;
210
- return i && f.isLoading ? /* @__PURE__ */ T(t, {
211
- title: "Edit team",
212
- children: /* @__PURE__ */ T(o, { label: "Loading team…" })
213
- }) : i && (f.isError || !f.isLoading && !f.data) ? /* @__PURE__ */ T(t, {
214
- title: "Edit team",
215
- children: /* @__PURE__ */ T(a, {
216
- title: "Team not found",
217
- message: "This team does not exist or you do not have access to it.",
218
- onRetry: () => s("/teams")
210
+ }, Y = F.isPending || I.isPending;
211
+ return c && C.isLoading ? /* @__PURE__ */ E(n, {
212
+ title: r("atheletebridge.pages.teamForm.editTitle", "Edit team"),
213
+ children: /* @__PURE__ */ E(s, { label: r("atheletebridge.pages.teamForm.loading", "Loading team…") })
214
+ }) : c && (C.isError || !C.isLoading && !C.data) ? /* @__PURE__ */ E(n, {
215
+ title: r("atheletebridge.pages.teamForm.editTitle", "Edit team"),
216
+ children: /* @__PURE__ */ E(o, {
217
+ title: r("atheletebridge.pages.teamForm.notFoundTitle", "Team not found"),
218
+ message: r("atheletebridge.pages.teamForm.notFoundMessage", "This team does not exist or you do not have access to it."),
219
+ onRetry: () => p("/teams")
219
220
  })
220
- }) : /* @__PURE__ */ T(t, {
221
- title: i ? "Edit team" : "New team",
222
- description: i ? "Update the squad details." : "Create a new squad to build a roster.",
223
- actions: /* @__PURE__ */ E("button", {
221
+ }) : /* @__PURE__ */ E(n, {
222
+ title: c ? r("atheletebridge.pages.teamForm.editTitle", "Edit team") : r("atheletebridge.pages.teamForm.newTitle", "New team"),
223
+ description: c ? r("atheletebridge.pages.teamForm.editDescription", "Update the squad details.") : r("atheletebridge.pages.teamForm.newDescription", "Create a new squad to build a roster."),
224
+ actions: /* @__PURE__ */ D("button", {
224
225
  type: "button",
225
- onClick: () => s(i && n ? `/teams/${n}` : "/teams"),
226
+ onClick: () => p(c && a ? `/teams/${a}` : "/teams"),
226
227
  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",
227
- children: [/* @__PURE__ */ T(_, { className: "h-4 w-4" }), " Cancel"]
228
+ children: [
229
+ /* @__PURE__ */ E(v, { className: "h-4 w-4" }),
230
+ " ",
231
+ r("common.cancel", "Cancel")
232
+ ]
228
233
  }),
229
- children: /* @__PURE__ */ T("form", {
230
- onSubmit: K,
234
+ children: /* @__PURE__ */ E("form", {
235
+ onSubmit: J,
231
236
  className: "mx-auto max-w-3xl",
232
- children: /* @__PURE__ */ E(D, {
237
+ children: /* @__PURE__ */ D(O, {
233
238
  treatment: "insight",
234
239
  className: "p-6 sm:p-8",
235
- children: [/* @__PURE__ */ E("div", {
240
+ children: [/* @__PURE__ */ D("div", {
236
241
  className: "space-y-5",
237
242
  children: [
238
- /* @__PURE__ */ E("div", {
243
+ /* @__PURE__ */ D("div", {
239
244
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
240
- children: [/* @__PURE__ */ T(p, {
245
+ children: [/* @__PURE__ */ E(m, {
241
246
  label: "Team name",
242
247
  htmlFor: "name",
243
248
  required: !0,
244
- children: /* @__PURE__ */ T("input", {
249
+ children: /* @__PURE__ */ E("input", {
245
250
  id: "name",
246
- className: m,
247
- value: F.name,
248
- onChange: (e) => H("name", e.target.value),
251
+ className: h,
252
+ value: L.name,
253
+ onChange: (e) => W("name", e.target.value),
249
254
  placeholder: "e.g. Riverside United U18"
250
255
  })
251
- }), /* @__PURE__ */ T(p, {
256
+ }), /* @__PURE__ */ E(m, {
252
257
  label: "Sport",
253
258
  htmlFor: "sport",
254
- children: /* @__PURE__ */ E("div", {
259
+ children: /* @__PURE__ */ D("div", {
255
260
  className: "relative",
256
- children: [/* @__PURE__ */ T(j, { sport: F.sport }), /* @__PURE__ */ T("select", {
261
+ children: [/* @__PURE__ */ E(M, { sport: L.sport }), /* @__PURE__ */ E("select", {
257
262
  id: "sport",
258
- className: `${m} pl-9`,
259
- value: F.sport,
260
- onChange: (e) => H("sport", e.target.value),
261
- children: O.map((e) => /* @__PURE__ */ T("option", {
263
+ className: `${h} pl-9`,
264
+ value: L.sport,
265
+ onChange: (e) => W("sport", e.target.value),
266
+ children: k.map((e) => /* @__PURE__ */ E("option", {
262
267
  value: e,
263
- children: r[e]
268
+ children: i[e]
264
269
  }, e))
265
270
  })]
266
271
  })
267
272
  })]
268
273
  }),
269
- /* @__PURE__ */ E("div", {
274
+ /* @__PURE__ */ D("div", {
270
275
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
271
- children: [/* @__PURE__ */ T(p, {
276
+ children: [/* @__PURE__ */ E(m, {
272
277
  label: "Status",
273
278
  htmlFor: "status",
274
- children: /* @__PURE__ */ T("select", {
279
+ children: /* @__PURE__ */ E("select", {
275
280
  id: "status",
276
- className: m,
277
- value: F.status,
278
- onChange: (e) => H("status", e.target.value),
279
- children: k.map((e) => /* @__PURE__ */ T("option", {
281
+ className: h,
282
+ value: L.status,
283
+ onChange: (e) => W("status", e.target.value),
284
+ children: A.map((e) => /* @__PURE__ */ E("option", {
280
285
  value: e,
281
286
  children: e.charAt(0) + e.slice(1).toLowerCase()
282
287
  }, e))
283
288
  })
284
- }), /* @__PURE__ */ T(p, {
289
+ }), /* @__PURE__ */ E(m, {
285
290
  label: "Age group",
286
291
  htmlFor: "ageGroup",
287
- children: /* @__PURE__ */ T("input", {
292
+ children: /* @__PURE__ */ E("input", {
288
293
  id: "ageGroup",
289
- className: m,
290
- value: F.ageGroup,
291
- onChange: (e) => H("ageGroup", e.target.value),
294
+ className: h,
295
+ value: L.ageGroup,
296
+ onChange: (e) => W("ageGroup", e.target.value),
292
297
  placeholder: "e.g. U18"
293
298
  })
294
299
  })]
295
300
  }),
296
- /* @__PURE__ */ E("div", {
301
+ /* @__PURE__ */ D("div", {
297
302
  className: "grid grid-cols-1 gap-5 sm:grid-cols-2",
298
- children: [/* @__PURE__ */ T(p, {
303
+ children: [/* @__PURE__ */ E(m, {
299
304
  label: "Season",
300
305
  htmlFor: "season",
301
- children: /* @__PURE__ */ E("div", {
306
+ children: /* @__PURE__ */ D("div", {
302
307
  className: "relative",
303
- children: [/* @__PURE__ */ T(v, {
308
+ children: [/* @__PURE__ */ E(y, {
304
309
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted",
305
310
  "aria-hidden": "true"
306
- }), /* @__PURE__ */ T("input", {
311
+ }), /* @__PURE__ */ E("input", {
307
312
  id: "season",
308
- className: `${m} pl-9`,
309
- value: F.season,
310
- onChange: (e) => H("season", e.target.value),
313
+ className: `${h} pl-9`,
314
+ value: L.season,
315
+ onChange: (e) => W("season", e.target.value),
311
316
  placeholder: "e.g. 2025/26"
312
317
  })]
313
318
  })
314
- }), /* @__PURE__ */ T(p, {
319
+ }), /* @__PURE__ */ E(m, {
315
320
  label: "Home venue",
316
321
  htmlFor: "homeVenue",
317
- children: /* @__PURE__ */ E("div", {
322
+ children: /* @__PURE__ */ D("div", {
318
323
  className: "relative",
319
- children: [/* @__PURE__ */ T(b, {
324
+ children: [/* @__PURE__ */ E(x, {
320
325
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted",
321
326
  "aria-hidden": "true"
322
- }), /* @__PURE__ */ T("input", {
327
+ }), /* @__PURE__ */ E("input", {
323
328
  id: "homeVenue",
324
- className: `${m} pl-9`,
325
- value: F.homeVenue,
326
- onChange: (e) => H("homeVenue", e.target.value),
329
+ className: `${h} pl-9`,
330
+ value: L.homeVenue,
331
+ onChange: (e) => W("homeVenue", e.target.value),
327
332
  placeholder: "e.g. Riverside Stadium"
328
333
  })]
329
334
  })
330
335
  })]
331
336
  }),
332
- /* @__PURE__ */ T(M, {
333
- userId: F.headCoachId,
334
- displayName: F.headCoachName,
335
- onSelect: ({ userId: e, displayName: t }) => I((n) => ({
337
+ /* @__PURE__ */ E(N, {
338
+ userId: L.headCoachId,
339
+ displayName: L.headCoachName,
340
+ onSelect: ({ userId: e, displayName: t }) => R((n) => ({
336
341
  ...n,
337
342
  headCoachId: e,
338
343
  headCoachName: t
339
344
  }))
340
345
  }),
341
- /* @__PURE__ */ E(p, {
346
+ /* @__PURE__ */ D(m, {
342
347
  label: "Description",
343
348
  htmlFor: "description",
344
- children: [/* @__PURE__ */ T("textarea", {
349
+ children: [/* @__PURE__ */ E("textarea", {
345
350
  id: "description",
346
- className: m,
351
+ className: h,
347
352
  rows: 3,
348
- maxLength: A,
349
- value: F.description,
350
- onChange: (e) => H("description", e.target.value),
353
+ maxLength: j,
354
+ value: L.description,
355
+ onChange: (e) => W("description", e.target.value),
351
356
  placeholder: "A short description of the team."
352
- }), /* @__PURE__ */ E("div", {
357
+ }), /* @__PURE__ */ D("div", {
353
358
  className: "mt-1 text-right text-xs tabular-nums text-text-muted",
354
359
  children: [
355
- F.description.length,
360
+ L.description.length,
356
361
  "/",
357
- A
362
+ j
358
363
  ]
359
364
  })]
360
365
  }),
361
- /* @__PURE__ */ T(p, {
366
+ /* @__PURE__ */ E(m, {
362
367
  label: "Tags",
363
368
  htmlFor: "tags",
364
369
  hint: "Type a tag and press Enter to add it; click × to remove.",
365
- children: /* @__PURE__ */ E("div", {
370
+ children: /* @__PURE__ */ D("div", {
366
371
  className: "flex flex-wrap items-center gap-1.5 rounded-lg border border-border-seam bg-bg-surface px-2 py-1.5 focus-within:ring-2 focus-within:ring-[var(--color-focus-ring)]",
367
- children: [F.tags.map((e) => /* @__PURE__ */ E("span", {
372
+ children: [L.tags.map((e) => /* @__PURE__ */ D("span", {
368
373
  className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
369
- children: [e, /* @__PURE__ */ T("button", {
374
+ children: [e, /* @__PURE__ */ E("button", {
370
375
  type: "button",
371
- onClick: () => W(e),
376
+ onClick: () => K(e),
372
377
  "aria-label": `Remove tag ${e}`,
373
378
  className: "rounded-full text-text-muted transition-colors hover:text-status-error-text",
374
- children: /* @__PURE__ */ T(C, { className: "h-3 w-3" })
379
+ children: /* @__PURE__ */ E(w, { className: "h-3 w-3" })
375
380
  })]
376
- }, e)), /* @__PURE__ */ T("input", {
381
+ }, e)), /* @__PURE__ */ E("input", {
377
382
  id: "tags",
378
383
  className: "min-w-[8rem] flex-1 bg-transparent px-1 py-0.5 text-sm text-text-primary placeholder:text-text-muted focus:outline-none",
379
- value: L,
380
- onChange: (e) => R(e.target.value),
381
- onKeyDown: G,
382
- onBlur: () => U(L),
383
- placeholder: F.tags.length ? "Add tag and press Enter…" : "youth, development"
384
+ value: z,
385
+ onChange: (e) => B(e.target.value),
386
+ onKeyDown: q,
387
+ onBlur: () => G(z),
388
+ placeholder: L.tags.length ? "Add tag and press Enter…" : "youth, development"
384
389
  })]
385
390
  })
386
391
  }),
387
- z && /* @__PURE__ */ T("p", {
392
+ V && /* @__PURE__ */ E("p", {
388
393
  className: "text-sm text-status-error-text",
389
- children: z
394
+ children: V
390
395
  })
391
396
  ]
392
- }), /* @__PURE__ */ E("div", {
397
+ }), /* @__PURE__ */ D("div", {
393
398
  className: "mt-6 flex items-center justify-end gap-3 border-t border-border-seam pt-5",
394
- children: [/* @__PURE__ */ T("button", {
399
+ children: [/* @__PURE__ */ E("button", {
395
400
  type: "button",
396
- onClick: () => s(i && n ? `/teams/${n}` : "/teams"),
401
+ onClick: () => p(c && a ? `/teams/${a}` : "/teams"),
397
402
  className: "rounded-lg px-4 py-2 text-sm font-medium text-text-secondary transition-colors hover:text-text-primary",
398
- children: "Cancel"
399
- }), /* @__PURE__ */ E("button", {
403
+ children: r("common.cancel", "Cancel")
404
+ }), /* @__PURE__ */ D("button", {
400
405
  type: "submit",
401
- disabled: q,
406
+ disabled: Y,
402
407
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
403
- children: [q ? /* @__PURE__ */ T(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(x, { className: "h-4 w-4" }), i ? "Save changes" : "Create team"]
408
+ children: [Y ? /* @__PURE__ */ E(b, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ E(S, { className: "h-4 w-4" }), c ? r("atheletebridge.pages.teamForm.saveChanges", "Save changes") : r("atheletebridge.pages.teamForm.createTeam", "Create team")]
404
409
  })]
405
410
  })]
406
411
  })
@@ -408,6 +413,6 @@ function P() {
408
413
  });
409
414
  }
410
415
  //#endregion
411
- export { P as TeamFormPage };
416
+ export { F as TeamFormPage };
412
417
 
413
418
  //# sourceMappingURL=TeamFormPage.js.map