import _ from 'lodash';
import i18n from '~/locale/i18n';

const countries = [
	{ name: 'United States', spellings: 'US USA United States of America' },
	{ name: 'United Kingdom', spellings: 'GB Great Britain England UK Wales Scotland Northern Ireland' },
	{ name: 'Afghanistan', spellings: 'AF افغانستان' },
	{ name: 'Åland Islands', spellings: 'AX Aaland Aland' },
	{ name: 'Albania', spellings: 'AL' },
	{ name: 'Algeria', spellings: 'DZ الجزائر' },
	{ name: 'American Samoa', spellings: 'AS' },
	{ name: 'Andorra', spellings: 'AD' },
	{ name: 'Angola', spellings: 'AO' },
	{ name: 'Anguilla', spellings: 'AI' },
	{ name: 'Antarctica', spellings: 'AQ' },
	{ name: 'Antigua And Barbuda', spellings: 'AG' },
	{ name: 'Argentina', spellings: 'AR' },
	{ name: 'Armenia', spellings: 'AM Հայաստան' },
	{ name: 'Aruba', spellings: 'AW' },
	{ name: 'Australia', spellings: 'AU' },
	{ name: 'Austria', spellings: 'AT Österreich Osterreich Ohesterreich ' },
	{ name: 'Azerbaijan', spellings: 'AZ' },
	{ name: 'Bahamas', spellings: 'BS' },
	{ name: 'Bahrain', spellings: 'BH البحرين' },
	{ name: 'Bangladesh', spellings: 'BD বাংলাদেশ' },
	{ name: 'Barbados', spellings: 'BB' },
	{ name: 'Belarus', spellings: 'BY Беларусь' },
	{ name: 'Belgium', spellings: 'BE België Belgie Belgien Belgique' },
	{ name: 'Belize', spellings: 'BZ' },
	{ name: 'Benin', spellings: 'BJ' },
	{ name: 'Bermuda', spellings: 'BM' },
	{ name: 'Bhutan', spellings: 'BT भूटान' },
	{ name: 'Bolivia', spellings: 'BO' },
	{ name: 'Bonaire, Sint Eustatius and Saba', spellings: 'BQ' },
	{ name: 'Bosnia and Herzegovina', spellings: 'BA Босна и Херцеговина' },
	{ name: 'Botswana', spellings: 'BW' },
	{ name: 'Bouvet Island', spellings: 'BV' },
	{ name: 'Brazil', spellings: 'BR Brasil' },
	{ name: 'British Indian Ocean Territory', spellings: 'IO' },
	{ name: 'Brunei Darussalam', spellings: 'BN' },
	{ name: 'Bulgaria', spellings: 'BG България' },
	{ name: 'Burkina Faso', spellings: 'BF' },
	{ name: 'Burundi', spellings: 'BI' },
	{ name: 'Cambodia', spellings: 'KH កម្ពុជា' },
	{ name: 'Cameroon', spellings: 'CM' },
	{ name: 'Canada', spellings: 'CA' },
	{ name: 'Cape Verde', spellings: 'CV Cabo' },
	{ name: 'Cayman Islands', spellings: 'KY' },
	{ name: 'Central African Republic', spellings: 'CF' },
	{ name: 'Chad', spellings: 'TD تشاد‎ Tchad' },
	{ name: 'Chile', spellings: 'CL' },
	{ name: 'China', spellings: 'CN Zhongguo Zhonghua Peoples Republic 中国/中华' },
	{ name: 'Christmas Island', spellings: 'CX' },
	{ name: 'Cocos (Keeling) Islands', spellings: 'CC' },
	{ name: 'Colombia', spellings: 'CO' },
	{ name: 'Comoros', spellings: 'KM جزر القمر' },
	{ name: 'Congo', spellings: 'CG' },
	{ name: 'Congo, the Democratic Republic of the', spellings: 'CD Congo-Brazzaville Repubilika ya Kongo' },
	{ name: 'Cook Islands', spellings: 'CK' },
	{ name: 'Costa Rica', spellings: 'CR' },
	{ name: 'Côte d\'Ivoire', spellings: 'CI Cote dIvoire' },
	{ name: 'Croatia', spellings: 'HR Hrvatska' },
	{ name: 'Cuba', spellings: 'CU' },
	{ name: 'Curaçao', spellings: 'CW Curacao' },
	{ name: 'Cyprus', spellings: 'CY Κύπρος Kýpros Kıbrıs' },
	{ name: 'Czech Republic', spellings: 'CZ Česká Ceska' },
	{ name: 'Denmark', spellings: 'DK Danmark' },
	{ name: 'Djibouti', spellings: 'DJ جيبوتي‎ Jabuuti Gabuuti' },
	{ name: 'Dominica', spellings: 'DM Dominique' },
	{ name: 'Dominican Republic', spellings: 'DO' },
	{ name: 'Ecuador', spellings: 'EC' },
	{ name: 'Egypt', spellings: 'EG' },
	{ name: 'El Salvador', spellings: 'SV' },
	{ name: 'Equatorial Guinea', spellings: 'GQ' },
	{ name: 'Eritrea', spellings: 'ER إرتريا ኤርትራ' },
	{ name: 'Estonia', spellings: 'EE Eesti' },
	{ name: 'Ethiopia', spellings: 'ET ኢትዮጵያ' },
	{ name: 'Falkland Islands (Malvinas)', spellings: 'FK' },
	{ name: 'Faroe Islands', spellings: 'FO Føroyar Færøerne' },
	{ name: 'Fiji', spellings: 'FJ Viti फ़िजी' },
	{ name: 'Finland', spellings: 'FI Suomi' },
	{ name: 'France', spellings: 'FR République française' },
	{ name: 'French Guiana', spellings: 'GF' },
	{ name: 'French Polynesia', spellings: 'PF Polynésie française' },
	{ name: 'French Southern Territories', spellings: 'TF' },
	{ name: 'Gabon', spellings: 'GA République Gabonaise' },
	{ name: 'Gambia', spellings: 'GM' },
	{ name: 'Georgia', spellings: 'GE საქართველო' },
	{ name: 'Germany', spellings: 'DE Bundesrepublik Deutschland' },
	{ name: 'Ghana', spellings: 'GH' },
	{ name: 'Gibraltar', spellings: 'GI' },
	{ name: 'Greece', spellings: 'GR Ελλάδα' },
	{ name: 'Greenland', spellings: 'GL grønland' },
	{ name: 'Grenada', spellings: 'GD' },
	{ name: 'Guadeloupe', spellings: 'GP' },
	{ name: 'Guam', spellings: 'GU' },
	{ name: 'Guatemala', spellings: 'GT' },
	{ name: 'Guernsey', spellings: 'GG' },
	{ name: 'Guinea', spellings: 'GN' },
	{ name: 'Guinea-Bissau', spellings: 'GW' },
	{ name: 'Guyana', spellings: 'GY' },
	{ name: 'Haiti', spellings: 'HT' },
	{ name: 'Heard Island and McDonald Islands', spellings: 'HM' },
	{ name: 'Holy See (Vatican City State)', spellings: 'VA' },
	{ name: 'Honduras', spellings: 'HN' },
	{ name: 'Hong Kong', spellings: 'HK 香港' },
	{ name: 'Hungary', spellings: 'HU Magyarország' },
	{ name: 'Iceland', spellings: 'IS Island' },
	{ name: 'India', spellings: 'IN भारत गणराज्य Hindustan' },
	{ name: 'Indonesia', spellings: 'ID' },
	{ name: 'Iran, Islamic Republic of', spellings: 'IR ایران' },
	{ name: 'Iraq', spellings: 'IQ العراق‎' },
	{ name: 'Ireland', spellings: 'IE Éire' },
	{ name: 'Isle of Man', spellings: 'IM' },
	{ name: 'Israel', spellings: 'IL إسرائيل ישראל' },
	{ name: 'Italy', spellings: 'IT Italia' },
	{ name: 'Jamaica', spellings: 'JM' },
	{ name: 'Japan', spellings: 'JP Nippon Nihon 日本' },
	{ name: 'Jersey', spellings: 'JE' },
	{ name: 'Jordan', spellings: 'JO الأردن' },
	{ name: 'Kazakhstan', spellings: 'KZ Қазақстан Казахстан' },
	{ name: 'Kenya', spellings: 'KE' },
	{ name: 'Kiribati', spellings: 'KI' },
	{ name: 'Korea, Democratic People\'s Republic of', spellings: 'KP North Korea' },
	{ name: 'Korea, Republic of', spellings: 'KR South Korea' },
	{ name: 'Kuwait', spellings: 'KW الكويت' },
	{ name: 'Kyrgyzstan', spellings: 'KG Кыргызстан' },
	{ name: 'Lao People\'s Democratic Republic', spellings: 'LA' },
	{ name: 'Latvia', spellings: 'LV Latvija' },
	{ name: 'Lebanon', spellings: 'LB لبنان' },
	{ name: 'Lesotho', spellings: 'LS' },
	{ name: 'Liberia', spellings: 'LR' },
	{ name: 'Libyan Arab Jamahiriya', spellings: 'LY ليبيا' },
	{ name: 'Liechtenstein', spellings: 'LI' },
	{ name: 'Lithuania', spellings: 'LT Lietuva' },
	{ name: 'Luxembourg', spellings: 'LU' },
	{ name: 'Macao', spellings: 'MO' },
	{ name: 'Macedonia, The Former Yugoslav Republic Of', spellings: 'MK Македонија' },
	{ name: 'Madagascar', spellings: 'MG Madagasikara' },
	{ name: 'Malawi', spellings: 'MW' },
	{ name: 'Malaysia', spellings: 'MY' },
	{ name: 'Maldives', spellings: 'MV' },
	{ name: 'Mali', spellings: 'ML' },
	{ name: 'Malta', spellings: 'MT' },
	{ name: 'Marshall Islands', spellings: 'MH' },
	{ name: 'Martinique', spellings: 'MQ' },
	{ name: 'Mauritania', spellings: 'MR الموريتانية' },
	{ name: 'Mauritius', spellings: 'MU' },
	{ name: 'Mayotte', spellings: 'YT' },
	{ name: 'Mexico', spellings: 'MX Mexicanos' },
	{ name: 'Micronesia, Federated States of', spellings: 'FM' },
	{ name: 'Moldova, Republic of', spellings: 'MD' },
	{ name: 'Monaco', spellings: 'MC' },
	{ name: 'Mongolia', spellings: 'MN Mongγol ulus Монгол улс' },
	{ name: 'Montenegro', spellings: 'ME' },
	{ name: 'Montserrat', spellings: 'MS' },
	{ name: 'Morocco', spellings: 'MA المغرب' },
	{ name: 'Mozambique', spellings: 'MZ Moçambique' },
	{ name: 'Myanmar', spellings: 'MM' },
	{ name: 'Namibia', spellings: 'NA Namibië' },
	{ name: 'Nauru', spellings: 'NR Naoero' },
	{ name: 'Nepal', spellings: 'NP नेपाल' },
	{ name: 'Netherlands', spellings: 'NL Holland Nederland' },
	{ name: 'New Caledonia', spellings: 'NC' },
	{ name: 'New Zealand', spellings: 'NZ Aotearoa' },
	{ name: 'Nicaragua', spellings: 'NI' },
	{ name: 'Niger', spellings: 'NE Nijar' },
	{ name: 'Nigeria', spellings: 'NG Nijeriya Naíjíríà' },
	{ name: 'Niue', spellings: 'NU' },
	{ name: 'Norfolk Island', spellings: 'NF' },
	{ name: 'Northern Mariana Islands', spellings: 'MP' },
	{ name: 'Norway', spellings: 'NO Norge Noreg' },
	{ name: 'Oman', spellings: 'OM عمان' },
	{ name: 'Pakistan', spellings: 'PK پاکستان' },
	{ name: 'Palau', spellings: 'PW' },
	{ name: 'Palestinian Territory, Occupied', spellings: 'PS فلسطين' },
	{ name: 'Panama', spellings: 'PA' },
	{ name: 'Papua New Guinea', spellings: 'PG' },
	{ name: 'Paraguay', spellings: 'PY' },
	{ name: 'Peru', spellings: 'PE' },
	{ name: 'Philippines', spellings: 'PH Pilipinas' },
	{ name: 'Pitcairn', spellings: 'PN' },
	{ name: 'Poland', spellings: 'PL Polska' },
	{ name: 'Portugal', spellings: 'PT Portuguesa' },
	{ name: 'Puerto Rico', spellings: 'PR' },
	{ name: 'Qatar', spellings: 'QA قطر' },
	{ name: 'Réunion', spellings: 'RE Reunion' },
	{ name: 'Romania', spellings: 'RO Rumania Roumania România' },
	{ name: 'Russian Federation', spellings: 'RU Rossiya Российская Россия' },
	{ name: 'Rwanda', spellings: 'RW' },
	{ name: 'Saint Barthélemy', spellings: 'BL St. Barthelemy' },
	{ name: 'Saint Helena', spellings: 'SH St.' },
	{ name: 'Saint Kitts and Nevis', spellings: 'KN St.' },
	{ name: 'Saint Lucia', spellings: 'LC St.' },
	{ name: 'Saint Martin (French Part)', spellings: 'MF St.' },
	{ name: 'Saint Pierre and Miquelon', spellings: 'PM St.' },
	{ name: 'Saint Vincent and the Grenadines', spellings: 'VC St.' },
	{ name: 'Samoa', spellings: 'WS' },
	{ name: 'San Marino', spellings: 'SM' },
	{ name: 'Sao Tome and Principe', spellings: 'ST' },
	{ name: 'Saudi Arabia', spellings: 'SA السعودية' },
	{ name: 'Senegal', spellings: 'SN Sénégal' },
	{ name: 'Serbia', spellings: 'RS Србија Srbija' },
	{ name: 'Seychelles', spellings: 'SC' },
	{ name: 'Sierra Leone', spellings: 'SL' },
	{ name: 'Singapore', spellings: 'SG Singapura சிங்கப்பூர் குடியரசு 新加坡共和国' },
	{ name: 'Sint Maarten (Dutch Part)', spellings: 'SX' },
	{ name: 'Slovakia', spellings: 'SK Slovenská Slovensko' },
	{ name: 'Slovenia', spellings: 'SI Slovenija' },
	{ name: 'Solomon Islands', spellings: 'SB' },
	{ name: 'Somalia', spellings: 'SO الصومال' },
	{ name: 'South Africa', spellings: 'ZA RSA Suid-Afrika' },
	{ name: 'South Georgia and the South Sandwich Islands', spellings: 'GS' },
	{ name: 'South Sudan', spellings: 'SS' },
	{ name: 'Spain', spellings: 'ES España' },
	{ name: 'Sri Lanka', spellings: 'LK ශ්‍රී ලංකා இலங்கை Ceylon' },
	{ name: 'Sudan', spellings: 'SD السودان' },
	{ name: 'Suriname', spellings: 'SR शर्नम् Sarnam Sranangron' },
	{ name: 'Svalbard and Jan Mayen', spellings: 'SJ' },
	{ name: 'Swaziland', spellings: 'SZ weSwatini Swatini Ngwane' },
	{ name: 'Sweden', spellings: 'SE Sverige' },
	{ name: 'Switzerland', spellings: 'CH Swiss Confederation Schweiz Suisse Svizzera Svizra' },
	{ name: 'Syrian Arab Republic', spellings: 'SY Syria سورية' },
	{ name: 'Taiwan, Province of China', spellings: 'TW 台灣 臺灣' },
	{ name: 'Tajikistan', spellings: 'TJ Тоҷикистон Toçikiston' },
	{ name: 'Tanzania, United Republic of', spellings: 'TZ' },
	{ name: 'Thailand', spellings: 'TH ประเทศไทย Prathet Thai' },
	{ name: 'Timor-Leste', spellings: 'TL' },
	{ name: 'Togo', spellings: 'TG Togolese' },
	{ name: 'Tokelau', spellings: 'TK' },
	{ name: 'Tonga', spellings: 'TO' },
	{ name: 'Trinidad and Tobago', spellings: 'TT' },
	{ name: 'Tunisia', spellings: 'TN تونس' },
	{ name: 'Turkey', spellings: 'TR Türkiye Turkiye' },
	{ name: 'Turkmenistan', spellings: 'TM Türkmenistan' },
	{ name: 'Turks and Caicos Islands', spellings: 'TC' },
	{ name: 'Tuvalu', spellings: 'TV' },
	{ name: 'Uganda', spellings: 'UG' },
	{ name: 'Ukraine', spellings: 'UA Ukrayina Україна' },
	{ name: 'United Arab Emirates', spellings: 'AE UAE الإمارات' },
	{ name: 'United States Minor Outlying Islands', spellings: 'UM' },
	{ name: 'Uruguay', spellings: 'UY' },
	{ name: 'Uzbekistan', spellings: 'UZ Ўзбекистон O\'zbekstan O‘zbekiston' },
	{ name: 'Vanuatu', spellings: 'VU' },
	{ name: 'Venezuela', spellings: 'VE' },
	{ name: 'Vietnam', spellings: 'VN Việt Nam' },
	{ name: 'Virgin Islands, British', spellings: 'VG' },
	{ name: 'Virgin Islands, US', spellings: 'VI' },
	{ name: 'Wallis and Futuna', spellings: 'WF' },
	{ name: 'Western Sahara', spellings: 'EH لصحراء الغربية' },
	{ name: 'Yemen', spellings: 'YE اليمن' },
	{ name: 'Zambia', spellings: 'ZM' },
	{ name: 'Zimbabwe', spellings: 'ZW' },
];

export const getCountries = () => _.map(countries, (country) => ({
	...country,
	displayName: i18n.t(`countries.${country.name}`),
	spellings: `${country.spellings} ${i18n.t(`countries.${country.name}`)}`,
}));
