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'	// 印尼语
import es from './es'	// 西班牙语
import ru from './ru'	// 俄语
import pt from './pt'	// 葡萄牙语
import de from './de'	// 德语
import fr from './fr'	// 法语
import tr from './tr'	// 土耳其语
import vi from './vi'	// 越南语

export type SupportedLocale = 'zh-CN' | 'zh-TW' | 'en' | 'ko' | 'ja' | 'hi' | 'id' | 'es' | 'ru' | 'pt' | 'de' | 'fr' | 'tr' | 'vi'

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' }, 
  { code: 'es',    label: 'Español',   nativeLabel: 'Español' },
  { code: 'ru',    label: 'Русский',  nativeLabel: 'Русский' },
  { code: 'pt',    label: 'Português', nativeLabel: 'Português' },
  { code: 'de',    label: 'Deutsch',   nativeLabel: 'Deutsch' },
  { code: 'fr',    label: 'Français',  nativeLabel: 'Français' },
  { code: 'tr',    label: 'Türkçe',    nativeLabel: 'Türkçe' },
  { code: 'vi',    label: 'Tiếng Việt', nativeLabel: 'Tiếng Việt' },
]

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,
  es,
  ru,
  pt,
  de,
  fr,
  tr,
  vi
}

export type MessageSchema = typeof zhCN