puts '-----------------------------'
puts 'Executing country seeds'.colorize(:green)

countries = [
    ["Croatia", "HR", "", ""],
    ["Oman", "OM"],
    ["Pakistan", "PK"],
    ["Palau", "PW"],
    ["Panama", "PA"],
    ["Paraguay", "PY"],
    ["Peru", "PE"],
    ["Philippines", "PH", "PHP", "₱"],
    ["Qatar", "QA"],
    ["Réunion", "RE"],
    ["Rwanda", "RW"],
    ["Saint Barthélemy", "BL"],
    ["Saint Kitts and Nevis", "KN"],
    ["Saint Lucia", "LC"],
    ["Saint Pierre and Miquelon", "PM"],
    ["Saint Vincent and the Grenadines", "VC"],
    ["Samoa", "WS"],
    ["Congo", "CG"],
    ["Vietnam", "VN"],
    ["Saudi Arabia", "SA"],
    ["Senegal", "SN"],
    ["Seychelles", "SC"],
    ["Sierra Leone", "SL"],
    ["Singapore", "SG", "SGD", "$"],
    ["Somalia", "SO"],
    ["South Africa", "ZA"],
    ["South Georgia and the South Sandwich Islands", "GS"],
    ["Sri Lanka", "LK"],
    ["Sudan", "SD"],
    ["Suriname", "SR"],
    ["Svalbard and Jan Mayen", "SJ"],
    ["Swaziland", "SZ"],
    ["Barbados", "BB"],
    ["Italy", "IT", "EUR", "€"],
    ["Norfolk Island", "NF"],
    ["Dominican Republic", "DO"],
    ["Guinea-Bissau", "GW"],
    ["Netherlands", "NL", "EUR", "€"],
    ["Botswana", "BW"],
    ["Kenya", "KE"],
    ["Kiribati", "KI"],
    ["Kuwait", "KW"],
    ["Czech Republic", "CZ", "CZK", "Kč"],
    ["Estonia", "EE", "EUR", "€"],
    ["Finland", "FI", "EUR", "€"],
    ["Greece", "GR", "EUR", "€"],
    ["Latvia", "LV", "EUR", "€"],
    ["Monaco", "MC", "EUR", "€"],
    ["New Zealand", "NZ", "NZD", "$"],
    ["Bahrain", "BH"],
    ["Bangladesh", "BD"],
    ["Belize", "BZ"],
    ["Benin", "BJ"],
    ["Bermuda", "BM"],
    ["Bhutan", "BT"],
    ["Brazil", "BR"],
    ["Burkina Faso", "BF"],
    ["Turkmenistan", "TM"],
    ["Uzbekistan", "UZ"],
    ["Niue", "NU"],
    ["Solomon Islands", "SB"],
    ["Tuvalu", "TV"],
    ["Papua New Guinea", "PG"],
    ["Fiji", "FJ"],
    ["Burundi", "BI"],
    ["Cambodia", "KH"],
    ["Cameroon", "CM"],
    ["Canada", "CA", "CAD", "$"],
    ["Cape Verde", "CV"],
    ["Cayman Islands", "KY"],
    ["Central African Republic", "CF"],
    ["Chad", "TD"],
    ["Chile", "CL"],
    ["China", "CN"],
    ["Colombia", "CO"],
    ["St Helena", "SH"],
    ["São Tomé and Príncipe", "ST"],
    ["South Korea", "KR"],
    ["Bolivia", "BO"],
    ["Reunion Island", "RE"],
    ["St Kitts & Nevis", "KN"],
    ["St Lucia", "LC"],
    ["St Vincent & The Grenadines", "VC"],
    ["Brunei", "BN"],
    ["Mainland Spain", "ES"],
    ["Pitcairn Islands", "PN"],
    ["Côte d’Ivoire", "CI"],
    ["Falkland Islands", "FK"],
    ["Hong Kong SAR China", "HK", "HKD", "$"],
    ["Spain", "ES", "EUR", "€"],
    ["Comoros", "KM"],
    ["Costa Rica", "CR"],
    ["Cuba", "CU"],
    ["Djibouti", "DJ"],
    ["Dominica", "DM"],
    ["Ecuador", "EC"],
    ["Egypt", "EG"],
    ["El Salvador", "SV"],
    ["Equatorial Guinea", "GQ"],
    ["Eritrea", "ER"],
    ["Ethiopia", "ET"],
    ["Faroe Islands", "FO"],
    ["French Guiana", "GF"],
    ["French Southern Territories", "TF"],
    ["Gabon", "GA"],
    ["Gambia", "GM"],
    ["Ghana", "GH"],
    ["Grenada", "GD"],
    ["Guadeloupe", "GP"],
    ["Guam", "GU"],
    ["Guatemala", "GT"],
    ["Guernsey", "GG"],
    ["Guinea", "GN"],
    ["Guyana", "GY"],
    ["Haiti", "HT"],
    ["Heard Island and McDonald Islands", "HM"],
    ["Honduras", "HN"],
    ["India", "IN"],
    ["Cyprus", "CY", "EUR", "€"],
    ["Gibraltar", "GI"],
    ["Malta", "MT", "EUR", "€"],
    ["Romania", "RO"],
    ["Bulgaria", "BG"],
    ["Austria", "AT", "EUR", "€"],
    ["Belgium", "BE", "EUR", "€"],
    ["Denmark", "DK", "DKK", "kr"],
    ["France", "FR", "EUR", "€"],
    ["Germany", "DE", "EUR", "€"],
    ["Hungary", "HU", "HUF", "Ft"],
    ["Lithuania", "LT", "EUR", "€"],
    ["Luxembourg", "LU", "EUR", "€"],
    ["Andorra", "AD"],
    ["Belarus", "BY"],
    ["Liechtenstein", "LI"],
    ["Norway", "NO", "NOK", "kr"],
    ["San Marino", "SM", "EUR", "€"],
    ["Switzerland", "CH", "CHF", "CHF"],
    ["New Caledonia", "NC"],
    ["Cook Islands", "CK"],
    ["Tajikistan", "TJ"],
    ["Taiwan", "TW", "TWD", "NT$"],
    ["Thailand", "TH", "THB", "฿"],
    ["Timor-Leste", "TL"],
    ["Togo", "TG"],
    ["Trinidad and Tobago", "TT"],
    ["Tunisia", "TN"],
    ["Turks and Caicos Islands", "TC"],
    ["Uganda", "UG"],
    ["United Arab Emirates", "AE"],
    ["United States", "US", "USD", "$"],
    ["Uruguay", "UY"],
    ["Vanuatu", "VU"],
    ["Wallis and Futuna", "WF"],
    ["Western Sahara", "EH"],
    ["Yemen", "YE"],
    ["Zambia", "ZM"],
    ["Zimbabwe", "ZW"],
    ["French Polynesia", "PF"],
    ["Algeria", "DZ"],
    ["American Samoa", "AS"],
    ["Angola", "AO"],
    ["Anguilla", "AI"],
    ["Antigua and Barbuda", "AG"],
    ["Argentina", "AR"],
    ["Kyrgyzstan", "KG"],
    ["United Kingdom", "GB", "GBP", "£"],
    ["Poland", "PL", "PLN", "zł"],
    ["Slovakia", "SK", "EUR", "€"],
    ["Slovenia", "SI", "EUR", "€"],
    ["Portugal", "PT", "EUR", "€"],
    ["Sweden", "SE", "SEK", "kr"],
    ["Albania", "AL"],
    ["Bosnia and Herzegovina", "BA"],
    ["Iceland", "IS"],
    ["Montenegro", "ME"],
    ["Serbia", "RS"],
    ["Turkey", "TR"],
    ["Ukraine", "UA"],
    ["Armenia", "AM"],
    ["Georgia", "GE"],
    ["Kazakhstan", "KZ"],
    ["Greenland", "GL"],
    ["Australia", "AU", "AUD", "$"],
    ["Christmas Island", "CX"],
    ["Cocos (Keeling) Islands", "CC"],
    ["Afghanistan", "AF"],
    ["Aruba", "AW"],
    ["Bahamas", "BS"],
    ["Nauru", "NR"],
    ["Indonesia", "ID"],
    ["Iraq", "IQ"],
    ["Israel", "IL", "ILS", "₪"],
    ["Jamaica", "JM"],
    ["Japan", "JP", "JPY", "¥"],
    ["Jordan", "JO"],
    ["Vatican City", "VA", "EUR", "€"],
    ["Venezuela", "VE"],
    ["Rep of Ireland", "IE", "EUR", "€"],
    ["Russia", "RU", "RUB", "руб"],
    ["Corsica", "FR"],
    ["Madeira", "PT"],
    ["Lebanon", "LB"],
    ["Lesotho", "LS"],
    ["Liberia", "LR"],
    ["Libya", "LY"],
    ["Madagascar", "MG"],
    ["Malawi", "MW"],
    ["Malaysia", "MY"],
    ["Maldives", "MV"],
    ["Mali", "ML"],
    ["Marshall Islands", "MH"],
    ["Martinique", "MQ"],
    ["Mauritania", "MR"],
    ["Mauritius", "MU"],
    ["Mayotte", "YT"],
    ["Mexico", "MX", "MXN", "$"],
    ["Mongolia", "MN"],
    ["Montserrat", "MS"],
    ["Morocco", "MA"],
    ["Mozambique", "MZ"],
    ["Namibia", "NA"],
    ["Nepal", "NP"],
    ["Nicaragua", "NI"],
    ["Niger", "NE"],
    ["Nigeria", "NG"],
    ["Northern Mariana Islands", "MP"],
    ["Tonga", "TO"],
    ["Tokelau", "TK"],
    ["People's Democratic Republic of Yemen", "YE"],
    ["Tanzania", "TZ"],
    ["Macedonia", "MK"],
    ["Moldova", "MD"],
    ["Azerbaijan Republic", "AZ"],
    ["British Virgin Islands", "VG"],
    ["Laos", "LA"],
    ["Micronesia", "FM"]
]
countries.map{ |country| Country.create(name: country.first, alpha_two_code: country.second, alpha_three_code: country.third, currency: country.last) }
Country.find_by_name('United Kingdom').update_column(:popular, true)
Country.find_by_name('United States').update_column(:popular, true)

# set transaction countries
[
    "AUD",
    "CAD",
    "CZK",
    "DKK",
    "EUR",
    "HKD",
    "HUF",
    "ILS",
    "JPY",
    "MXN",
    "NOK",
    "NZD",
    "PHP",
    "PLN",
    "GBP",
    "RUB",
    "SGD",
    "SEK",
    "CHF",
    "TWD",
    "THB",
    "USD"
].each do |code|
    country = Country.find_by_alpha_three_code(code)
    country.update_column(:transactional, true)
end