// https://en.wikipedia.org/wiki/ISO_4217
use crate::CountryCode;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Deserialize, Display, EnumIter, EnumString, Eq, PartialEq, Serialize)]
#[strum(serialize_all = "UPPERCASE")]
pub enum Currency {
    AED,
    AFN,
    ALL,
    AMD,
    ANG,
    AOA,
    ARS,
    AUD,
    AWG,
    AZN,
    BAM,
    BBD,
    BDT,
    BGN,
    BHD,
    BIF,
    BMD,
    BND,
    BOB,
    BOV,
    BRL,
    BSD,
    BTN,
    BWP,
    BYN,
    BZD,
    CAD,
    CDF,
    CHE,
    CHF,
    CHW,
    CLF,
    CLP,
    COP,
    COU,
    CRC,
    CUC,
    CUP,
    CVE,
    CZK,
    DJF,
    DKK,
    DOP,
    DZD,
    EGP,
    ERN,
    ETB,
    EUR,
    FJD,
    FKP,
    GBP,
    GEL,
    GHS,
    GIP,
    GMD,
    GNF,
    GTQ,
    GYD,
    HKD,
    HNL,
    HTG,
    HUF,
    IDR,
    ILS,
    INR,
    IQD,
    IRR,
    ISK,
    JMD,
    JOD,
    JPY,
    KES,
    KGS,
    KHR,
    KMF,
    KPW,
    KRW,
    KWD,
    KYD,
    KZT,
    LAK,
    LBP,
    LKR,
    LRD,
    LSL,
    LYD,
    MAD,
    MDL,
    MGA,
    MKD,
    MMK,
    MNT,
    MOP,
    MRU,
    MUR,
    MVR,
    MWK,
    MXN,
    MXV,
    MYR,
    MZN,
    NAD,
    NGN,
    NIO,
    NOK,
    NPR,
    NZD,
    OMR,
    PAB,
    PEN,
    PGK,
    PHP,
    PKR,
    PLN,
    PYG,
    QAR,
    RON,
    RSD,
    CNY,
    RUB,
    RWF,
    SAR,
    SBD,
    SCR,
    SDG,
    SEK,
    SGD,
    SHP,
    SLE,
    SLL,
    SOS,
    SRD,
    SSP,
    STN,
    SVC,
    SYP,
    SZL,
    THB,
    TJS,
    TMT,
    TND,
    TOP,
    TRY,
    TTD,
    TWD,
    TZS,
    UAH,
    UGX,
    USD,
    USN,
    UYI,
    UYU,
    UYW,
    UZS,
    VED,
    VES,
    VND,
    VUV,
    WST,
    XAF,
    XAG,
    XAU,
    XBA,
    XBB,
    XBC,
    XBD,
    XCD,
    XDR,
    XOF,
    XPD,
    XPF,
    XPT,
    XSU,
    XTS,
    XUA,
    XXX,
    YER,
    ZAR,
    ZMW,
    ZWL,
}

impl Currency {
    pub fn name(&self) -> &'static str {
        match self {
            Currency::AED => "United Arab Emirates dirham",
            Currency::AFN => "Afghan afghani",
            Currency::ALL => "Albanian lek",
            Currency::AMD => "Armenian dram",
            Currency::ANG => "Netherlands Antillean guilder",
            Currency::AOA => "Angolan kwanza",
            Currency::ARS => "Argentine peso",
            Currency::AUD => "Australian dollar",
            Currency::AWG => "Aruban florin",
            Currency::AZN => "Azerbaijani manat",
            Currency::BAM => "Bosnia and Herzegovina convertible mark",
            Currency::BBD => "Barbados dollar",
            Currency::BDT => "Bangladeshi taka",
            Currency::BGN => "Bulgarian lev",
            Currency::BHD => "Bahraini dinar",
            Currency::BIF => "Burundian franc",
            Currency::BMD => "Bermudian dollar",
            Currency::BND => "Brunei dollar",
            Currency::BOB => "Boliviano",
            Currency::BOV => "Bolivian Mvdol",
            Currency::BRL => "Brazilian real",
            Currency::BSD => "Bahamian dollar",
            Currency::BTN => "Bhutanese ngultrum",
            Currency::BWP => "Botswana pula",
            Currency::BYN => "Belarusian ruble",
            Currency::BZD => "Belize dollar",
            Currency::CAD => "Canadian dollar",
            Currency::CDF => "Congolese franc",
            Currency::CHE => "WIR euro",
            Currency::CHF => "Swiss franc",
            Currency::CHW => "WIR franc",
            Currency::CLF => "Unidad de Fomento",
            Currency::CLP => "Chilean peso",
            Currency::COP => "Colombian peso",
            Currency::COU => "Unidad de Valor Real (UVR)",
            Currency::CRC => "Costa Rican colon",
            Currency::CUC => "Cuban convertible peso",
            Currency::CUP => "Cuban peso",
            Currency::CVE => "Cape Verdean escudo",
            Currency::CZK => "Czech koruna",
            Currency::DJF => "Djiboutian franc",
            Currency::DKK => "Danish krone",
            Currency::DOP => "Dominican peso",
            Currency::DZD => "Algerian dinar",
            Currency::EGP => "Egyptian pound",
            Currency::ERN => "Eritrean nakfa",
            Currency::ETB => "Ethiopian birr",
            Currency::EUR => "Euro",
            Currency::FJD => "Fiji dollar",
            Currency::FKP => "Falkland Islands pound",
            Currency::GBP => "Pound sterling",
            Currency::GEL => "Georgian lari",
            Currency::GHS => "Ghanaian cedi",
            Currency::GIP => "Gibraltar pound",
            Currency::GMD => "Gambian dalasi",
            Currency::GNF => "Guinean franc",
            Currency::GTQ => "Guatemalan quetzal",
            Currency::GYD => "Guyanese dollar",
            Currency::HKD => "Hong Kong dollar",
            Currency::HNL => "Honduran lempira",
            Currency::HTG => "Haitian gourde",
            Currency::HUF => "Hungarian forint",
            Currency::IDR => "Indonesian rupiah",
            Currency::ILS => "Israeli new shekel",
            Currency::INR => "Indian rupee",
            Currency::IQD => "Iraqi dinar",
            Currency::IRR => "Iranian rial",
            Currency::ISK => "Icelandic króna",
            Currency::JMD => "Jamaican dollar",
            Currency::JOD => "Jordanian dinar",
            Currency::JPY => "Japanese yen",
            Currency::KES => "Kenyan shilling",
            Currency::KGS => "Kyrgyzstani som",
            Currency::KHR => "Cambodian riel",
            Currency::KMF => "Comoro franc",
            Currency::KPW => "North Korean won",
            Currency::KRW => "South Korean won",
            Currency::KWD => "Kuwaiti dinar",
            Currency::KYD => "Cayman Islands dollar",
            Currency::KZT => "Kazakhstani tenge",
            Currency::LAK => "Lao kip",
            Currency::LBP => "Lebanese pound",
            Currency::LKR => "Sri Lankan rupee",
            Currency::LRD => "Liberian dollar",
            Currency::LSL => "Lesotho loti",
            Currency::LYD => "Libyan dinar",
            Currency::MAD => "Moroccan dirham",
            Currency::MDL => "Moldovan leu",
            Currency::MGA => "Malagasy ariary",
            Currency::MKD => "Macedonian denar",
            Currency::MMK => "Myanmar kyat",
            Currency::MNT => "Mongolian tögrög",
            Currency::MOP => "Macanese pataca",
            Currency::MRU => "Mauritanian ouguiya",
            Currency::MUR => "Mauritian rupee",
            Currency::MVR => "Maldivian rufiyaa",
            Currency::MWK => "Malawian kwacha",
            Currency::MXN => "Mexican peso",
            Currency::MXV => "Mexican Unidad de Inversion",
            Currency::MYR => "Malaysian ringgit",
            Currency::MZN => "Mozambican metical",
            Currency::NAD => "Namibian dollar",
            Currency::NGN => "Nigerian naira",
            Currency::NIO => "Nicaraguan córdoba",
            Currency::NOK => "Norwegian krone",
            Currency::NPR => "Nepalese rupee",
            Currency::NZD => "New Zealand dollar",
            Currency::OMR => "Omani rial",
            Currency::PAB => "Panamanian balboa",
            Currency::PEN => "Peruvian sol",
            Currency::PGK => "Papua New Guinean kina",
            Currency::PHP => "Philippine peso",
            Currency::PKR => "Pakistani rupee",
            Currency::PLN => "Polish złoty",
            Currency::PYG => "Paraguayan guaraní",
            Currency::QAR => "Qatari riyal",
            Currency::RON => "Romanian leu",
            Currency::RSD => "Serbian dinar",
            Currency::CNY => "Renminbi",
            Currency::RUB => "Russian ruble",
            Currency::RWF => "Rwandan franc",
            Currency::SAR => "Saudi riyal",
            Currency::SBD => "Solomon Islands dollar",
            Currency::SCR => "Seychelles rupee",
            Currency::SDG => "Sudanese pound",
            Currency::SEK => "Swedish krona",
            Currency::SGD => "Singapore dollar",
            Currency::SHP => "Saint Helena pound",
            Currency::SLE => "Sierra Leonean leone",
            Currency::SLL => "Sierra Leonean leone",
            Currency::SOS => "Somali shilling",
            Currency::SRD => "Surinamese dollar",
            Currency::SSP => "South Sudanese pound",
            Currency::STN => "São Tomé and Príncipe dobra",
            Currency::SVC => "Salvadoran colón",
            Currency::SYP => "Syrian pound",
            Currency::SZL => "Swazi lilangeni",
            Currency::THB => "Thai baht",
            Currency::TJS => "Tajikistani somoni",
            Currency::TMT => "Turkmenistan manat",
            Currency::TND => "Tunisian dinar",
            Currency::TOP => "Tongan paʻanga",
            Currency::TRY => "Turkish lira",
            Currency::TTD => "Trinidad and Tobago dollar",
            Currency::TWD => "New Taiwan dollar",
            Currency::TZS => "Tanzanian shilling",
            Currency::UAH => "Ukrainian hryvnia",
            Currency::UGX => "Ugandan shilling",
            Currency::USD => "United States dollar",
            Currency::USN => "United States dollar",
            Currency::UYI => "Uruguay Peso en Unidades Indexadas",
            Currency::UYU => "Uruguayan peso",
            Currency::UYW => "Unidad previsional",
            Currency::UZS => "Uzbekistan sum",
            Currency::VED => "Venezuelan digital bolívar",
            Currency::VES => "Venezuelan sovereign bolívar",
            Currency::VND => "Vietnamese đồng",
            Currency::VUV => "Vanuatu vatu",
            Currency::WST => "Samoan tala",
            Currency::XAF => "CFA franc BEAC",
            Currency::XAG => "Silver",
            Currency::XAU => "Gold",
            Currency::XBA => "European Composite Unit",
            Currency::XBB => "European Monetary Unit",
            Currency::XBC => "European Unit of Account 9",
            Currency::XBD => "European Unit of Account 17",
            Currency::XCD => "East Caribbean dollar",
            Currency::XDR => "Special drawing rights",
            Currency::XOF => "CFA franc BCEAO",
            Currency::XPD => "Palladium",
            Currency::XPF => "CFP franc",
            Currency::XPT => "Platinum",
            Currency::XSU => "SUCRE	Unified System for Regional Compensation",
            Currency::XTS => "Code reserved for testing	",
            Currency::XUA => "ADB Unit of Account",
            Currency::XXX => "No currency	",
            Currency::YER => "Yemeni rial",
            Currency::ZAR => "South African rand",
            Currency::ZMW => "Zambian kwacha",
            Currency::ZWL => "Zimbabwean dollar",
        }
    }
    pub fn countries(&self) -> Vec<CountryCode> {
        // TODO
        vec![]
    }
}
