//
//  CountryModel.swift
//  WoWonder
//
//  Created by iMac on 13/09/23.
//  Copyright © 2023 ScriptSun. All rights reserved.
//

import Foundation

struct CountryModel {
    let id: String
    let name: String
}

class CountryData {
    
    static let instance = CountryData()
    
    let countries: [CountryModel] = [
        CountryModel(id: "1", name: "United States"),
        CountryModel(id: "2", name: "Canada"),
        CountryModel(id: "3", name: "Afghanistan"),
        CountryModel(id: "4", name: "Albania"),
        CountryModel(id: "5", name: "Algeria"),
        CountryModel(id: "6", name: "American Samoa"),
        CountryModel(id: "7", name: "Andorra"),
        CountryModel(id: "8", name: "Angola"),
        CountryModel(id: "9", name: "Anguilla"),
        CountryModel(id: "10", name: "Antarctica"),
        CountryModel(id: "11", name: "Antigua and/or Barbuda"),
        CountryModel(id: "12", name: "Argentina"),
        CountryModel(id: "13", name: "Armenia"),
        CountryModel(id: "14", name: "Aruba"),
        CountryModel(id: "15", name: "Australia"),
        CountryModel(id: "16", name: "Austria"),
        CountryModel(id: "17", name: "Azerbaijan"),
        CountryModel(id: "18", name: "Bahamas"),
        CountryModel(id: "19", name: "Bahrain"),
        CountryModel(id: "20", name: "Bangladesh"),
        CountryModel(id: "21", name: "Barbados"),
        CountryModel(id: "22", name: "Belarus"),
        CountryModel(id: "23", name: "Belgium"),
        CountryModel(id: "24", name: "Belize"),
        CountryModel(id: "25", name: "Benin"),
        CountryModel(id: "26", name: "Bermuda"),
        CountryModel(id: "27", name: "Bhutan"),
        CountryModel(id: "28", name: "Bolivia"),
        CountryModel(id: "29", name: "Bosnia and Herzegovina"),
        CountryModel(id: "30", name: "Botswana"),
        CountryModel(id: "31", name: "Bouvet Island"),
        CountryModel(id: "32", name: "Brazil"),
        CountryModel(id: "34", name: "Brunei Darussalam"),
        CountryModel(id: "35", name: "Bulgaria"),
        CountryModel(id: "36", name: "Burkina Faso"),
        CountryModel(id: "37", name: "Burundi"),
        CountryModel(id: "38", name: "Cambodia"),
        CountryModel(id: "39", name: "Cameroon"),
        CountryModel(id: "40", name: "Cape Verde"),
        CountryModel(id: "41", name: "Cayman Islands"),
        CountryModel(id: "42", name: "Central African Republic"),
        CountryModel(id: "43", name: "Chad"),
        CountryModel(id: "44", name: "Chile"),
        CountryModel(id: "45", name: "China"),
        CountryModel(id: "46", name: "Christmas Island"),
        CountryModel(id: "47", name: "Cocos (Keeling) Islands"),
        CountryModel(id: "48", name: "Colombia"),
        CountryModel(id: "49", name: "Comoros"),
        CountryModel(id: "50", name: "Congo"),
        CountryModel(id: "51", name: "Cook Islands"),
        CountryModel(id: "52", name: "Costa Rica"),
        CountryModel(id: "53", name: "Croatia (Hrvatska)"),
        CountryModel(id: "54", name: "Cuba"),
        CountryModel(id: "55", name: "Cyprus"),
        CountryModel(id: "56", name: "Czech Republic"),
        CountryModel(id: "57", name: "Denmark"),
        CountryModel(id: "58", name: "Djibouti"),
        CountryModel(id: "59", name: "Dominica"),
        CountryModel(id: "60", name: "Dominican Republic"),
        CountryModel(id: "61", name: "East Timor"),
        CountryModel(id: "62", name: "Ecuador"),
        CountryModel(id: "63", name: "Egypt"),
        CountryModel(id: "64", name: "El Salvador"),
        CountryModel(id: "65", name: "Equatorial Guinea"),
        CountryModel(id: "66", name: "Eritrea"),
        CountryModel(id: "67", name: "Estonia"),
        CountryModel(id: "68", name: "Ethiopia"),
        CountryModel(id: "69", name: "Falkland Islands (Malvinas)"),
        CountryModel(id: "70", name: "Faroe Islands"),
        CountryModel(id: "71", name: "Fiji"),
        CountryModel(id: "72", name: "Finland"),
        CountryModel(id: "73", name: "France"),
        CountryModel(id: "74", name: "France, Metropolitan"),
        CountryModel(id: "75", name: "French Guiana"),
        CountryModel(id: "76", name: "French Polynesia"),
        CountryModel(id: "77", name: "French Southern Territories"),
        CountryModel(id: "78", name: "Gabon"),
        CountryModel(id: "79", name: "Gambia"),
        CountryModel(id: "80", name: "Georgia"),
        CountryModel(id: "81", name: "Germany"),
        CountryModel(id: "82", name: "Ghana"),
        CountryModel(id: "83", name: "Gibraltar"),
        CountryModel(id: "84", name: "Greece"),
        CountryModel(id: "85", name: "Greenland"),
        CountryModel(id: "86", name: "Grenada"),
        CountryModel(id: "87", name: "Guadeloupe"),
        CountryModel(id: "88", name: "Guam"),
        CountryModel(id: "89", name: "Guatemala"),
        CountryModel(id: "90", name: "Guinea"),
        CountryModel(id: "91", name: "Guinea-Bissau"),
        CountryModel(id: "92", name: "Guyana"),
        CountryModel(id: "93", name: "Haiti"),
        CountryModel(id: "94", name: "Heard and Mc Donald Islands"),
        CountryModel(id: "95", name: "Honduras"),
        CountryModel(id: "96", name: "Hong Kong"),
        CountryModel(id: "97", name: "Hungary"),
        CountryModel(id: "98", name: "Iceland"),
        CountryModel(id: "99", name: "India"),
        CountryModel(id: "100", name: "Indonesia"),
        CountryModel(id: "101", name: "Iran (Islamic Republic of)"),
        CountryModel(id: "102", name: "Iraq"),
        CountryModel(id: "103", name: "Ireland"),
        CountryModel(id: "104", name: "Israel"),
        CountryModel(id: "105", name: "Italy"),
        CountryModel(id: "106", name: "Ivory Coast"),
        CountryModel(id: "107", name: "Jamaica"),
        CountryModel(id: "108", name: "Japan"),
        CountryModel(id: "109", name: "Jordan"),
        CountryModel(id: "110", name: "Kazakhstan"),
        CountryModel(id: "111", name: "Kenya"),
        CountryModel(id: "112", name: "Kiribati"),
        CountryModel(id: "113", name: "Korea, Democratic People's Republic of"),
        CountryModel(id: "114", name: "Korea, Republic of"),
        CountryModel(id: "115", name: "Kosovo"),
        CountryModel(id: "116", name: "Kuwait"),
        CountryModel(id: "117", name: "Kyrgyzstan"),
        CountryModel(id: "118", name: "Lao People's Democratic Republic"),
        CountryModel(id: "119", name: "Latvia"),
        CountryModel(id: "120", name: "Lebanon"),
        CountryModel(id: "121", name: "Lesotho"),
        CountryModel(id: "122", name: "Liberia"),
        CountryModel(id: "123", name: "Libyan Arab Jamahiriya"),
        CountryModel(id: "124", name: "Liechtenstein"),
        CountryModel(id: "125", name: "Lithuania"),
        CountryModel(id: "126", name: "Luxembourg"),
        CountryModel(id: "127", name: "Macau"),
        CountryModel(id: "128", name: "Macedonia"),
        CountryModel(id: "129", name: "Madagascar"),
        CountryModel(id: "130", name: "Malawi"),
        CountryModel(id: "131", name: "Malaysia"),
        CountryModel(id: "132", name: "Maldives"),
        CountryModel(id: "133", name: "Mali"),
        CountryModel(id: "134", name: "Malta"),
        CountryModel(id: "135", name: "Marshall Islands"),
        CountryModel(id: "136", name: "Martinique"),
        CountryModel(id: "137", name: "Mauritania"),
        CountryModel(id: "138", name: "Mauritius"),
        CountryModel(id: "139", name: "Mayotte"),
        CountryModel(id: "140", name: "Mexico"),
        CountryModel(id: "141", name: "Micronesia, Federated States of"),
        CountryModel(id: "142", name: "Moldova, Republic of"),
        CountryModel(id: "143", name: "Monaco"),
        CountryModel(id: "144", name: "Mongolia"),
        CountryModel(id: "145", name: "Montenegro"),
        CountryModel(id: "146", name: "Montserrat"),
        CountryModel(id: "147", name: "Morocco"),
        CountryModel(id: "148", name: "Mozambique"),
        CountryModel(id: "149", name: "Myanmar"),
        CountryModel(id: "150", name: "Namibia"),
        CountryModel(id: "151", name: "Nauru"),
        CountryModel(id: "152", name: "Nepal"),
        CountryModel(id: "153", name: "Netherlands"),
        CountryModel(id: "154", name: "Netherlands Antilles"),
        CountryModel(id: "155", name: "New Caledonia"),
        CountryModel(id: "156", name: "New Zealand"),
        CountryModel(id: "157", name: "Nicaragua"),
        CountryModel(id: "158", name: "Niger"),
        CountryModel(id: "159", name: "Nigeria"),
        CountryModel(id: "160", name: "Niue"),
        CountryModel(id: "161", name: "Norfolk Island"),
        CountryModel(id: "162", name: "Northern Mariana Islands"),
        CountryModel(id: "163", name: "Norway"),
        CountryModel(id: "164", name: "Oman"),
        CountryModel(id: "165", name: "Pakistan"),
        CountryModel(id: "166", name: "Palau"),
        CountryModel(id: "167", name: "Panama"),
        CountryModel(id: "168", name: "Papua New Guinea"),
        CountryModel(id: "169", name: "Paraguay"),
        CountryModel(id: "170", name: "Peru"),
        CountryModel(id: "171", name: "Philippines"),
        CountryModel(id: "172", name: "Pitcairn"),
        CountryModel(id: "173", name: "Poland"),
        CountryModel(id: "174", name: "Portugal"),
        CountryModel(id: "175", name: "Puerto Rico"),
        CountryModel(id: "176", name: "Qatar"),
        CountryModel(id: "177", name: "Reunion"),
        CountryModel(id: "178", name: "Romania"),
        CountryModel(id: "179", name: "Russian Federation"),
        CountryModel(id: "180", name: "Rwanda"),
        CountryModel(id: "181", name: "Saint Kitts and Nevis"),
        CountryModel(id: "182", name: "Saint Lucia"),
        CountryModel(id: "183", name: "Saint Vincent and the Grenadines"),
        CountryModel(id: "184", name: "Samoa"),
        CountryModel(id: "185", name: "San Marino"),
        CountryModel(id: "186", name: "Sao Tome and Principe"),
        CountryModel(id: "187", name: "Saudi Arabia"),
        CountryModel(id: "188", name: "Senegal"),
        CountryModel(id: "189", name: "Serbia"),
        CountryModel(id: "190", name: "Seychelles"),
        CountryModel(id: "191", name: "Sierra Leone"),
        CountryModel(id: "192", name: "Singapore"),
        CountryModel(id: "193", name: "Slovakia"),
        CountryModel(id: "194", name: "Slovenia"),
        CountryModel(id: "195", name: "Solomon Islands"),
        CountryModel(id: "196", name: "Somalia"),
        CountryModel(id: "197", name: "South Africa"),
        CountryModel(id: "198", name: "South Georgia South Sandwich Islands"),
        CountryModel(id: "199", name: "Spain"),
        CountryModel(id: "200", name: "Sri Lanka"),
        CountryModel(id: "201", name: "St. Helena"),
        CountryModel(id: "202", name: "St. Pierre and Miquelon"),
        CountryModel(id: "203", name: "Sudan"),
        CountryModel(id: "204", name: "Suriname"),
        CountryModel(id: "205", name: "Svalbard and Jan Mayen Islands"),
        CountryModel(id: "206", name: "Swaziland"),
        CountryModel(id: "207", name: "Sweden"),
        CountryModel(id: "208", name: "Switzerland"),
        CountryModel(id: "209", name: "Syrian Arab Republic"),
        CountryModel(id: "210", name: "Taiwan"),
        CountryModel(id: "211", name: "Tajikistan"),
        CountryModel(id: "212", name: "Tanzania, United Republic of"),
        CountryModel(id: "213", name: "Thailand"),
        CountryModel(id: "214", name: "Togo"),
        CountryModel(id: "215", name: "Tokelau"),
        CountryModel(id: "216", name: "Tonga"),
        CountryModel(id: "217", name: "Trinidad and Tobago"),
        CountryModel(id: "218", name: "Tunisia"),
        CountryModel(id: "219", name: "Turkey"),
        CountryModel(id: "220", name: "Turkmenistan"),
        CountryModel(id: "221", name: "Turks and Caicos Islands"),
        CountryModel(id: "222", name: "Tuvalu"),
        CountryModel(id: "223", name: "Uganda"),
        CountryModel(id: "224", name: "Ukraine"),
        CountryModel(id: "225", name: "United Arab Emirates"),
        CountryModel(id: "226", name: "United Kingdom"),
        CountryModel(id: "227", name: "United States minor outlying islands"),
        CountryModel(id: "228", name: "Uruguay"),
        CountryModel(id: "229", name: "Uzbekistan"),
        CountryModel(id: "230", name: "Vanuatu"),
        CountryModel(id: "231", name: "Vatican City State"),
        CountryModel(id: "232", name: "Venezuela"),
        CountryModel(id: "233", name: "Vietnam"),
        CountryModel(id: "238", name: "Yemen"),
        CountryModel(id: "239", name: "Yugoslavia"),
        CountryModel(id: "240", name: "Zaire"),
        CountryModel(id: "241", name: "Zambia"),
        CountryModel(id: "242", name: "Zimbabwe"),
    ]
    
    func getCountryName(forID id: String) -> String {
        if let country = countries.first(where: { $0.id == id }) {
            return country.name
        }
        return ""
    }

    
}

