export const API_RESPONSE_STATUS = {
  OK: 'ok',
  ERROR: 'error',
}

export const assingAirQuality = (magnitude: number): { color: string; quality: string } => {
  let color = '#9D9F93'
  let quality = ''
  if (0 <= magnitude && magnitude <= 50) {
    color = '#009966'
    quality = 'Buena'
  } else if (51 <= magnitude && magnitude <= 100) {
    color = '#FFDE33'
    quality = 'Moderada'
  } else if (101 <= magnitude && magnitude <= 150) {
    color = '#FF9933'
    quality = 'Dañina a grupos sensibles'
  } else if (151 <= magnitude && magnitude <= 200) {
    color = '#CC0033'
    quality = 'Dañina a la salud'
  } else if (201 <= magnitude && magnitude <= 300) {
    color = '#660099'
    quality = 'Muy dañina a la salud'
  } else if (magnitude >= 301) {
    color = '#7E0023'
    quality = 'Arriesgado'
  }
  return { color, quality }
}
