@burdenoff/microfe-atheletebridge 2026.1124.1 → 2026.1128.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.
Files changed (67) hide show
  1. package/dist/atheletebridge/admin/AdminDashboardPage.js +4 -0
  2. package/dist/atheletebridge/admin/AdminDashboardPage.js.map +1 -1
  3. package/dist/atheletebridge/components/AthleteSelect.js +23 -22
  4. package/dist/atheletebridge/components/AthleteSelect.js.map +1 -1
  5. package/dist/atheletebridge/components/EmptyState.d.ts +8 -0
  6. package/dist/atheletebridge/components/EmptyState.js +42 -29
  7. package/dist/atheletebridge/components/EmptyState.js.map +1 -1
  8. package/dist/atheletebridge/components/FilterSelect.js +10 -9
  9. package/dist/atheletebridge/components/FilterSelect.js.map +1 -1
  10. package/dist/atheletebridge/components/ai/AgentRunFeed.js.map +1 -1
  11. package/dist/atheletebridge/components/ai/AiModelPicker.js +49 -49
  12. package/dist/atheletebridge/components/ai/AiModelPicker.js.map +1 -1
  13. package/dist/atheletebridge/components/ai/DecisionCard.js +16 -16
  14. package/dist/atheletebridge/components/ai/DecisionCard.js.map +1 -1
  15. package/dist/atheletebridge/components/ai/RunDecisionPanel.js +42 -42
  16. package/dist/atheletebridge/components/ai/RunDecisionPanel.js.map +1 -1
  17. package/dist/atheletebridge/components/analytics/AiInsightsPanel.js +52 -52
  18. package/dist/atheletebridge/components/analytics/AiInsightsPanel.js.map +1 -1
  19. package/dist/atheletebridge/components/registration/RegistrationEntryFields.js +24 -23
  20. package/dist/atheletebridge/components/registration/RegistrationEntryFields.js.map +1 -1
  21. package/dist/atheletebridge/components/wearables/ConnectedDevicesPanel.js.map +1 -1
  22. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -1
  23. package/dist/atheletebridge/pages/StandingsPage.js.map +1 -1
  24. package/dist/atheletebridge/pages/analytics/CoachAnalyticsPage.js.map +1 -1
  25. package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js +1 -0
  26. package/dist/atheletebridge/pages/athletes/AthleteProfilePage.js.map +1 -1
  27. package/dist/atheletebridge/pages/audit/AuditLogPage.js +1 -0
  28. package/dist/atheletebridge/pages/audit/AuditLogPage.js.map +1 -1
  29. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
  30. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +56 -56
  31. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -1
  32. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +1 -0
  33. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -1
  34. package/dist/atheletebridge/pages/marketplace/MarketplacePage.js +97 -97
  35. package/dist/atheletebridge/pages/marketplace/MarketplacePage.js.map +1 -1
  36. package/dist/atheletebridge/pages/onboarding/OnboardingPage.js +34 -34
  37. package/dist/atheletebridge/pages/onboarding/OnboardingPage.js.map +1 -1
  38. package/dist/atheletebridge/pages/performance/PerformancePage.js +182 -182
  39. package/dist/atheletebridge/pages/performance/PerformancePage.js.map +1 -1
  40. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +13 -13
  41. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -1
  42. package/dist/atheletebridge/pages/programs/ProgramFormPage.js +61 -60
  43. package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -1
  44. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +1 -0
  45. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -1
  46. package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.js +26 -21
  47. package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.js.map +1 -1
  48. package/dist/atheletebridge/pages/registrations/RegisterPage.js +1 -0
  49. package/dist/atheletebridge/pages/registrations/RegisterPage.js.map +1 -1
  50. package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js +205 -204
  51. package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js.map +1 -1
  52. package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js +121 -115
  53. package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js.map +1 -1
  54. package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js +59 -40
  55. package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js.map +1 -1
  56. package/dist/atheletebridge/pages/sessions/SessionFormPage.js +59 -59
  57. package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -1
  58. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +1 -0
  59. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -1
  60. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +143 -143
  61. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -1
  62. package/dist/atheletebridge/pages/teams/TeamFormPage.js +72 -72
  63. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -1
  64. package/dist/atheletebridge/pages/teams/TeamsListPage.js +1 -0
  65. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -1
  66. package/dist/atheletebridge/pages/tournaments/TournamentBracketPage.js.map +1 -1
  67. package/package.json +3 -3
@@ -5,11 +5,12 @@ import { useAthleteBridge as a } from "../../context/AthleteBridgeContext.js";
5
5
  import { useFixtures as o, useTeams as s } from "../../hooks/useAthleteBridgeApi.js";
6
6
  import { useCreateRegistrationForm as c, useRegistrationForm as l, useUpdateRegistrationForm as u } from "../../hooks/useRegistrationApi.js";
7
7
  import { minorToInput as d, parseMoney as f } from "../../utils/money.js";
8
- import { keyFromLabel as p } from "../../utils/registration.js";
9
- import { useEffect as m, useRef as h, useState as g } from "react";
10
- import { ArrowDown as _, ArrowLeft as v, ArrowUp as y, Loader2 as b, Plus as x, Save as S, Trash2 as C } from "lucide-react";
11
- import { useParams as w } from "react-router";
12
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
8
+ import { keyFromLabel as ee } from "../../utils/registration.js";
9
+ import { useEffect as p, useRef as m, useState as h } from "react";
10
+ import { ArrowDown as g, ArrowLeft as _, ArrowUp as v, Loader2 as y, Plus as b, Save as x, Trash2 as S } from "lucide-react";
11
+ import { useParams as C } from "react-router";
12
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
13
+ import { ThemedSelect as E } from "@burdenoff/fe-libs/ui";
13
14
  // src/atheletebridge/pages/registrations/RegistrationFormBuilderPage.tsx
14
15
  var D = {
15
16
  SHORT_TEXT: "Short text",
@@ -52,7 +53,7 @@ function j(e) {
52
53
  function M(e) {
53
54
  return e ? new Date(e).toISOString() : void 0;
54
55
  }
55
- function N(e) {
56
+ function te(e) {
56
57
  return {
57
58
  title: e.title,
58
59
  description: e.description ?? "",
@@ -83,33 +84,33 @@ function N(e) {
83
84
  }))
84
85
  };
85
86
  }
86
- function P(e, t, n) {
87
+ function N(e, t, n) {
87
88
  let r = t + n;
88
89
  if (r < 0 || r >= e.length) return e;
89
90
  let i = [...e], [a] = i.splice(t, 1);
90
91
  return a !== void 0 && i.splice(r, 0, a), i;
91
92
  }
92
- var F = "inline-flex h-8 w-8 items-center justify-center rounded-md border border-border-seam text-text-secondary transition-colors hover:bg-bg-sunken disabled:opacity-40";
93
- function I() {
94
- let { id: d } = w(), j = !!d, { navigateTo: I } = a(), L = l(d), R = s({ pagination: { limit: 100 } }), z = o({ pagination: { limit: 100 } }), B = c(), V = u(), [H, U] = g(A), [W, G] = g(null), K = h(null);
95
- m(() => {
96
- j && L.data && K.current !== L.data.id && (K.current = L.data.id, U(N(L.data)));
97
- }, [j, L.data]);
98
- let q = j && (L.data?.submissionCount ?? 0) > 0, J = (e, t) => U((n) => ({
93
+ var P = "inline-flex h-8 w-8 items-center justify-center rounded-md border border-border-seam text-text-secondary transition-colors hover:bg-bg-sunken disabled:opacity-40";
94
+ function F() {
95
+ let { id: d } = C(), j = !!d, { navigateTo: F } = a(), I = l(d), L = s({ pagination: { limit: 100 } }), R = o({ pagination: { limit: 100 } }), z = c(), B = u(), [V, H] = h(A), [U, W] = h(null), G = m(null);
96
+ p(() => {
97
+ j && I.data && G.current !== I.data.id && (G.current = I.data.id, H(te(I.data)));
98
+ }, [j, I.data]);
99
+ let K = j && (I.data?.submissionCount ?? 0) > 0, q = (e, t) => H((n) => ({
99
100
  ...n,
100
101
  [e]: t
101
- })), Y = (e, t) => J("questions", H.questions.map((n) => n.uid === e ? {
102
+ })), J = (e, t) => q("questions", V.questions.map((n) => n.uid === e ? {
102
103
  ...n,
103
104
  ...t
104
- } : n)), X = (e, t) => J("fees", H.fees.map((n) => n.uid === e ? {
105
+ } : n)), Y = (e, t) => q("fees", V.fees.map((n) => n.uid === e ? {
105
106
  ...n,
106
107
  ...t
107
- } : n)), Z = () => {
108
- let e = new Set(H.questions.map((e) => e.key).filter(Boolean)), t = [];
109
- for (let n of H.questions) {
108
+ } : n)), X = () => {
109
+ let e = new Set(V.questions.map((e) => e.key).filter(Boolean)), t = [];
110
+ for (let n of V.questions) {
110
111
  let r = n.label.trim();
111
112
  if (!r) return "Every question needs a label.";
112
- let i = n.key || p(r, e);
113
+ let i = n.key || ee(r, e);
113
114
  e.add(i);
114
115
  let a = n.optionsText.split(",").map((e) => e.trim()).filter(Boolean);
115
116
  if (n.fieldType === "SELECT" && a.length === 0) return `Add at least one option to the dropdown "${r}".`;
@@ -123,10 +124,10 @@ function I() {
123
124
  });
124
125
  }
125
126
  let n = [];
126
- for (let e of H.fees) {
127
+ for (let e of V.fees) {
127
128
  let t = e.name.trim();
128
129
  if (!t) return "Every fee needs a name.";
129
- let r = f(e.amountText, H.currency);
130
+ let r = f(e.amountText, V.currency);
130
131
  if (r === null) return `Enter a valid amount for "${t}".`;
131
132
  n.push({
132
133
  name: t,
@@ -139,155 +140,155 @@ function I() {
139
140
  fields: t,
140
141
  fees: n
141
142
  };
142
- }, ee = async (e) => {
143
- if (e.preventDefault(), G(null), !H.title.trim()) {
144
- G("Give the form a title.");
143
+ }, Z = async (e) => {
144
+ if (e.preventDefault(), W(null), !V.title.trim()) {
145
+ W("Give the form a title.");
145
146
  return;
146
147
  }
147
- let t = H.maxSubmissions.trim() ? Number.parseInt(H.maxSubmissions, 10) : void 0;
148
+ let t = V.maxSubmissions.trim() ? Number.parseInt(V.maxSubmissions, 10) : void 0;
148
149
  if (t !== void 0 && (Number.isNaN(t) || t < 1)) {
149
- G("Capacity must be a positive number.");
150
+ W("Capacity must be a positive number.");
150
151
  return;
151
152
  }
152
- let n = q ? null : Z();
153
- if (typeof n == "string") G(n);
153
+ let n = K ? null : X();
154
+ if (typeof n == "string") W(n);
154
155
  else try {
155
- if (j && d) await V.mutateAsync({
156
+ if (j && d) await B.mutateAsync({
156
157
  id: d,
157
158
  input: {
158
- title: H.title.trim(),
159
- description: H.description.trim() || null,
160
- season: H.season.trim() || null,
161
- teamId: H.teamId || null,
162
- fixtureId: H.fixtureId || null,
163
- opensAt: M(H.opensAt) ?? null,
164
- closesAt: M(H.closesAt) ?? null,
159
+ title: V.title.trim(),
160
+ description: V.description.trim() || null,
161
+ season: V.season.trim() || null,
162
+ teamId: V.teamId || null,
163
+ fixtureId: V.fixtureId || null,
164
+ opensAt: M(V.opensAt) ?? null,
165
+ closesAt: M(V.closesAt) ?? null,
165
166
  maxSubmissions: t ?? null,
166
- waiverText: H.waiverText.trim() || null,
167
+ waiverText: V.waiverText.trim() || null,
167
168
  ...n ? {
168
- currency: H.currency,
169
+ currency: V.currency,
169
170
  fields: n.fields,
170
171
  fees: n.fees
171
172
  } : {}
172
173
  }
173
- }), I(`/registrations/${d}`);
174
+ }), F(`/registrations/${d}`);
174
175
  else if (n) {
175
- let e = await B.mutateAsync({
176
- title: H.title.trim(),
177
- description: H.description.trim() || void 0,
178
- season: H.season.trim() || void 0,
179
- teamId: H.teamId || void 0,
180
- fixtureId: H.fixtureId || void 0,
181
- slug: H.slug.trim() || void 0,
182
- currency: H.currency,
183
- opensAt: M(H.opensAt),
184
- closesAt: M(H.closesAt),
176
+ let e = await z.mutateAsync({
177
+ title: V.title.trim(),
178
+ description: V.description.trim() || void 0,
179
+ season: V.season.trim() || void 0,
180
+ teamId: V.teamId || void 0,
181
+ fixtureId: V.fixtureId || void 0,
182
+ slug: V.slug.trim() || void 0,
183
+ currency: V.currency,
184
+ opensAt: M(V.opensAt),
185
+ closesAt: M(V.closesAt),
185
186
  maxSubmissions: t,
186
- waiverText: H.waiverText.trim() || void 0,
187
+ waiverText: V.waiverText.trim() || void 0,
187
188
  fields: n.fields,
188
189
  fees: n.fees
189
190
  });
190
- I(`/registrations/${e.id}`);
191
+ F(`/registrations/${e.id}`);
191
192
  }
192
193
  } catch (e) {
193
- G(e instanceof Error ? e.message : "Failed to save the registration form.");
194
+ W(e instanceof Error ? e.message : "Failed to save the registration form.");
194
195
  }
195
- }, Q = B.isPending || V.isPending, $ = j ? "Edit registration form" : "New registration form";
196
- return j && L.isLoading ? /* @__PURE__ */ T(e, {
196
+ }, Q = z.isPending || B.isPending, $ = j ? "Edit registration form" : "New registration form";
197
+ return j && I.isLoading ? /* @__PURE__ */ w(e, {
197
198
  title: $,
198
- children: /* @__PURE__ */ T(n, { label: "Loading registration form…" })
199
- }) : j && (L.isError || !L.data) ? /* @__PURE__ */ T(e, {
199
+ children: /* @__PURE__ */ w(n, { label: "Loading registration form…" })
200
+ }) : j && (I.isError || !I.data) ? /* @__PURE__ */ w(e, {
200
201
  title: $,
201
- children: /* @__PURE__ */ T(t, {
202
+ children: /* @__PURE__ */ w(t, {
202
203
  title: "Registration form not found",
203
204
  message: "This form does not exist or you do not have access to it.",
204
- onRetry: () => I("/registrations")
205
+ onRetry: () => F("/registrations")
205
206
  })
206
- }) : /* @__PURE__ */ T(e, {
207
+ }) : /* @__PURE__ */ w(e, {
207
208
  title: $,
208
209
  description: "Set the details, the questions families answer and the fees they pay.",
209
- actions: /* @__PURE__ */ E("button", {
210
+ actions: /* @__PURE__ */ T("button", {
210
211
  type: "button",
211
- onClick: () => I(j && d ? `/registrations/${d}` : "/registrations"),
212
+ onClick: () => F(j && d ? `/registrations/${d}` : "/registrations"),
212
213
  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",
213
- children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), " Cancel"]
214
+ children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), " Cancel"]
214
215
  }),
215
- children: /* @__PURE__ */ E("form", {
216
- onSubmit: ee,
216
+ children: /* @__PURE__ */ T("form", {
217
+ onSubmit: Z,
217
218
  className: "max-w-3xl space-y-8",
218
219
  children: [
219
- /* @__PURE__ */ E("section", {
220
+ /* @__PURE__ */ T("section", {
220
221
  className: "space-y-5",
221
222
  children: [
222
- /* @__PURE__ */ T(r, {
223
+ /* @__PURE__ */ w(r, {
223
224
  label: "Form title",
224
225
  htmlFor: "title",
225
226
  required: !0,
226
- children: /* @__PURE__ */ T("input", {
227
+ children: /* @__PURE__ */ w("input", {
227
228
  id: "title",
228
229
  className: i,
229
- value: H.title,
230
- onChange: (e) => J("title", e.target.value),
230
+ value: V.title,
231
+ onChange: (e) => q("title", e.target.value),
231
232
  placeholder: "e.g. U12 Boys — 2026/27 season registration"
232
233
  })
233
234
  }),
234
- /* @__PURE__ */ T(r, {
235
+ /* @__PURE__ */ w(r, {
235
236
  label: "Description",
236
237
  htmlFor: "description",
237
- children: /* @__PURE__ */ T("textarea", {
238
+ children: /* @__PURE__ */ w("textarea", {
238
239
  id: "description",
239
240
  rows: 3,
240
241
  className: i,
241
- value: H.description,
242
- onChange: (e) => J("description", e.target.value),
242
+ value: V.description,
243
+ onChange: (e) => q("description", e.target.value),
243
244
  placeholder: "Who this is for, training days, what is included."
244
245
  })
245
246
  }),
246
- /* @__PURE__ */ E("div", {
247
+ /* @__PURE__ */ T("div", {
247
248
  className: "grid grid-cols-1 gap-5 sm:grid-cols-3",
248
249
  children: [
249
- /* @__PURE__ */ T(r, {
250
+ /* @__PURE__ */ w(r, {
250
251
  label: "Season",
251
252
  htmlFor: "season",
252
- children: /* @__PURE__ */ T("input", {
253
+ children: /* @__PURE__ */ w("input", {
253
254
  id: "season",
254
255
  className: i,
255
- value: H.season,
256
- onChange: (e) => J("season", e.target.value),
256
+ value: V.season,
257
+ onChange: (e) => q("season", e.target.value),
257
258
  placeholder: "2026/27"
258
259
  })
259
260
  }),
260
- /* @__PURE__ */ T(r, {
261
+ /* @__PURE__ */ w(r, {
261
262
  label: "Team",
262
263
  htmlFor: "teamId",
263
264
  hint: "Optional squad this registers for.",
264
- children: /* @__PURE__ */ E("select", {
265
+ children: /* @__PURE__ */ T(E, {
265
266
  id: "teamId",
266
267
  className: i,
267
- value: H.teamId,
268
- onChange: (e) => J("teamId", e.target.value),
269
- children: [/* @__PURE__ */ T("option", {
268
+ value: V.teamId,
269
+ onChange: (e) => q("teamId", e.target.value),
270
+ children: [/* @__PURE__ */ w("option", {
270
271
  value: "",
271
272
  children: "No specific team"
272
- }), (R.data?.items ?? []).map((e) => /* @__PURE__ */ T("option", {
273
+ }), (L.data?.items ?? []).map((e) => /* @__PURE__ */ w("option", {
273
274
  value: e.id,
274
275
  children: e.name
275
276
  }, e.id))]
276
277
  })
277
278
  }),
278
- /* @__PURE__ */ T(r, {
279
+ /* @__PURE__ */ w(r, {
279
280
  label: "Fixture",
280
281
  htmlFor: "fixtureId",
281
282
  hint: "Optional tournament or match this form takes sign-ups for. Families use the same share link.",
282
- children: /* @__PURE__ */ E("select", {
283
+ children: /* @__PURE__ */ T(E, {
283
284
  id: "fixtureId",
284
285
  className: i,
285
- value: H.fixtureId,
286
- onChange: (e) => J("fixtureId", e.target.value),
287
- children: [/* @__PURE__ */ T("option", {
286
+ value: V.fixtureId,
287
+ onChange: (e) => q("fixtureId", e.target.value),
288
+ children: [/* @__PURE__ */ w("option", {
288
289
  value: "",
289
290
  children: "Not tied to a fixture"
290
- }), (z.data?.items ?? []).map((e) => /* @__PURE__ */ T("option", {
291
+ }), (R.data?.items ?? []).map((e) => /* @__PURE__ */ w("option", {
291
292
  value: e.id,
292
293
  children: [
293
294
  e.competition ?? "Fixture",
@@ -297,17 +298,17 @@ function I() {
297
298
  }, e.id))]
298
299
  })
299
300
  }),
300
- /* @__PURE__ */ T(r, {
301
+ /* @__PURE__ */ w(r, {
301
302
  label: "Currency",
302
303
  htmlFor: "currency",
303
- hint: q ? "Locked after the first registration." : void 0,
304
- children: /* @__PURE__ */ T("select", {
304
+ hint: K ? "Locked after the first registration." : void 0,
305
+ children: /* @__PURE__ */ w(E, {
305
306
  id: "currency",
306
307
  className: i,
307
- value: H.currency,
308
- disabled: q,
309
- onChange: (e) => J("currency", e.target.value),
310
- children: [.../* @__PURE__ */ new Set([H.currency, ...O])].map((e) => /* @__PURE__ */ T("option", {
308
+ value: V.currency,
309
+ disabled: K,
310
+ onChange: (e) => q("currency", e.target.value),
311
+ children: [.../* @__PURE__ */ new Set([V.currency, ...O])].map((e) => /* @__PURE__ */ w("option", {
311
312
  value: e,
312
313
  children: e
313
314
  }, e))
@@ -315,76 +316,76 @@ function I() {
315
316
  })
316
317
  ]
317
318
  }),
318
- /* @__PURE__ */ E("div", {
319
+ /* @__PURE__ */ T("div", {
319
320
  className: "grid grid-cols-1 gap-5 sm:grid-cols-3",
320
321
  children: [
321
- /* @__PURE__ */ T(r, {
322
+ /* @__PURE__ */ w(r, {
322
323
  label: "Opens",
323
324
  htmlFor: "opensAt",
324
325
  hint: "Leave empty to open on publish.",
325
- children: /* @__PURE__ */ T("input", {
326
+ children: /* @__PURE__ */ w("input", {
326
327
  id: "opensAt",
327
328
  type: "datetime-local",
328
329
  className: i,
329
- value: H.opensAt,
330
- onChange: (e) => J("opensAt", e.target.value)
330
+ value: V.opensAt,
331
+ onChange: (e) => q("opensAt", e.target.value)
331
332
  })
332
333
  }),
333
- /* @__PURE__ */ T(r, {
334
+ /* @__PURE__ */ w(r, {
334
335
  label: "Closes",
335
336
  htmlFor: "closesAt",
336
337
  hint: "Leave empty to close manually.",
337
- children: /* @__PURE__ */ T("input", {
338
+ children: /* @__PURE__ */ w("input", {
338
339
  id: "closesAt",
339
340
  type: "datetime-local",
340
341
  className: i,
341
- value: H.closesAt,
342
- onChange: (e) => J("closesAt", e.target.value)
342
+ value: V.closesAt,
343
+ onChange: (e) => q("closesAt", e.target.value)
343
344
  })
344
345
  }),
345
- /* @__PURE__ */ T(r, {
346
+ /* @__PURE__ */ w(r, {
346
347
  label: "Capacity",
347
348
  htmlFor: "maxSubmissions",
348
349
  hint: "Maximum registrations.",
349
- children: /* @__PURE__ */ T("input", {
350
+ children: /* @__PURE__ */ w("input", {
350
351
  id: "maxSubmissions",
351
352
  inputMode: "numeric",
352
353
  className: i,
353
- value: H.maxSubmissions,
354
- onChange: (e) => J("maxSubmissions", e.target.value),
354
+ value: V.maxSubmissions,
355
+ onChange: (e) => q("maxSubmissions", e.target.value),
355
356
  placeholder: "Unlimited"
356
357
  })
357
358
  })
358
359
  ]
359
360
  }),
360
- !j && /* @__PURE__ */ T(r, {
361
+ !j && /* @__PURE__ */ w(r, {
361
362
  label: "Share-link name",
362
363
  htmlFor: "slug",
363
364
  hint: "Optional. Lowercase letters, digits and dashes. Generated from the title when empty.",
364
- children: /* @__PURE__ */ T("input", {
365
+ children: /* @__PURE__ */ w("input", {
365
366
  id: "slug",
366
367
  className: i,
367
- value: H.slug,
368
- onChange: (e) => J("slug", e.target.value),
368
+ value: V.slug,
369
+ onChange: (e) => q("slug", e.target.value),
369
370
  placeholder: "u12-boys-2026"
370
371
  })
371
372
  })
372
373
  ]
373
374
  }),
374
- /* @__PURE__ */ E("section", {
375
+ /* @__PURE__ */ T("section", {
375
376
  className: "space-y-3",
376
377
  "aria-labelledby": "builder-questions",
377
378
  children: [
378
- /* @__PURE__ */ E("div", {
379
+ /* @__PURE__ */ T("div", {
379
380
  className: "flex items-center justify-between",
380
- children: [/* @__PURE__ */ T("h2", {
381
+ children: [/* @__PURE__ */ w("h2", {
381
382
  id: "builder-questions",
382
383
  className: "text-base font-semibold text-text-primary",
383
384
  children: "Questions"
384
- }), /* @__PURE__ */ E("button", {
385
+ }), /* @__PURE__ */ T("button", {
385
386
  type: "button",
386
- disabled: q,
387
- onClick: () => J("questions", [...H.questions, {
387
+ disabled: K,
388
+ onClick: () => q("questions", [...V.questions, {
388
389
  uid: k(),
389
390
  key: "",
390
391
  label: "",
@@ -394,107 +395,107 @@ function I() {
394
395
  helpText: ""
395
396
  }]),
396
397
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
397
- children: [/* @__PURE__ */ T(x, { className: "h-4 w-4" }), " Add question"]
398
+ children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), " Add question"]
398
399
  })]
399
400
  }),
400
- /* @__PURE__ */ E("p", {
401
+ /* @__PURE__ */ T("p", {
401
402
  className: "text-xs text-text-secondary",
402
- children: ["Participant name and contact details are always collected.", q && " Questions are locked because this form already has registrations."]
403
+ children: ["Participant name and contact details are always collected.", K && " Questions are locked because this form already has registrations."]
403
404
  }),
404
- H.questions.map((e, t) => /* @__PURE__ */ E("div", {
405
+ V.questions.map((e, t) => /* @__PURE__ */ T("div", {
405
406
  className: "space-y-3 rounded-lg border border-border-seam bg-bg-surface p-4",
406
407
  "data-testid": "builder-question",
407
408
  children: [
408
- /* @__PURE__ */ E("div", {
409
+ /* @__PURE__ */ T("div", {
409
410
  className: "grid grid-cols-1 gap-3 sm:grid-cols-[1fr_12rem]",
410
- children: [/* @__PURE__ */ T(r, {
411
+ children: [/* @__PURE__ */ w(r, {
411
412
  label: `Question ${t + 1}`,
412
413
  htmlFor: `q-label-${e.uid}`,
413
- children: /* @__PURE__ */ T("input", {
414
+ children: /* @__PURE__ */ w("input", {
414
415
  id: `q-label-${e.uid}`,
415
416
  className: i,
416
417
  value: e.label,
417
- disabled: q,
418
- onChange: (t) => Y(e.uid, { label: t.target.value }),
418
+ disabled: K,
419
+ onChange: (t) => J(e.uid, { label: t.target.value }),
419
420
  placeholder: "e.g. Date of birth"
420
421
  })
421
- }), /* @__PURE__ */ T(r, {
422
+ }), /* @__PURE__ */ w(r, {
422
423
  label: "Answer type",
423
424
  htmlFor: `q-type-${e.uid}`,
424
- children: /* @__PURE__ */ T("select", {
425
+ children: /* @__PURE__ */ w(E, {
425
426
  id: `q-type-${e.uid}`,
426
427
  className: i,
427
428
  value: e.fieldType,
428
- disabled: q,
429
- onChange: (t) => Y(e.uid, { fieldType: t.target.value }),
430
- children: Object.keys(D).map((e) => /* @__PURE__ */ T("option", {
429
+ disabled: K,
430
+ onChange: (t) => J(e.uid, { fieldType: t.target.value }),
431
+ children: Object.keys(D).map((e) => /* @__PURE__ */ w("option", {
431
432
  value: e,
432
433
  children: D[e]
433
434
  }, e))
434
435
  })
435
436
  })]
436
437
  }),
437
- e.fieldType === "SELECT" && /* @__PURE__ */ T(r, {
438
+ e.fieldType === "SELECT" && /* @__PURE__ */ w(r, {
438
439
  label: "Options",
439
440
  htmlFor: `q-options-${e.uid}`,
440
441
  hint: "Comma-separated.",
441
- children: /* @__PURE__ */ T("input", {
442
+ children: /* @__PURE__ */ w("input", {
442
443
  id: `q-options-${e.uid}`,
443
444
  className: i,
444
445
  value: e.optionsText,
445
- disabled: q,
446
- onChange: (t) => Y(e.uid, { optionsText: t.target.value }),
446
+ disabled: K,
447
+ onChange: (t) => J(e.uid, { optionsText: t.target.value }),
447
448
  placeholder: "XS, S, M, L"
448
449
  })
449
450
  }),
450
- /* @__PURE__ */ T(r, {
451
+ /* @__PURE__ */ w(r, {
451
452
  label: "Help text",
452
453
  htmlFor: `q-help-${e.uid}`,
453
- children: /* @__PURE__ */ T("input", {
454
+ children: /* @__PURE__ */ w("input", {
454
455
  id: `q-help-${e.uid}`,
455
456
  className: i,
456
457
  value: e.helpText,
457
- disabled: q,
458
- onChange: (t) => Y(e.uid, { helpText: t.target.value })
458
+ disabled: K,
459
+ onChange: (t) => J(e.uid, { helpText: t.target.value })
459
460
  })
460
461
  }),
461
- /* @__PURE__ */ E("div", {
462
+ /* @__PURE__ */ T("div", {
462
463
  className: "flex flex-wrap items-center justify-between gap-3",
463
- children: [/* @__PURE__ */ E("label", {
464
+ children: [/* @__PURE__ */ T("label", {
464
465
  className: "flex items-center gap-2 text-sm text-text-primary",
465
- children: [/* @__PURE__ */ T("input", {
466
+ children: [/* @__PURE__ */ w("input", {
466
467
  type: "checkbox",
467
468
  checked: e.required,
468
- disabled: q,
469
- onChange: (t) => Y(e.uid, { required: t.target.checked }),
469
+ disabled: K,
470
+ onChange: (t) => J(e.uid, { required: t.target.checked }),
470
471
  className: "h-4 w-4 rounded border-border-seam text-action-primary-bg focus:ring-[var(--color-focus-ring)]"
471
472
  }), "Required"]
472
- }), /* @__PURE__ */ E("span", {
473
+ }), /* @__PURE__ */ T("span", {
473
474
  className: "flex gap-2",
474
475
  children: [
475
- /* @__PURE__ */ T("button", {
476
+ /* @__PURE__ */ w("button", {
476
477
  type: "button",
477
478
  "aria-label": "Move question up",
478
- className: F,
479
- disabled: q || t === 0,
480
- onClick: () => J("questions", P(H.questions, t, -1)),
481
- children: /* @__PURE__ */ T(y, { className: "h-4 w-4" })
479
+ className: P,
480
+ disabled: K || t === 0,
481
+ onClick: () => q("questions", N(V.questions, t, -1)),
482
+ children: /* @__PURE__ */ w(v, { className: "h-4 w-4" })
482
483
  }),
483
- /* @__PURE__ */ T("button", {
484
+ /* @__PURE__ */ w("button", {
484
485
  type: "button",
485
486
  "aria-label": "Move question down",
486
- className: F,
487
- disabled: q || t === H.questions.length - 1,
488
- onClick: () => J("questions", P(H.questions, t, 1)),
489
- children: /* @__PURE__ */ T(_, { className: "h-4 w-4" })
487
+ className: P,
488
+ disabled: K || t === V.questions.length - 1,
489
+ onClick: () => q("questions", N(V.questions, t, 1)),
490
+ children: /* @__PURE__ */ w(g, { className: "h-4 w-4" })
490
491
  }),
491
- /* @__PURE__ */ T("button", {
492
+ /* @__PURE__ */ w("button", {
492
493
  type: "button",
493
494
  "aria-label": "Remove question",
494
- className: F,
495
- disabled: q,
496
- onClick: () => J("questions", H.questions.filter((t) => t.uid !== e.uid)),
497
- children: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
495
+ className: P,
496
+ disabled: K,
497
+ onClick: () => q("questions", V.questions.filter((t) => t.uid !== e.uid)),
498
+ children: /* @__PURE__ */ w(S, { className: "h-4 w-4" })
498
499
  })
499
500
  ]
500
501
  })]
@@ -503,20 +504,20 @@ function I() {
503
504
  }, e.uid))
504
505
  ]
505
506
  }),
506
- /* @__PURE__ */ E("section", {
507
+ /* @__PURE__ */ T("section", {
507
508
  className: "space-y-3",
508
509
  "aria-labelledby": "builder-fees",
509
510
  children: [
510
- /* @__PURE__ */ E("div", {
511
+ /* @__PURE__ */ T("div", {
511
512
  className: "flex items-center justify-between",
512
- children: [/* @__PURE__ */ T("h2", {
513
+ children: [/* @__PURE__ */ w("h2", {
513
514
  id: "builder-fees",
514
515
  className: "text-base font-semibold text-text-primary",
515
516
  children: "Fees"
516
- }), /* @__PURE__ */ E("button", {
517
+ }), /* @__PURE__ */ T("button", {
517
518
  type: "button",
518
- disabled: q,
519
- onClick: () => J("fees", [...H.fees, {
519
+ disabled: K,
520
+ onClick: () => q("fees", [...V.fees, {
520
521
  uid: k(),
521
522
  name: "",
522
523
  amountText: "",
@@ -524,105 +525,105 @@ function I() {
524
525
  description: ""
525
526
  }]),
526
527
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
527
- children: [/* @__PURE__ */ T(x, { className: "h-4 w-4" }), " Add fee"]
528
+ children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), " Add fee"]
528
529
  })]
529
530
  }),
530
- /* @__PURE__ */ T("p", {
531
+ /* @__PURE__ */ w("p", {
531
532
  className: "text-xs text-text-secondary",
532
533
  children: "Required fees are charged on every registration; optional ones (kit, tournament entry) are opt-in. Payments are recorded by the club office as they arrive."
533
534
  }),
534
- H.fees.map((e) => /* @__PURE__ */ E("div", {
535
+ V.fees.map((e) => /* @__PURE__ */ T("div", {
535
536
  className: "grid grid-cols-1 gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 sm:grid-cols-[1fr_9rem_9rem_auto]",
536
537
  "data-testid": "builder-fee",
537
538
  children: [
538
- /* @__PURE__ */ T(r, {
539
+ /* @__PURE__ */ w(r, {
539
540
  label: "Fee name",
540
541
  htmlFor: `f-name-${e.uid}`,
541
- children: /* @__PURE__ */ T("input", {
542
+ children: /* @__PURE__ */ w("input", {
542
543
  id: `f-name-${e.uid}`,
543
544
  className: i,
544
545
  value: e.name,
545
- disabled: q,
546
- onChange: (t) => X(e.uid, { name: t.target.value }),
546
+ disabled: K,
547
+ onChange: (t) => Y(e.uid, { name: t.target.value }),
547
548
  placeholder: "Membership"
548
549
  })
549
550
  }),
550
- /* @__PURE__ */ T(r, {
551
- label: `Amount (${H.currency})`,
551
+ /* @__PURE__ */ w(r, {
552
+ label: `Amount (${V.currency})`,
552
553
  htmlFor: `f-amount-${e.uid}`,
553
- children: /* @__PURE__ */ T("input", {
554
+ children: /* @__PURE__ */ w("input", {
554
555
  id: `f-amount-${e.uid}`,
555
556
  inputMode: "decimal",
556
557
  className: i,
557
558
  value: e.amountText,
558
- disabled: q,
559
- onChange: (t) => X(e.uid, { amountText: t.target.value }),
559
+ disabled: K,
560
+ onChange: (t) => Y(e.uid, { amountText: t.target.value }),
560
561
  placeholder: "150.00"
561
562
  })
562
563
  }),
563
- /* @__PURE__ */ T(r, {
564
+ /* @__PURE__ */ w(r, {
564
565
  label: "Type",
565
566
  htmlFor: `f-type-${e.uid}`,
566
- children: /* @__PURE__ */ E("select", {
567
+ children: /* @__PURE__ */ T(E, {
567
568
  id: `f-type-${e.uid}`,
568
569
  className: i,
569
570
  value: e.feeType,
570
- disabled: q,
571
- onChange: (t) => X(e.uid, { feeType: t.target.value }),
572
- children: [/* @__PURE__ */ T("option", {
571
+ disabled: K,
572
+ onChange: (t) => Y(e.uid, { feeType: t.target.value }),
573
+ children: [/* @__PURE__ */ w("option", {
573
574
  value: "REQUIRED",
574
575
  children: "Required"
575
- }), /* @__PURE__ */ T("option", {
576
+ }), /* @__PURE__ */ w("option", {
576
577
  value: "OPTIONAL",
577
578
  children: "Optional"
578
579
  })]
579
580
  })
580
581
  }),
581
- /* @__PURE__ */ T("div", {
582
+ /* @__PURE__ */ w("div", {
582
583
  className: "flex items-end",
583
- children: /* @__PURE__ */ T("button", {
584
+ children: /* @__PURE__ */ w("button", {
584
585
  type: "button",
585
586
  "aria-label": "Remove fee",
586
- className: F,
587
- disabled: q,
588
- onClick: () => J("fees", H.fees.filter((t) => t.uid !== e.uid)),
589
- children: /* @__PURE__ */ T(C, { className: "h-4 w-4" })
587
+ className: P,
588
+ disabled: K,
589
+ onClick: () => q("fees", V.fees.filter((t) => t.uid !== e.uid)),
590
+ children: /* @__PURE__ */ w(S, { className: "h-4 w-4" })
590
591
  })
591
592
  })
592
593
  ]
593
594
  }, e.uid))
594
595
  ]
595
596
  }),
596
- /* @__PURE__ */ T("section", { children: /* @__PURE__ */ T(r, {
597
+ /* @__PURE__ */ w("section", { children: /* @__PURE__ */ w(r, {
597
598
  label: "Waiver / consent",
598
599
  htmlFor: "waiverText",
599
600
  hint: "Optional. When set, registrants must accept it to submit.",
600
- children: /* @__PURE__ */ T("textarea", {
601
+ children: /* @__PURE__ */ w("textarea", {
601
602
  id: "waiverText",
602
603
  rows: 4,
603
604
  className: i,
604
- value: H.waiverText,
605
- onChange: (e) => J("waiverText", e.target.value)
605
+ value: V.waiverText,
606
+ onChange: (e) => q("waiverText", e.target.value)
606
607
  })
607
608
  }) }),
608
- W && /* @__PURE__ */ T("p", {
609
+ U && /* @__PURE__ */ w("p", {
609
610
  role: "alert",
610
611
  className: "text-sm text-status-error-text",
611
- children: W
612
+ children: U
612
613
  }),
613
- /* @__PURE__ */ T("div", {
614
+ /* @__PURE__ */ w("div", {
614
615
  className: "pt-2",
615
- children: /* @__PURE__ */ E("button", {
616
+ children: /* @__PURE__ */ T("button", {
616
617
  type: "submit",
617
618
  disabled: Q,
618
619
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-60",
619
- children: [Q ? /* @__PURE__ */ T(b, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ T(S, { className: "h-4 w-4" }), j ? "Save changes" : "Create form"]
620
+ children: [Q ? /* @__PURE__ */ w(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ w(x, { className: "h-4 w-4" }), j ? "Save changes" : "Create form"]
620
621
  })
621
622
  })
622
623
  ]
623
624
  })
624
625
  });
625
626
  }
626
- export { I as RegistrationFormBuilderPage };
627
+ export { F as RegistrationFormBuilderPage };
627
628
 
628
629
  //# sourceMappingURL=RegistrationFormBuilderPage.js.map