export type MatchPhase = 'open' | 'closed_pending' | 'settled';

export function matchPhaseLabel(t: (key: string) => string, phase?: MatchPhase | null) {
  if (phase === 'closed_pending') return t('bet.match_phase_closed_pending');
  if (phase === 'settled') return t('bet.match_phase_settled');
  return '';
}

export function matchPhaseVariant(phase?: MatchPhase | null): 'closed' | 'settled' | 'pending' {
  if (phase === 'settled') return 'settled';
  if (phase === 'closed_pending') return 'closed';
  return 'pending';
}
