import zhCN from './zh-CN'
import zhTW from './zh-TW'
import en from './en'
import ko from './ko'
import ja from './ja'
import hi from './hi'
import id from './id'

export type SupportedLocale = 'zh-CN' | 'zh-TW' | 'en' | 'ko' | 'ja' | 'hi' | 'id'

export const SUPPORTED_LOCALES: { code: SupportedLocale; label: string; nativeLabel: string }[] = [
  { code: 'zh-CN', label: '简体中文', nativeLabel: '简体中文' },
  { code: 'zh-TW', label: '繁體中文', nativeLabel: '繁體中文' },
  { code: 'en',    label: 'English',  nativeLabel: 'English' },
  { code: 'ko',    label: '한국어',    nativeLabel: '한국어' },
  { code: 'ja',    label: '日本語',    nativeLabel: '日本語' },
  { code: 'hi',    label: 'हिन्दी',   nativeLabel: 'हिन्दी' },
  { code: 'id',    label: 'Bahasa Indonesia', nativeLabel: 'Bahasa Indonesia' },
]

export const DEFAULT_LOCALE: SupportedLocale = 'zh-CN'
export const LOCALE_STORAGE_KEY = 'cv_lang'

export const messages = {
  'zh-CN': zhCN,
  'zh-TW': zhTW,
  en,
  ko,
  ja,
  hi,
  id,
}

export type MessageSchema = typeof zhCN
