﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Parser
{
    public enum StreetType
    {
        None,
        Strada,
        Sosea,
        Intrare,
        Bulevard,
        Piata,
        Alee,
        Cale,
        Piateta,
        Splai,
        Drum,
        Prelungire,
        Pasaj,
        Ulita,
        Fundatura,
        Canton,
        Statia,
        Pod,
        Parc,
        Stradela,
        Canal,
        Scuar,
        Poligon,
        Camp,
        Colonie,
        Poteca,
        Hotar,
        Suis,
        Curte,
        Sir,
        Rampa,
        Trecatoare,
        Cartier,
        Fundac,
        Varianta,
        Platou,
        Pietonal,
        Vad,
        Esplanada
    }

    public static class StreetTypeExtensions
    {
        public static StreetType ToStreetType(this string street)
        {
            switch (street)
            {
                case "Stradă":
                case "Stradă ":
                case "Strada":
                case "Strada ":
                case "Str.": return StreetType.Strada;
                case "Şosea":
                case "Sosea": return StreetType.Sosea;
                case "Intrare": return StreetType.Intrare;
                case "Bulevard": return StreetType.Bulevard;
                case "Piaţă":
                case "Piaţa": return StreetType.Piata;
                case "Alee":
                case "Alee I":
                case "Alee II":
                case "Alee III":
                case "Alee IV":
                case "Alee V":
                case "Alee VI":
                case "Alee VII":
                case "Alee VIII":
                case "Aleea ": return StreetType.Alee;
                case "Cale": return StreetType.Cale;
                case "Piaţetă": return StreetType.Piateta;
                case "Splai": return StreetType.Splai;
                case "Drum": return StreetType.Drum;
                case "Prelungire": return StreetType.Prelungire;
                case "Pasaj": return StreetType.Pasaj;
                case "Uliţă": return StreetType.Ulita;
                case "Fundătură":
                case "Fundătura": return StreetType.Fundatura;
                case "Canton": return StreetType.Canton;
                case "Staţia": return StreetType.Statia;
                case "Pod": return StreetType.Pod;
                case "Parc": return StreetType.Parc;
                case "Stradelă":
                case "Stradela": return StreetType.Stradela;
                case "Canal": return StreetType.Canal;
                case "Scuar": return StreetType.Scuar;
                case "Poligon": return StreetType.Poligon;
                case "Câmp": return StreetType.Camp;
                case "Colonie": return StreetType.Colonie;
                case "Potecă": return StreetType.Poteca;
                case "Hotar": return StreetType.Hotar;
                case "Suiş": return StreetType.Suis;
                case "Curte": return StreetType.Curte;
                case "Şir": return StreetType.Sir;
                case "Rampa": return StreetType.Rampa;
                case "Trecătoare": return StreetType.Trecatoare;
                case "Cartier": return StreetType.Cartier;
                case "Fundac": return StreetType.Fundac;
                case "Variantă": return StreetType.Varianta;
                case "Platou": return StreetType.Platou;
                case "Pietonal": return StreetType.Pietonal;
                case "Vad": return StreetType.Vad;
                case "Esplanadă": return StreetType.Esplanada;
                default: throw new Exception();
            }
        }
    }
}
