/**
 * Player-specific constants
 */

export const TIMER_RING_SIZE = 280
export const TIMER_RING_STROKE = 12

/** Motivational messages shown during REST phase */
export const COACH_MESSAGES = {
  early: [
    'Great start! Keep it up!',
    'Nice form! Stay strong!',
    'You\'re warming up perfectly!',
    'Breathe deep, stay focused!',
  ],
  mid: [
    'Shake it out, you\'re doing great!',
    'Halfway there! Stay strong!',
    'You\'re crushing it!',
    'Keep that energy up!',
  ],
  late: [
    'Almost there! Push through!',
    'Final stretch! Give it everything!',
    'You\'ve got this! Don\'t stop!',
    'Last rounds! Finish strong!',
  ],
  prep: [
    'Get ready!',
    'Focus your mind!',
    'Here we go!',
    'Breathe and prepare!',
  ],
} as const

/** Get a coach message based on round progress */
export function getCoachMessage(currentRound: number, totalRounds: number): string {
  const progress = currentRound / totalRounds
  let pool: readonly string[]

  if (progress <= 0.33) {
    pool = COACH_MESSAGES.early
  } else if (progress <= 0.66) {
    pool = COACH_MESSAGES.mid
  } else {
    pool = COACH_MESSAGES.late
  }

  return pool[currentRound % pool.length]
}
