export const REFRESH_INTERVAL_OPTIONS = [
  { label: '1s', value: 1000 },
  { label: '3s', value: 3000 },
  { label: '5s', value: 5000 },
  { label: '10s', value: 10000 },
  { label: '30s', value: 30000 },
  { label: '60s', value: 60000 },
  { label: '180s', value: 180000 }
]

export const DEFAULT_REFRESH_INTERVAL_MS = 60000

export function formatRefreshInterval(value) {
  const option = REFRESH_INTERVAL_OPTIONS.find((item) => item.value === Number(value))
  return option?.label || '60s'
}
