using System.Collections.Generic;
using Baza_Reklam.Classes.Model;

namespace Baza_Reklam.Classes.Repositories
{
    public class CountryRepository
    {
        public static List<Country> FindAll()
        {
            return StaticConuntries.GetCountries();
        }

        public static int Count ()
        {
            return StaticConuntries.Count();
        }
    }

    //TODO: replace it with the function which gets the countries from DB
    internal class StaticConuntries
    {
        private static StaticConuntries _instance;
        private readonly List<Country> _countries = new List<Country>();

        private StaticConuntries()
        {
            #region Add Countries

            _countries.Add(new Country("Abchazja"));
            _countries.Add(new Country("Afganistan"));
            _countries.Add(new Country("Albania"));
            _countries.Add(new Country("Algieria"));
            _countries.Add(new Country("Andora"));
            _countries.Add(new Country("Angola"));
            _countries.Add(new Country("Antigua i Barbuda"));
            _countries.Add(new Country("Arabia Saudyjska"));
            _countries.Add(new Country("Argentyna"));
            _countries.Add(new Country("Armenia"));
            _countries.Add(new Country("Australia"));
            _countries.Add(new Country("Austria"));
            _countries.Add(new Country("Azerbejdżan"));

            _countries.Add(new Country("Bahamy"));
            _countries.Add(new Country("Bahrajn"));
            _countries.Add(new Country("Bangladesz"));
            _countries.Add(new Country("Barbados"));
            _countries.Add(new Country("Belgia"));
            _countries.Add(new Country("Belize"));
            _countries.Add(new Country("Benin"));
            _countries.Add(new Country("Bhutan"));
            _countries.Add(new Country("Białoruś"));
            _countries.Add(new Country("Birma"));
            _countries.Add(new Country("Boliwia"));
            _countries.Add(new Country("Bośnia i Hercegowina"));
            _countries.Add(new Country("Botswana"));
            _countries.Add(new Country("Brazylia"));
            _countries.Add(new Country("Brunei"));
            _countries.Add(new Country("Bułgaria"));
            _countries.Add(new Country("Burkina Faso"));
            _countries.Add(new Country("Burundi"));

            _countries.Add(new Country("Chile"));
            _countries.Add(new Country("Chiny"));
            _countries.Add(new Country("Chorwacja"));
            _countries.Add(new Country("Cypr"));
            _countries.Add(new Country("Cypr Północny"));
            _countries.Add(new Country("Czad"));
            _countries.Add(new Country("Czarnogóra"));
            _countries.Add(new Country("Czechy"));

            _countries.Add(new Country("Dania"));
            _countries.Add(new Country("Demokratyczna Republika Konga"));
            _countries.Add(new Country("Dominika"));
            _countries.Add(new Country("Dominikana"));
            _countries.Add(new Country("Dżibuti"));
            _countries.Add(new Country("Egipt"));
            _countries.Add(new Country("Ekwador"));
            _countries.Add(new Country("Erytrea"));
            _countries.Add(new Country("Estonia"));
            _countries.Add(new Country("Etiopia"));
            _countries.Add(new Country("Fidżi"));
            _countries.Add(new Country("Filipiny"));
            _countries.Add(new Country("Finlandia"));
            _countries.Add(new Country("Francja"));

            _countries.Add(new Country("Gabon"));
            _countries.Add(new Country("Gambia"));
            _countries.Add(new Country("Ghana"));
            _countries.Add(new Country("Górski Karabach"));
            _countries.Add(new Country("Grecja"));
            _countries.Add(new Country("Grenada"));
            _countries.Add(new Country("Gruzja"));
            _countries.Add(new Country("Gujana"));
            _countries.Add(new Country("Gwatemala"));
            _countries.Add(new Country("Gwinea"));
            _countries.Add(new Country("Gwinea Bissau"));
            _countries.Add(new Country("Gwinea Równikowa"));
            _countries.Add(new Country("Haiti"));
            _countries.Add(new Country("Hiszpania"));
            _countries.Add(new Country("Holandia"));
            _countries.Add(new Country("Honduras"));

            _countries.Add(new Country("Indie"));
            _countries.Add(new Country("Indonezja"));
            _countries.Add(new Country("Irak"));
            _countries.Add(new Country("Iran"));
            _countries.Add(new Country("Irlandia"));
            _countries.Add(new Country("Irlandia Północna"));
            _countries.Add(new Country("Islandia"));
            _countries.Add(new Country("Izrael"));
            _countries.Add(new Country("Jamajka"));
            _countries.Add(new Country("Japonia"));
            _countries.Add(new Country("Jemen"));
            _countries.Add(new Country("Jordania"));
            _countries.Add(new Country("Kambodża"));
            _countries.Add(new Country("Kamerun"));
            _countries.Add(new Country("Kanada"));
            _countries.Add(new Country("Katar"));
            _countries.Add(new Country("Kazachstan"));
            _countries.Add(new Country("Kenia"));
            _countries.Add(new Country("Kirgistan"));
            _countries.Add(new Country("Kiribati"));
            _countries.Add(new Country("Kolumbia"));
            _countries.Add(new Country("Komory"));
            _countries.Add(new Country("Kongo"));
            _countries.Add(new Country("Korea Południowa"));
            _countries.Add(new Country("Korea Północna"));
            _countries.Add(new Country("Kostaryka"));
            _countries.Add(new Country("Kuba"));
            _countries.Add(new Country("Kuwejt"));

            _countries.Add(new Country("Laos"));
            _countries.Add(new Country("Lesotho"));
            _countries.Add(new Country("Liban"));
            _countries.Add(new Country("Liberia"));
            _countries.Add(new Country("Libia"));
            _countries.Add(new Country("Liechtenstein"));
            _countries.Add(new Country("Litwa"));
            _countries.Add(new Country("Luksemburg"));
            _countries.Add(new Country("Łotwa"));
            _countries.Add(new Country("Macedonia"));
            _countries.Add(new Country("Madagaskar"));
            _countries.Add(new Country("Malawi"));
            _countries.Add(new Country("Malediwy"));
            _countries.Add(new Country("Malezja"));
            _countries.Add(new Country("Mali"));
            _countries.Add(new Country("Malta"));
            _countries.Add(new Country("Maroko"));
            _countries.Add(new Country("Mauretania"));
            _countries.Add(new Country("Mauritius"));
            _countries.Add(new Country("Meksyk"));
            _countries.Add(new Country("Mikronezja"));
            _countries.Add(new Country("Mołdawia"));
            _countries.Add(new Country("Monako"));
            _countries.Add(new Country("Mongolia"));
            _countries.Add(new Country("Mozambik"));
            _countries.Add(new Country("Naddniestrze"));
            _countries.Add(new Country("Namibia"));
            _countries.Add(new Country("Nauru"));
            _countries.Add(new Country("Nepal"));
            _countries.Add(new Country("Niemcy"));
            _countries.Add(new Country("Niger"));
            _countries.Add(new Country("Nigeria"));
            _countries.Add(new Country("Nikaragua"));
            _countries.Add(new Country("Norwegia"));
            _countries.Add(new Country("Nowa Zelandia"));

            _countries.Add(new Country("Oman"));
            _countries.Add(new Country("Osetia Południowa"));
            _countries.Add(new Country("Pakistan"));
            _countries.Add(new Country("Palau"));
            _countries.Add(new Country("Palestyna"));
            _countries.Add(new Country("Panama"));
            _countries.Add(new Country("Papua-Nowa Gwinea"));
            _countries.Add(new Country("Paragwaj"));
            _countries.Add(new Country("Peru"));
            _countries.Add(new Country("Polska"));
            _countries.Add(new Country("Portugalia"));
            _countries.Add(new Country("Portoryko"));
            _countries.Add(new Country("Republika Południowej Afryki"));
            _countries.Add(new Country("Republika Środkowoafrykańska"));
            _countries.Add(new Country("Republika Zielonego Przylądka"));
            _countries.Add(new Country("Rosja"));
            _countries.Add(new Country("Rumunia"));
            _countries.Add(new Country("Rwanda"));

            _countries.Add(new Country("Sahara Zachodnia"));
            _countries.Add(new Country("Saint Kitts i Nevis"));
            _countries.Add(new Country("Saint Lucia"));
            _countries.Add(new Country("Saint Vincent i Grenadyny"));
            _countries.Add(new Country("Salwador"));
            _countries.Add(new Country("Samoa"));
            _countries.Add(new Country("San Marino"));
            _countries.Add(new Country("Senegal"));
            _countries.Add(new Country("Serbia"));
            _countries.Add(new Country("Seszele"));
            _countries.Add(new Country("Sierra Leone"));
            _countries.Add(new Country("Singapur"));
            _countries.Add(new Country("Słowacja"));
            _countries.Add(new Country("Słowenia"));
            _countries.Add(new Country("Somalia"));
            _countries.Add(new Country("Somaliland"));
            _countries.Add(new Country("Sri Lanka"));
            _countries.Add(new Country("Stany Zjednoczone"));
            _countries.Add(new Country("Suazi"));
            _countries.Add(new Country("Sudan"));
            _countries.Add(new Country("Surinam"));
            _countries.Add(new Country("Syria"));
            _countries.Add(new Country("Szwajcaria"));
            _countries.Add(new Country("Szwecja"));
            _countries.Add(new Country("Tadżykistan"));
            _countries.Add(new Country("Tajlandia"));
            _countries.Add(new Country("Tajwan"));
            _countries.Add(new Country("Tanzania"));
            _countries.Add(new Country("Timor Wschodni"));
            _countries.Add(new Country("Togo"));
            _countries.Add(new Country("Tonga"));
            _countries.Add(new Country("Trynidad i Tobago"));
            _countries.Add(new Country("Tunezja"));
            _countries.Add(new Country("Turcja"));
            _countries.Add(new Country("Turkmenistan"));
            _countries.Add(new Country("Tuvalu"));

            _countries.Add(new Country("Uganda"));
            _countries.Add(new Country("Ukraina"));
            _countries.Add(new Country("Urugwaj"));
            _countries.Add(new Country("Uzbekistan"));
            _countries.Add(new Country("Vanuatu"));
            _countries.Add(new Country("Watykan"));
            _countries.Add(new Country("Wenezuela"));
            _countries.Add(new Country("Węgry"));
            _countries.Add(new Country("Wielka Brytania"));
            _countries.Add(new Country("Wietnam"));
            _countries.Add(new Country("Włochy"));
            _countries.Add(new Country("Wybrzeże Kości Słoniowej"));
            _countries.Add(new Country("Wyspy Marshalla"));
            _countries.Add(new Country("Wyspy Salomona"));
            _countries.Add(new Country("Wyspy Świętego Tomasza i Książęca"));
            _countries.Add(new Country("Zambia"));
            _countries.Add(new Country("Zimbabwe"));
            _countries.Add(new Country("Zjednoczone Emiraty Arabskie"));

            #endregion
        }

        public static StaticConuntries Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new StaticConuntries();
                }
                return _instance;
            }
        }

        public static List<Country> GetCountries()
        {
            return Instance._countries;
        }

        public static int Count()
        {
            return Instance._countries.Count;
        }
    }
}