/* global React */
// Shared data for the Nottingham Athletic site

const NAVIGATION = [
  { id: 'home', label: 'Home' },
  { id: 'teams', label: 'Teams' },
  { id: 'fixtures', label: 'Fixtures' },
  { id: 'sessions', label: 'Sessions' },
  { id: 'camps', label: 'Camps' },
  { id: 'academy', label: 'Schools' },
  { id: 'travel', label: 'Travel teams' },
  { id: 'about', label: 'About' },
  { id: 'shop', label: 'Shop' },
];

// Squads are tagged with a `tier` so the Teams & Sessions pages can group /
// filter them without hardcoded id lists:
//   national — invite only, selected at trials (not bookable)
//   ybl      — registration open, prices coming soon (not yet bookable)
//   local    — open Local League, £20/mo, Monday nights (bookable + Direct Debit)
//   open     — U12, £15/mo (bookable)
const SQUADS = [
  // ---------- National League — invite only ----------
  { id: 'senior', name: 'Senior Men', short: 'Senior', dotClass: 'dot-senior',
    barColor: '#1E4FA8', tag: 'National League', tier: 'national', inviteOnly: true, bookable: false,
    photo: 'assets/teams/senior.jpg', focal: 'center 40%',
    coach: 'Kieran Wright', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 14, training: 'Tue 19:00 · Thu 20:00', venue: 'Melbourne Park',
    monthly: null,
    leagues: [
      { name: 'NBL Division 2', level: 'National', record: '—', position: '—' },
    ],
    blurb: 'Senior men competing in NBL Division 2. Invite only — players are selected at trials.' },

  { id: 'u23', name: 'U23 Men', short: 'U23', dotClass: 'dot-u23',
    barColor: '#2d65c9', tag: 'National League', tier: 'national', inviteOnly: true, bookable: false,
    photo: 'assets/teams/u23.jpg', focal: 'center 35%',
    coach: 'Hercules Ntounis', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 12, training: 'Mon 19:30 · Wed 19:30', venue: 'NTU Clifton',
    monthly: null,
    leagues: [
      { name: 'NBL Division 3', level: 'National', record: '—', position: '—' },
    ],
    blurb: 'U23 men competing in NBL Division 3. Invite only — a bridge from youth to senior basketball.' },

  { id: 'u16-national', name: 'U16 National League', short: 'U16 NL', dotClass: 'dot-u16',
    barColor: '#3b82f6', tag: 'National League', tier: 'national', inviteOnly: true, bookable: false,
    coach: 'Demarni Mclatchie', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 12, training: 'Tue 17:30 · Thu 17:30', venue: 'Melbourne Park',
    monthly: null,
    leagues: [
      { name: 'U16 National League', level: 'National', record: '—', position: '—' },
    ],
    blurb: 'Our U16 National League squad. Invite only — players are selected at trials.' },

  { id: 'u14-national', name: 'U14 National League', short: 'U14 NL', dotClass: 'dot-u14',
    barColor: '#60a5fa', tag: 'National League', tier: 'national', inviteOnly: true, bookable: false,
    coach: 'Matt Parker', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 16, training: 'Wed 17:00 · Sat 09:30', venue: 'CP Riverside',
    monthly: null,
    leagues: [
      { name: 'U14 National League', level: 'National', record: '—', position: '—' },
    ],
    blurb: 'Our U14 National League squad. Invite only — players are selected at trials.' },

  // ---------- YBL — registration open, prices coming soon ----------
  { id: 'u18-ybl', name: 'U18 YBL', short: 'U18 YBL', dotClass: 'dot-u18',
    barColor: '#2563eb', tag: 'YBL', tier: 'ybl', inviteOnly: false, bookable: false, priceTBC: true,
    coach: 'Matt Parker', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 12, training: 'TBC', venue: 'TBC',
    monthly: null,
    leagues: [
      { name: 'YBL · Youth Basketball League', level: 'National', record: '—', position: '—' },
    ],
    blurb: 'Our U18 entry into the Youth Basketball League. Registration is open — prices coming soon.' },

  { id: 'u16-ybl', name: 'U16 YBL', short: 'U16 YBL', dotClass: 'dot-u16',
    barColor: '#3b82f6', tag: 'YBL', tier: 'ybl', inviteOnly: false, bookable: false, priceTBC: true,
    coach: 'Demarni Mclatchie', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 12, training: 'TBC', venue: 'TBC',
    monthly: null,
    leagues: [
      { name: 'YBL · Youth Basketball League', level: 'National', record: '—', position: '—' },
    ],
    blurb: 'Our U16 entry into the Youth Basketball League. Registration is open — prices coming soon.' },

  // ---------- Local League — open · £20/mo · Monday nights ----------
  { id: 'mens-ll', name: 'Mens Local League', short: 'Mens LL', dotClass: 'dot-senior',
    barColor: '#1E4FA8', tag: 'Local League', tier: 'local', inviteOnly: false, bookable: true,
    coach: 'Mixed', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 14, training: 'Mon 20:30', venue: 'Melbourne Park',
    monthly: 20,
    leagues: [
      { name: 'Mens Local League', level: 'Local', record: '—', position: '—' },
    ],
    blurb: 'Open mens local-league team. Competitive Monday-night fixtures — sign up online and pay monthly by Direct Debit.' },

  { id: 'u18-ll', name: 'U18 Local League', short: 'U18 LL', dotClass: 'dot-u18',
    barColor: '#2563eb', tag: 'Local League', tier: 'local', inviteOnly: false, bookable: true,
    coach: 'Matt Parker', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 13, training: 'Mon 20:30', venue: 'Melbourne Park',
    monthly: 20,
    leagues: [
      { name: 'U18 Local League', level: 'Local', record: '—', position: '—' },
    ],
    blurb: 'Open U18 local-league team. Monday-night training and fixtures — pay monthly by Direct Debit.' },

  { id: 'u16-ll', name: 'U16 Local League', short: 'U16 LL', dotClass: 'dot-u16',
    barColor: '#3b82f6', tag: 'Local League', tier: 'local', inviteOnly: false, bookable: true,
    coach: 'Demarni Mclatchie', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 12, training: 'Mon 19:30', venue: 'Melbourne Park',
    monthly: 20,
    leagues: [
      { name: 'U16 Local League', level: 'Local', record: '—', position: '—' },
    ],
    blurb: 'Open U16 local-league team. Monday-night training and fixtures — pay monthly by Direct Debit.' },

  { id: 'u14-ll', name: 'U14 Local League', short: 'U14 LL', dotClass: 'dot-u14',
    barColor: '#60a5fa', tag: 'Local League', tier: 'local', inviteOnly: false, bookable: true,
    coach: 'Matt Parker', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 16, training: 'Mon 19:30', venue: 'Melbourne Park',
    monthly: 20,
    leagues: [
      { name: 'U14 Local League', level: 'Local', record: '—', position: '—' },
    ],
    blurb: 'Open U14 local-league team. Monday-night training and fixtures — pay monthly by Direct Debit.' },

  // ---------- Open ----------
  { id: 'u12', name: 'U12 Mixed', short: 'U12', dotClass: 'dot-u12',
    barColor: '#a78bfa', tag: 'Under 12', tier: 'open', inviteOnly: false, bookable: true,
    coach: 'TBC', coachEmail: 'admin@nottinghamathletic.com',
    record: '—', players: 14, training: 'Mon 18:30', venue: 'Melbourne Park',
    monthly: 15,
    leagues: [
      { name: 'U12 Local League', level: 'Local', record: '—', position: '—' },
    ],
    blurb: 'Our youngest squad. Pure basketball discovery — drills, scrimmages, fun. Monday evenings at Melbourne Park.' },
];

const SESSIONS = [
  { id: 's1', kind: 'community', title: 'Open Court — Adults', day: 'Monday', time: '20:30 – 22:00',
    venue: 'Melbourne Park', price: 6, ages: '16+', spots: 24, taken: 17,
    blurb: 'Drop-in pickup basketball. All standards. Bring water.' },
  { id: 's2', kind: 'community', title: 'Saturday Skills — Juniors', day: 'Saturday', time: '08:30 – 09:30',
    venue: 'CP Riverside', price: 5, ages: '7–11', spots: 20, taken: 12,
    blurb: 'Coach-led skills session. Footwork, ball handling, shooting form.' },
  { id: 's4', kind: 'community', title: 'Holiday Camp — Half Term', day: 'Mon–Fri', time: '09:30 – 15:30',
    venue: 'Melbourne Park', price: 35, ages: '8–14', spots: 40, taken: 31,
    blurb: 'Five-day camp. Lunch included. Tournament on Friday.' },
  { id: 's5', kind: 'private', title: 'Small-Group Skills', day: 'Flexible', time: '60 mins',
    venue: 'Melbourne Park', price: 25, ages: 'Any', spots: 6, taken: 0,
    blurb: '1-to-6 with a club coach. Book a date that suits.' },
  { id: 's6', kind: 'private', title: '1-to-1 Coaching', day: 'Flexible', time: '60 mins',
    venue: 'CP Riverside', price: 50, ages: 'Any', spots: 1, taken: 0,
    blurb: 'Personal session. Skills, conditioning, or game prep.' },
];

const MEMBERSHIPS = [
  { id: 'm1', name: 'Player monthly', price: 'From £30/mo',
    pitch: 'Train with your squad, league fees included, kit at member price.',
    perks: ['All squad training', 'League entry & match fees', 'Member kit pricing', 'Holiday camps at 30% off'],
    badge: 'Most popular' },
  { id: 'm2', name: 'Community drop-in', price: '£5–6 per session',
    pitch: 'Pay per session. Open court or skills — no commitment.',
    perks: ['Pay-as-you-go', 'Mix and match sessions', 'No long-term sign-up', 'Cap of £40/mo'] },
  { id: 'm3', name: 'Family unlimited', price: '£90/mo',
    pitch: 'Two or more siblings, all squads and community sessions, one payment.',
    perks: ['All siblings covered', 'All squad training', 'All community sessions', 'Family kit allowance'] },
  { id: 'm4', name: 'Performance plus', price: '£80/mo',
    pitch: 'Senior, U23, U18 — adds S&C, recovery clinic, and tour priority.',
    perks: ['All squad training', 'S&C with Edwards Performance', 'Recovery clinic — Causality Health', 'Priority for European tours'] },
];

// Fixtures are managed entirely from the coach app (Supabase `fixtures` view).
// We deliberately keep NO hardcoded/example fixtures here — an empty schedule
// must show "to be announced", never a placeholder game someone could turn up to.
const FIXTURES = [];

const COACHES = [
  { id: 'c0', name: 'Matt Parker', role: 'Founder & Director · U14 Head Coach', squad: 'u14',
    photo: 'assets/people/matt.jpg',
    bio: 'Founded the club in 2024. Oversees Nottingham Athletic and Athletic Academy CIC. Building the UK\u2019s first multi-sport elite club.',
    stats: 'Founder · 2024' },
  { id: 'c1', name: 'Kieran Wright', role: 'Head Coach · Senior', squad: 'senior',
    bio: 'Leads the senior men. Bio to come.',
    stats: 'Head Coach · Senior Men' },
  { id: 'c2', name: 'Hercules Ntounis', role: 'Head Coach · U23', squad: 'u23',
    bio: 'Leads the U23 men. Bio to come.',
    stats: 'Head Coach · U23 Men' },
  { id: 'c3', name: 'Matt Parker', role: 'Head Coach · U18', squad: 'u18',
    bio: 'Covering the U18 squad for now alongside his founder duties — see the founder profile above.',
    stats: 'Founder & Director · U18 (interim)' },
  { id: 'c4', name: 'Demarni Mclatchie', role: 'Head Coach · U16', squad: 'u16',
    photo: 'assets/people/demarni.jpg',
    bio: 'Leads the U16 National League squad. An experienced player who assisted the coaching staff across every level of the club last season, and a senior men\u2019s player from the very start of the team\u2019s pilot season.',
    stats: 'Head Coach · U16 National League · Senior Men #12' },
  { id: 'c6', name: 'Mixed', role: 'Head Coach · Local League', squad: 'mens-ll',
    bio: 'Coaching for our open Local League teams rotates across the senior staff.',
    stats: 'Mixed coaching team' },
  { id: 'c7', name: 'TBC', role: 'Head Coach · U12', squad: 'u12',
    bio: 'U12 head coach to be confirmed.',
    stats: 'TBC' },
];

const SPONSORS = [
  { name: 'Heronridge', tag: 'Principal partner',
    blurb: 'Backs the club at every level — from senior kit to the youngest squad. Principal partner since 2024.' },
  { name: 'Causality Health', tag: 'Performance partner',
    blurb: 'Supports player performance and recovery, with on-site clinic time across all seven squads.' },
  { name: 'Edwards Performance', tag: 'Strength & conditioning',
    blurb: 'Runs S&C across the senior, U23 and U18 squads. Programmes for the youth pathway.' },
  { name: 'RecoverPro', tag: 'Recovery partner',
    blurb: 'Post-game recovery for the senior squad and travel kit on away weekends.' },
];

const PRODUCTS = [
  { id: 'p1', name: 'Sticker book — season one', meta: 'Full-club collector book', price: 12, photo: 'photo-v1' },
  { id: 'p2', name: 'Sticker pack — Senior squad', meta: 'Ten matte vinyl stickers', price: 6, photo: 'photo-v3' },
  { id: 'p3', name: 'Avatar pack', meta: 'Ten of your custom avatar', price: 8, photo: 'photo-v5' },
  { id: 'p4', name: 'Poses pack — Hype', meta: 'Ten themed poses · personalised', price: 8, photo: 'photo-v2' },
  { id: 'p5', name: 'Poses pack — Shooting', meta: 'Ten themed poses · personalised', price: 8, photo: 'photo-v4' },
  { id: 'p6', name: 'Poses pack — Moves', meta: 'Ten themed poses · personalised', price: 8, photo: 'photo-v6' },
];

const VENUES = [
  { name: 'Melbourne Park', area: 'Aspley, Nottingham',
    addr: 'Melbourne Road, NG8 5HL', use: 'Senior · U16 · U12 · Junior Local League · Match nights' },
  { name: 'CP Riverside', area: 'Lady Bay, Nottingham',
    addr: 'Trent Side, NG2 5GJ', use: 'U18 · U14' },
  { name: 'NTU Clifton Campus', area: 'Clifton, Nottingham',
    addr: 'Clifton Lane, NG11 8NS', use: 'U23 · Strength & conditioning' },
  { name: 'School partner sites', area: 'Across Nottingham',
    addr: 'Various — Academy CIC delivery', use: 'Schools programme · Tournaments' },
];

const NEWS = [
  { id: 'n1', date: 'Wed 09 Apr', label: 'Match report',
    title: 'Senior men hold off Leicester to climb to fourth in NBL D3',
    photo: 'photo-v1' },
  { id: 'n2', date: 'Mon 31 Mar', label: 'European',
    title: 'Seventy-five expressions of interest for Budapest Summer League',
    photo: 'photo-v3' },
  { id: 'n3', date: 'Fri 21 Mar', label: 'Schools',
    title: 'Athletic Academy CIC adds new school partners across Nottingham',
    photo: 'photo-v5' },
];

const ACADEMY_SERVICES = [
  { t: 'In-school basketball coaching', d: 'PE-curriculum delivery and after-school clubs. Qualified coaches, club-quality kit, end-of-term tournaments.' },
  { t: 'Before & after-school clubs', d: 'Active wraparound care for primary schools — basketball-led, but built around play and routine.' },
  { t: 'Teaching assistant placements', d: 'Sports-specialist TAs placed in partner schools. Strong record with EAL and SEND learners.' },
  { t: 'Behaviour mentoring', d: 'One-to-one and small-group mentoring for pupils referred by the school. Sport as the entry point, not the answer.' },
  { t: 'Enrichment programmes', d: 'Curriculum-linked workshops — leadership, identity, healthy bodies. Booked by the half-term.' },
  { t: 'Year 6 Transition Programme', d: 'A structured programme for Y6 pupils moving up — building confidence, routine, and a peer group across schools.' },
];

const TRAVEL_COMPETITIONS = [
  { id: 'eybl',
    name: 'EYBL · European Youth Basketball League', short: 'EYBL',
    when: 'Season-long', dates: 'Multi-stage · across the season',
    location: 'Across Europe',
    eligibility: 'All age groups',
    capacity: 14, status: 'open',
    blurb: 'Nottingham Athletic aims to be a mainstay programme in the EYBL across all age groups — a FIBA-certified European youth league with multiple host-city stages through the season and a SuperFinal.' },

  { id: 'aau',
    name: 'AAU Circuits', short: 'AAU',
    when: 'Summer 2027', dates: 'Summer 2027',
    location: 'United States',
    eligibility: 'Selected age groups',
    capacity: 12, status: 'planned',
    blurb: 'Looking ahead to summer 2027, we plan to take teams onto the AAU circuits in the United States — high-level tournament basketball and exposure for our players. More details to follow.' },
];

const TRAVEL_TIMELINE = [];

const STAFF = [
  { id: 's-natty', name: 'Natty', role: 'Welfare Officer',
    photo: 'assets/people/natty.jpg',
    email: 'admin@nottinghamathletic.com',
    bio: "Basketball parent and active part of the club community. Passionate about creating a safe, supportive and positive environment where all players can enjoy the sport, grow in confidence and feel respected both on and off the court. Completed safeguarding training and is the point of contact for any support, guidance or concerns.",
    stats: 'Safeguarding trained · Point of contact for players, parents & coaches' },
  { id: 's-helen', name: 'Helen Yates', role: 'Safeguarding Officer',
    photo: 'assets/people/helen.jpg',
    email: 'admin@nottinghamathletic.com',
    bio: "Works in the voluntary sector managing support services for unpaid carers, and is the Designated Safeguarding Lead for her organisation. Volunteers as Chair of Governors at a local primary school, acting as the Safeguarding Link Governor. Keeps her knowledge current through regular training and up-to-date legislation. As both a parent and a professional, safeguarding is something she cares deeply about.",
    stats: 'DSL · Safeguarding Link Governor' },
  { id: 's-3', placeholder: true, role: 'Role to be announced' },
  { id: 's-4', placeholder: true, role: 'Role to be announced' },
  { id: 's-5', placeholder: true, role: 'Role to be announced' },
  { id: 's-6', placeholder: true, role: 'Role to be announced' },
  { id: 's-7', placeholder: true, role: 'Role to be announced' },
  { id: 's-8', placeholder: true, role: 'Role to be announced' },
];

window.NA_DATA = { NAVIGATION, SQUADS, FIXTURES, COACHES, SPONSORS, PRODUCTS, VENUES, NEWS, ACADEMY_SERVICES, TRAVEL_COMPETITIONS, TRAVEL_TIMELINE, SESSIONS, MEMBERSHIPS, STAFF };
