<?php

namespace App\Classes;

class Country
{
    public static function all()
    {
        return [
            "AF" => translate("Afghanistan"),
            "AL" => translate("Albania"),
            "DZ" => translate("Algeria"),
            "AS" => translate("American Samoa"),
            "AD" => translate("Andorra"),
            "AO" => translate("Angola"),
            "AI" => translate("Anguilla"),
            "AQ" => translate("Antarctica"),
            "AG" => translate("Antigua and Barbuda"),
            "AR" => translate("Argentina"),
            "AM" => translate("Armenia"),
            "AW" => translate("Aruba"),
            "AU" => translate("Australia"),
            "AT" => translate("Austria"),
            "AZ" => translate("Azerbaijan"),
            "BS" => translate("Bahamas"),
            "BH" => translate("Bahrain"),
            "BD" => translate("Bangladesh"),
            "BB" => translate("Barbados"),
            "BY" => translate("Belarus"),
            "BE" => translate("Belgium"),
            "BZ" => translate("Belize"),
            "BJ" => translate("Benin"),
            "BM" => translate("Bermuda"),
            "BT" => translate("Bhutan"),
            "BO" => translate("Bolivia"),
            "BA" => translate("Bosnia and Herzegovina"),
            "BW" => translate("Botswana"),
            "BV" => translate("Bouvet Island"),
            "BR" => translate("Brazil"),
            "BQ" => translate("British Antarctic Territory"),
            "IO" => translate("British Indian Ocean Territory"),
            "VG" => translate("British Virgin Islands"),
            "BN" => translate("Brunei"),
            "BG" => translate("Bulgaria"),
            "BF" => translate("Burkina Faso"),
            "BI" => translate("Burundi"),
            "KH" => translate("Cambodia"),
            "CM" => translate("Cameroon"),
            "CA" => translate("Canada"),
            "CT" => translate("Canton and Enderbury Islands"),
            "CV" => translate("Cape Verde"),
            "KY" => translate("Cayman Islands"),
            "CF" => translate("Central African Republic"),
            "TD" => translate("Chad"),
            "CL" => translate("Chile"),
            "CN" => translate("China"),
            "CX" => translate("Christmas Island"),
            "CC" => translate("Cocos [Keeling] Islands"),
            "CO" => translate("Colombia"),
            "KM" => translate("Comoros"),
            "CG" => translate("Congo - Brazzaville"),
            "CD" => translate("Congo - Kinshasa"),
            "CK" => translate("Cook Islands"),
            "CR" => translate("Costa Rica"),
            "HR" => translate("Croatia"),
            "CU" => translate("Cuba"),
            "CY" => translate("Cyprus"),
            "CZ" => translate("Czech Republic"),
            "CI" => translate("Côte d’Ivoire"),
            "DK" => translate("Denmark"),
            "DJ" => translate("Djibouti"),
            "DM" => translate("Dominica"),
            "DO" => translate("Dominican Republic"),
            "NQ" => translate("Dronning Maud Land"),
            "DD" => translate("East Germany"),
            "EC" => translate("Ecuador"),
            "EG" => translate("Egypt"),
            "SV" => translate("El Salvador"),
            "GQ" => translate("Equatorial Guinea"),
            "ER" => translate("Eritrea"),
            "EE" => translate("Estonia"),
            "ET" => translate("Ethiopia"),
            "FK" => translate("Falkland Islands"),
            "FO" => translate("Faroe Islands"),
            "FJ" => translate("Fiji"),
            "FI" => translate("Finland"),
            "FR" => translate("France"),
            "GF" => translate("French Guiana"),
            "PF" => translate("French Polynesia"),
            "TF" => translate("French Southern Territories"),
            "FQ" => translate("French Southern and Antarctic Territories"),
            "GA" => translate("Gabon"),
            "GM" => translate("Gambia"),
            "GE" => translate("Georgia"),
            "DE" => translate("Germany"),
            "GH" => translate("Ghana"),
            "GI" => translate("Gibraltar"),
            "GR" => translate("Greece"),
            "GL" => translate("Greenland"),
            "GD" => translate("Grenada"),
            "GP" => translate("Guadeloupe"),
            "GU" => translate("Guam"),
            "GT" => translate("Guatemala"),
            "GG" => translate("Guernsey"),
            "GN" => translate("Guinea"),
            "GW" => translate("Guinea-Bissau"),
            "GY" => translate("Guyana"),
            "HT" => translate("Haiti"),
            "HM" => translate("Heard Island and McDonald Islands"),
            "HN" => translate("Honduras"),
            "HK" => translate("Hong Kong SAR China"),
            "HU" => translate("Hungary"),
            "IS" => translate("Iceland"),
            "IN" => translate("India"),
            "ID" => translate("Indonesia"),
            "IR" => translate("Iran"),
            "IQ" => translate("Iraq"),
            "IE" => translate("Ireland"),
            "IM" => translate("Isle of Man"),
            "IL" => translate("Israel"),
            "IT" => translate("Italy"),
            "JM" => translate("Jamaica"),
            "JP" => translate("Japan"),
            "JE" => translate("Jersey"),
            "JT" => translate("Johnston Island"),
            "JO" => translate("Jordan"),
            "KZ" => translate("Kazakhstan"),
            "KE" => translate("Kenya"),
            "KI" => translate("Kiribati"),
            "KW" => translate("Kuwait"),
            "KG" => translate("Kyrgyzstan"),
            "LA" => translate("Laos"),
            "LV" => translate("Latvia"),
            "LB" => translate("Lebanon"),
            "LS" => translate("Lesotho"),
            "LR" => translate("Liberia"),
            "LY" => translate("Libya"),
            "LI" => translate("Liechtenstein"),
            "LT" => translate("Lithuania"),
            "LU" => translate("Luxembourg"),
            "MO" => translate("Macau SAR China"),
            "MK" => translate("Macedonia"),
            "MG" => translate("Madagascar"),
            "MW" => translate("Malawi"),
            "MY" => translate("Malaysia"),
            "MV" => translate("Maldives"),
            "ML" => translate("Mali"),
            "MT" => translate("Malta"),
            "MH" => translate("Marshall Islands"),
            "MQ" => translate("Martinique"),
            "MR" => translate("Mauritania"),
            "MU" => translate("Mauritius"),
            "YT" => translate("Mayotte"),
            "FX" => translate("Metropolitan France"),
            "MX" => translate("Mexico"),
            "FM" => translate("Micronesia"),
            "MI" => translate("Midway Islands"),
            "MD" => translate("Moldova"),
            "MC" => translate("Monaco"),
            "MN" => translate("Mongolia"),
            "ME" => translate("Montenegro"),
            "MS" => translate("Montserrat"),
            "MA" => translate("Morocco"),
            "MZ" => translate("Mozambique"),
            "MM" => translate("Myanmar [Burma]"),
            "NA" => translate("Namibia"),
            "NR" => translate("Nauru"),
            "NP" => translate("Nepal"),
            "NL" => translate("Netherlands"),
            "AN" => translate("Netherlands Antilles"),
            "NT" => translate("Neutral Zone"),
            "NC" => translate("New Caledonia"),
            "NZ" => translate("New Zealand"),
            "NI" => translate("Nicaragua"),
            "NE" => translate("Niger"),
            "NG" => translate("Nigeria"),
            "NU" => translate("Niue"),
            "NF" => translate("Norfolk Island"),
            "KP" => translate("North Korea"),
            "VD" => translate("North Vietnam"),
            "MP" => translate("Northern Mariana Islands"),
            "NO" => translate("Norway"),
            "OM" => translate("Oman"),
            "PC" => translate("Pacific Islands Trust Territory"),
            "PK" => translate("Pakistan"),
            "PW" => translate("Palau"),
            "PS" => translate("Palestinian Territories"),
            "PA" => translate("Panama"),
            "PZ" => translate("Panama Canal Zone"),
            "PG" => translate("Papua New Guinea"),
            "PY" => translate("Paraguay"),
            "YD" => translate("People's Democratic Republic of Yemen"),
            "PE" => translate("Peru"),
            "PH" => translate("Philippines"),
            "PN" => translate("Pitcairn Islands"),
            "PL" => translate("Poland"),
            "PT" => translate("Portugal"),
            "PR" => translate("Puerto Rico"),
            "QA" => translate("Qatar"),
            "RO" => translate("Romania"),
            "RU" => translate("Russia"),
            "RW" => translate("Rwanda"),
            "RE" => translate("Réunion"),
            "BL" => translate("Saint Barthélemy"),
            "SH" => translate("Saint Helena"),
            "KN" => translate("Saint Kitts and Nevis"),
            "LC" => translate("Saint Lucia"),
            "MF" => translate("Saint Martin"),
            "PM" => translate("Saint Pierre and Miquelon"),
            "VC" => translate("Saint Vincent and the Grenadines"),
            "WS" => translate("Samoa"),
            "SM" => translate("San Marino"),
            "SA" => translate("Saudi Arabia"),
            "SN" => translate("Senegal"),
            "RS" => translate("Serbia"),
            "CS" => translate("Serbia and Montenegro"),
            "SC" => translate("Seychelles"),
            "SL" => translate("Sierra Leone"),
            "SG" => translate("Singapore"),
            "SK" => translate("Slovakia"),
            "SI" => translate("Slovenia"),
            "SB" => translate("Solomon Islands"),
            "SO" => translate("Somalia"),
            "ZA" => translate("South Africa"),
            "GS" => translate("South Georgia and the South Sandwich Islands"),
            "KR" => translate("South Korea"),
            "ES" => translate("Spain"),
            "LK" => translate("Sri Lanka"),
            "SD" => translate("Sudan"),
            "SR" => translate("Suriname"),
            "SJ" => translate("Svalbard and Jan Mayen"),
            "SZ" => translate("Swaziland"),
            "SE" => translate("Sweden"),
            "CH" => translate("Switzerland"),
            "SY" => translate("Syria"),
            "ST" => translate("São Tomé and Príncipe"),
            "TW" => translate("Taiwan"),
            "TJ" => translate("Tajikistan"),
            "TZ" => translate("Tanzania"),
            "TH" => translate("Thailand"),
            "TL" => translate("Timor-Leste"),
            "TG" => translate("Togo"),
            "TK" => translate("Tokelau"),
            "TO" => translate("Tonga"),
            "TT" => translate("Trinidad and Tobago"),
            "TN" => translate("Tunisia"),
            "TR" => translate("Turkey"),
            "TM" => translate("Turkmenistan"),
            "TC" => translate("Turks and Caicos Islands"),
            "TV" => translate("Tuvalu"),
            "UM" => translate("U.S. Minor Outlying Islands"),
            "PU" => translate("U.S. Miscellaneous Pacific Islands"),
            "VI" => translate("U.S. Virgin Islands"),
            "UG" => translate("Uganda"),
            "UA" => translate("Ukraine"),
            "SU" => translate("Union of Soviet Socialist Republics"),
            "AE" => translate("United Arab Emirates"),
            "GB" => translate("United Kingdom"),
            "US" => translate("United States"),
            "ZZ" => translate("Unknown or Invalid Region"),
            "UY" => translate("Uruguay"),
            "UZ" => translate("Uzbekistan"),
            "VU" => translate("Vanuatu"),
            "VA" => translate("Vatican City"),
            "VE" => translate("Venezuela"),
            "VN" => translate("Vietnam"),
            "WK" => translate("Wake Island"),
            "WF" => translate("Wallis and Futuna"),
            "EH" => translate("Western Sahara"),
            "YE" => translate("Yemen"),
            "ZM" => translate("Zambia"),
            "ZW" => translate("Zimbabwe"),
            "AX" => translate("Åland Islands"),
        ];
    }

    public static function get($key, $arrayFlip = false)
    {
        $array = self::all();
        if ($arrayFlip) {
            $array = array_flip($array);
        }
        return $array[$key];
    }
}
