File size: 447 Bytes
9d2d895
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import type { CountryScore } from '@/services/country-instability';

export type CiiBand = 'stable' | 'elevated' | 'high' | 'critical';

/** Map the canonical CII level to the deep-dive panel's existing visual bands. */
export function ciiBandForLevel(level: CountryScore['level']): CiiBand {
  if (level === 'critical') return 'critical';
  if (level === 'high') return 'high';
  if (level === 'elevated') return 'elevated';
  return 'stable';
}