<?php

namespace Database\Seeders;

use App\Models\Currency;
use Illuminate\Database\Seeder;
use Illuminate\Support\Arr;

class CurrencySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $currencies = [
            "AED" => "United Arab Emirates Dirham",
            "AFN" => "Afghan Afghani",
            "ALL" => "Albanian Lek",
            "AMD" => "Armenian Dram",
            "ANG" => "Netherlands Antillean Guilder",
            "AOA" => "Angolan Kwanza",
            "ARS" => "Argentine Peso",
            "AUD" => "Australian Dollar",
            "AWG" => "Aruban Florin",
            "AZN" => "Azerbaijani Manat",
            "BAM" => "Bosnia and Herzegovina Convertible Mark",
            "BBD" => "Barbados Dollar",
            "BDT" => "Bangladeshi Taka",
            "BGN" => "Bulgarian Lev",
            "BHD" => "Bahraini Dinar",
            "BIF" => "Burundian Franc",
            "BMD" => "Bermudian Dollar",
            "BND" => "Brunei Dollar",
            "BOB" => "Boliviano",
            "BRL" => "Brazilian real",
            "BSD" => "Bahamian Dollar",
            "BTN" => "Bhutanese Ngultrum",
            "BWP" => "Botswana Pula",
            "BYN" => "New Belarusian ruble",
            "BZD" => "Belize Dollar",
            "CAD" => "Canadian Dollar",
            "CDF" => "Congolese Franc",
            "CHF" => "Swiss Franc",
            "CLP" => "Chilean Peso",
            "CNY" => "Renminbi|Chinese Yuan",
            "COP" => "Colombian Peso",
            "CRC" => "Costa Rican Colon",
            "CUP" => "Cuban Peso",
            "CVE" => "Cape Verde Escudo",
            "CZK" => "Czech Koruna",
            "DJF" => "Djiboutian Franc",
            "DKK" => "Danish Krone",
            "DOP" => "Dominican Peso",
            "DZD" => "Algerian Dinar",
            "EGP" => "Egyptian Pound",
            "ERN" => "Eritrean Nakfa",
            "ETB" => "Ethiopian Birr",
            "EUR" => "Euro",
            "FJD" => "Fiji Dollar",
            "FKP" => "Falkland Islands Pound",
            "FOK" => "Faroese Krona",
            "GBP" => "Pound Sterling",
            "GEL" => "Georgian Lari",
            "GGP" => "Guernsey Pound",
            "GHS" => "Ghanaian Cedi",
            "GIP" => "Gibraltar Pound",
            "GMD" => "Gambian Dalasi",
            "GNF" => "Guinean Franc",
            "GTQ" => "Guatemalan Quetzal",
            "GYD" => "Guyanese Dollar",
            "HKD" => "Hong Kong Dollar",
            "HNL" => "Honduran Lempira",
            "HRK" => "Croatian Kuna",
            "HTG" => "Haitian Gourde",
            "HUF" => "Hungarian Forint",
            "IDR" => "Indonesian rupiah",
            "ILS" => "Palestinian Shekel",
            "IMP" => "Manx Pound",
            "INR" => "Indian rupee",
            "IQD" => "Iraqi Dinar",
            "IRR" => "Iranian rial",
            "ISK" => "Icelandic Króna",
            "JEP" => "Jersey Pounds",
            "JMD" => "Jamaican Dollar",
            "JOD" => "Jordanian Dinar",
            "JPY" => "Japanese Yen",
            "KES" => "Kenyan Shilling",
            "KGS" => "Kyrgyzstani Som",
            "KID" => "Kiribati Dollar",
            "KHR" => "Cambodian riel",
            "KMF" => "Comoro Franc",
            "KRW" => "South Korean Won",
            "KWD" => "Kuwaiti Dinar",
            "KYD" => "Cayman Islands Dollar",
            "KZT" => "Kazakhstani Tenge",
            "LAK" => "Lao Kip",
            "LBP" => "Lebanese Pound",
            "LKR" => "Sri Lankan rupee",
            "LRD" => "Liberian Dollar",
            "LSL" => "Lesotho Loti",
            "LYD" => "Libyan Dinar",
            "MAD" => "Moroccan Dirham",
            "MDL" => "Moldovan Leu",
            "MGA" => "Malagasy Ariary",
            "MKD" => "Macedonian Denar",
            "MMK" => "Myanmar Kyat",
            "MNT" => "Mongolian Tögrög",
            "MOP" => "Macanese Pataca",
            "MRU" => "Mauritanian Ouguiya",
            "MUR" => "Mauritian rupee",
            "MVR" => "Maldivian rufiyaa",
            "MWK" => "Malawian Kwacha",
            "MXN" => "Mexican Peso",
            "MYR" => "Malaysian ringgit",
            "MZN" => "Mozambican Metical",
            "NAD" => "Namibian Dollar",
            "NGN" => "Nigerian Naira",
            "NIO" => "Nicaraguan Córdoba",
            "NOK" => "Norwegian Krone",
            "NPR" => "Nepalese rupee",
            "NZD" => "New Zealand Dollar",
            "OMR" => "Omani rial",
            "PAB" => "Panamanian Balboa",
            "PEN" => "Peruvian Sol",
            "PGK" => "Papua New Guinean Kina",
            "PHP" => "Philippine Peso",
            "PKR" => "Pakistani rupee",
            "PLN" => "Polish Złoty",
            "PYG" => "Paraguayan Guaraní",
            "QAR" => "Qatari riyal",
            "RON" => "Romanian Leu",
            "RSD" => "Serbian Dinar",
            "RUB" => "Russian ruble",
            "RWF" => "Rwandan Franc",
            "SAR" => "Saudi riyal",
            "SBD" => "Solomon Islands Dollar",
            "SCR" => "Seychelles rupee",
            "SDG" => "Sudanese Pound",
            "SEK" => "Swedish Krona",
            "SGD" => "Singapore Dollar",
            "SHP" => "Saint Helena Pound",
            "SLL" => "Sierra Leonean Leone",
            "SOS" => "Somali Shilling",
            "SRD" => "Surinamese Dollar",
            "SSP" => "South Sudanese Pound",
            "STN" => "Sao Tomean Dobras",
            "SYP" => "Syrian Pound",
            "SZL" => "Swazi Lilangeni",
            "THB" => "Thai Baht",
            "TJS" => "Tajikistani Somoni",
            "TMT" => "Turkmenistani Manat",
            "TND" => "Tunisian Dinar",
            "TOP" => "Tongan Paʻanga",
            "TRY" => "Turkish Lira",
            "TTD" => "Trinidad and Tobago Dollar",
            "TVD" => "Tuvaluan Dollar",
            "TWD" => "New Taiwan Dollar",
            "TZS" => "Tanzanian Shilling",
            "UAH" => "Ukrainian Hryvnia",
            "UGX" => "Ugandan Shilling",
            "USD" => "United States Dollar",
            "UYU" => "Uruguayan Peso",
            "UZS" => "Uzbekistan Som",
            "VES" => "Venezuelan Bolívar",
            "VND" => "Vietnamese đồng",
            "VUV" => "Vanuatu Vatu",
            "WST" => "Samoan Tala",
            "XAF" => "Central African CFA Franc",
            "XCD" => "East Caribbean Dollar",
            "XOF" => "West African CFA Franc",
            "XPF" => "CFP Franc",
            "YER" => "Yemeni rial",
            "ZAR" => "South African rand",
            "ZMW" => "Zambian Kwacha",
            "ZWL" => "Zimbabwean Dollar",
        ];
        $symbols = [
            'USD' => '$',
            'EUR' => '€',
            'GBP' => '£',
            'JPY' => '¥',
            'CNY' => '¥',
            'INR' => '₹',
            'RUB' => '₽',
            'AUD' => 'A$',
            'CAD' => 'C$',
            'HKD' => 'HK$',
            'NZD' => 'NZ$',
            'SEK' => 'kr',
            'KRW' => '₩',
            'SGD' => 'S$',
            'NOK' => 'kr',
            'MXN' => '$',
            'BRL' => 'R$',
            'AFN' => '؋',
            'ALL' => 'L',
            'AMD' => '֏',
            'ANG' => 'ƒ',
            'AOA' => 'Kz',
            'ARS' => '$',
            'AWG' => 'ƒ',
            'AZN' => '₼',
            'BAM' => 'KM',
            'BBD' => '$',
            'BDT' => '৳',
            'BGN' => 'лв',
            'BIF' => 'FBu',
            'BMD' => '$',
            'BND' => '$',
            'BOB' => 'Bs.',
            'BSD' => '$',
            'BTN' => 'Nu.',
            'BWP' => 'P',
            'BYN' => 'Br',
            'BZD' => 'BZ$',
            'CDF' => 'FC',
            'CLP' => '$',
            'COP' => '$',
            'CRC' => '₡',
            'CUP' => '₱',
            'CVE' => '$',
            'CZK' => 'Kč',
            'DJF' => 'Fdj',
            'DKK' => 'kr',
            'DOP' => 'RD$',
            'EGP' => 'E£',
            'ERN' => 'Nfk',
            'ETB' => 'Br',
            'FJD' => '$',
            'FKP' => '£',
            'FOK' => 'kr',
            'GEL' => '₾',
            'GGP' => '£',
            'GHS' => '₵',
            'GIP' => '£',
            'GMD' => 'D',
            'GNF' => 'FG',
            'GTQ' => 'Q',
            'GYD' => '$',
            'HNL' => 'L',
            'HRK' => 'kn',
            'HTG' => 'G',
            'HUF' => 'Ft',
            'IDR' => 'Rp',
            'ILS' => '₪',
            'IMP' => '£',
            'ISK' => 'kr',
            'JEP' => '£',
            'JMD' => 'J$',
            'JOD' => 'JD',
            'KES' => 'KSh',
            'KGS' => 'с',
            'KHR' => '៛',
            'KID' => '$',
            'KMF' => 'CF',
            'KWD' => 'KD',
            'KYD' => '$',
            'KZT' => '₸',
            'LAK' => '₭',
            'LKR' => '₨',
            'LRD' => '$',
            'LSL' => 'L',
            'LYD' => 'LD',
            'MAD' => 'DH',
            'MDL' => 'L',
            'MGA' => 'Ar',
            'MKD' => 'ден',
            'MMK' => 'K',
            'MNT' => '₮',
            'MOP' => 'MOP$',
            'MRU' => 'UM',
            'MUR' => '₨',
            'MVR' => 'Rf',
            'MWK' => 'MK',
            'MYR' => 'RM',
            'MZN' => 'MT',
            'NAD' => '$',
            'NGN' => '₦',
            'NIO' => 'C$',
            'NPR' => '₨',
            'PAB' => 'B/.',
            'PEN' => 'S/',
            'PGK' => 'K',
            'PHP' => '₱',
            'PKR' => '₨',
            'PLN' => 'zł',
            'PYG' => '₲',
            'RON' => 'lei',
            'RSD' => 'дин',
            'RWF' => 'RF',
            'SBD' => '$',
            'SCR' => '₨',
            'SHP' => '£',
            'SLL' => 'Le',
            'SOS' => 'S',
            'SRD' => '$',
            'SSP' => '£',
            'STN' => 'Db',
            'SYP' => '£',
            'SZL' => 'L',
            'THB' => '฿',
            'TJS' => 'ЅМ',
            'TMT' => 'm',
            'TOP' => 'T$',
            'TRY' => '₺',
            'TTD' => 'TT$',
            'TVD' => '$',
            'TWD' => 'NT$',
            'TZS' => 'TSh',
            'UAH' => '₴',
            'UGX' => 'USh',
            'UYU' => '$U',
            'UZS' => 'лв',
            'VES' => 'Bs.S',
            'VND' => '₫',
            'VUV' => 'VT',
            'WST' => 'WS$',
            'XAF' => 'FCFA',
            'XCD' => '$',
            'XOF' => 'CFA',
            'XPF' => '₣',
            'ZAR' => 'R',
            'ZMW' => 'ZK',
            'ZWL' => '$',
        ];


        foreach ($currencies as $code => $currency) {
            Currency::updateOrCreate([
                "code" => $code,
            ], [
                "name" => $currency,
                "symbol" => Arr::exists($symbols, $code) ? $symbols[$code] : null,
            ]);
        }
    }
}
