// from: https://github.com/meikidd/iso-639-1/blob/master/src/data.js
const languages: Record<string, { name: string; nativeName: string }> = {
  ar: {
    name: 'Arabic',
    nativeName: 'اَلْعَرَبِيَّةُ',
  },
  de: {
    name: 'German',
    nativeName: 'Deutsch',
  },
  en: {
    name: 'English',
    nativeName: 'English',
  },
  es: {
    name: 'Spanish',
    nativeName: 'Español',
  },
  fr: {
    name: 'French',
    nativeName: 'Français',
  },
  it: {
    name: 'Italian',
    nativeName: 'Italiano',
  },
  ja: {
    name: 'Japanese',
    nativeName: '日本語',
  },
  ko: {
    name: 'Korean',
    nativeName: '한국어',
  },
  mn: {
    name: 'Mongolian',
    nativeName: 'Монгол хэл',
  },
  pt: {
    name: 'Portuguese',
    nativeName: 'Português',
  },
  ru: {
    name: 'Russian',
    nativeName: 'Русский',
  },
  zh: {
    name: 'Simplified Chinese',
    nativeName: '简体中文',
  },
  'zh-TW': {
    name: 'Traditional Chinese',
    nativeName: '繁體中文',
  },
};

export default Object.keys(languages).map((code) => ({ code, ...languages[code] }));
export { languages as map };
