import { HeartbeatLevel } from '@/services/im'

export function useHeartLevelTextFromLevel(level?: HeartbeatLevel | null) {
  if (!level) return ''

  const levelTextMap = {
    [HeartbeatLevel.Level1]: 'Lv.1',
    [HeartbeatLevel.Level2]: 'Lv.2',
    [HeartbeatLevel.Level3]: 'Lv.3',
    [HeartbeatLevel.Level4]: 'Lv.4',
    [HeartbeatLevel.Level5]: 'Lv.5',
    [HeartbeatLevel.Level6]: 'Lv.6',
    [HeartbeatLevel.Level7]: 'Lv.7',
    [HeartbeatLevel.Level8]: 'Lv.8',
    [HeartbeatLevel.Level9]: 'Lv.9',
    [HeartbeatLevel.Level10]: 'Lv.10',
  }
  return levelTextMap[level]
}
