import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import { useMemo } from 'react';
import Select from '@bigbinary/neetoui/Select';
import { useTranslation } from 'react-i18next';
import { isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
import { jsx } from 'react/jsx-runtime';
import Select$1 from '@bigbinary/neetoui/formik/Select';

var currencyData = [
	{
		label: "Afghan Afghani (AFN)",
		value: "AFN",
		symbol: "؋"
	},
	{
		label: "Albanian Lek (ALL)",
		value: "ALL",
		symbol: "L"
	},
	{
		label: "Algerian Dinar (DZD)",
		value: "DZD",
		symbol: "د.ج"
	},
	{
		label: "Angolan Kwanza (AOA)",
		value: "AOA",
		symbol: "Kz"
	},
	{
		label: "Argentine Peso (ARS)",
		value: "ARS",
		symbol: "$"
	},
	{
		label: "Armenian Dram (AMD)",
		value: "AMD",
		symbol: "դր."
	},
	{
		label: "Aruban Florin (AWG)",
		value: "AWG",
		symbol: "ƒ"
	},
	{
		label: "Australian Dollar (AUD)",
		value: "AUD",
		symbol: "$"
	},
	{
		label: "Azerbaijani Manat (AZN)",
		value: "AZN",
		symbol: "₼"
	},
	{
		label: "Bahamian Dollar (BSD)",
		value: "BSD",
		symbol: "$"
	},
	{
		label: "Bahraini Dinar (BHD)",
		value: "BHD",
		symbol: "د.ب"
	},
	{
		label: "Bangladeshi Taka (BDT)",
		value: "BDT",
		symbol: "৳"
	},
	{
		label: "Barbadian Dollar (BBD)",
		value: "BBD",
		symbol: "$"
	},
	{
		label: "Belarusian Ruble (BYN)",
		value: "BYN",
		symbol: "Br"
	},
	{
		label: "Belarusian Ruble (BYR)",
		value: "BYR",
		symbol: "Br"
	},
	{
		label: "Belize Dollar (BZD)",
		value: "BZD",
		symbol: "$"
	},
	{
		label: "Bermudian Dollar (BMD)",
		value: "BMD",
		symbol: "$"
	},
	{
		label: "Bhutanese Ngultrum (BTN)",
		value: "BTN",
		symbol: "Nu."
	},
	{
		label: "Bolivian Boliviano (BOB)",
		value: "BOB",
		symbol: "Bs."
	},
	{
		label: "Bosnia and Herzegovina Convertible Mark (BAM)",
		value: "BAM",
		symbol: "КМ"
	},
	{
		label: "Botswana Pula (BWP)",
		value: "BWP",
		symbol: "P"
	},
	{
		label: "Brazilian Real (BRL)",
		value: "BRL",
		symbol: "R$"
	},
	{
		label: "British Pound (GBP)",
		value: "GBP",
		symbol: "£"
	},
	{
		label: "Brunei Dollar (BND)",
		value: "BND",
		symbol: "$"
	},
	{
		label: "Bulgarian Lev (BGN)",
		value: "BGN",
		symbol: "лв."
	},
	{
		label: "Burundian Franc (BIF)",
		value: "BIF",
		symbol: "Fr"
	},
	{
		label: "Cambodian Riel (KHR)",
		value: "KHR",
		symbol: "៛"
	},
	{
		label: "Canadian Dollar (CAD)",
		value: "CAD",
		symbol: "$"
	},
	{
		label: "Cape Verdean Escudo (CVE)",
		value: "CVE",
		symbol: "$"
	},
	{
		label: "Cayman Islands Dollar (KYD)",
		value: "KYD",
		symbol: "$"
	},
	{
		label: "Central African Cfa Franc (XAF)",
		value: "XAF",
		symbol: "CFA"
	},
	{
		label: "Cfp Franc (XPF)",
		value: "XPF",
		symbol: "Fr"
	},
	{
		label: "Chilean Peso (CLP)",
		value: "CLP",
		symbol: "$"
	},
	{
		label: "Chinese Renminbi Yuan (CNY)",
		value: "CNY",
		symbol: "¥"
	},
	{
		label: "Codes specifically reserved for testing purposes (XTS)",
		value: "XTS",
		symbol: ""
	},
	{
		label: "Colombian Peso (COP)",
		value: "COP",
		symbol: "$"
	},
	{
		label: "Comorian Franc (KMF)",
		value: "KMF",
		symbol: "Fr"
	},
	{
		label: "Congolese Franc (CDF)",
		value: "CDF",
		symbol: "Fr"
	},
	{
		label: "Costa Rican Colón (CRC)",
		value: "CRC",
		symbol: "₡"
	},
	{
		label: "Cuban Convertible Peso (CUC)",
		value: "CUC",
		symbol: "$"
	},
	{
		label: "Cuban Peso (CUP)",
		value: "CUP",
		symbol: "$"
	},
	{
		label: "Czech Koruna (CZK)",
		value: "CZK",
		symbol: "Kč"
	},
	{
		label: "Danish Krone (DKK)",
		value: "DKK",
		symbol: "kr."
	},
	{
		label: "Djiboutian Franc (DJF)",
		value: "DJF",
		symbol: "Fdj"
	},
	{
		label: "Dominican Peso (DOP)",
		value: "DOP",
		symbol: "$"
	},
	{
		label: "East Caribbean Dollar (XCD)",
		value: "XCD",
		symbol: "$"
	},
	{
		label: "Egyptian Pound (EGP)",
		value: "EGP",
		symbol: "ج.م"
	},
	{
		label: "Eritrean Nakfa (ERN)",
		value: "ERN",
		symbol: "Nfk"
	},
	{
		label: "Ethiopian Birr (ETB)",
		value: "ETB",
		symbol: "Br"
	},
	{
		label: "Euro (EUR)",
		value: "EUR",
		symbol: "€"
	},
	{
		label: "European Composite Unit (XBA)",
		value: "XBA",
		symbol: ""
	},
	{
		label: "European Monetary Unit (XBB)",
		value: "XBB",
		symbol: ""
	},
	{
		label: "European Unit of Account 17 (XBD)",
		value: "XBD",
		symbol: ""
	},
	{
		label: "European Unit of Account 9 (XBC)",
		value: "XBC",
		symbol: ""
	},
	{
		label: "Falkland Pound (FKP)",
		value: "FKP",
		symbol: "£"
	},
	{
		label: "Fijian Dollar (FJD)",
		value: "FJD",
		symbol: "$"
	},
	{
		label: "Gambian Dalasi (GMD)",
		value: "GMD",
		symbol: "D"
	},
	{
		label: "Georgian Lari (GEL)",
		value: "GEL",
		symbol: "₾"
	},
	{
		label: "Ghanaian Cedi (GHS)",
		value: "GHS",
		symbol: "₵"
	},
	{
		label: "Gibraltar Pound (GIP)",
		value: "GIP",
		symbol: "£"
	},
	{
		label: "Gold (Troy Ounce) (XAU)",
		value: "XAU",
		symbol: "oz t"
	},
	{
		label: "Guatemalan Quetzal (GTQ)",
		value: "GTQ",
		symbol: "Q"
	},
	{
		label: "Guinean Franc (GNF)",
		value: "GNF",
		symbol: "Fr"
	},
	{
		label: "Guyanese Dollar (GYD)",
		value: "GYD",
		symbol: "$"
	},
	{
		label: "Haitian Gourde (HTG)",
		value: "HTG",
		symbol: "G"
	},
	{
		label: "Honduran Lempira (HNL)",
		value: "HNL",
		symbol: "L"
	},
	{
		label: "Hong Kong Dollar (HKD)",
		value: "HKD",
		symbol: "$"
	},
	{
		label: "Hungarian Forint (HUF)",
		value: "HUF",
		symbol: "Ft"
	},
	{
		label: "Icelandic Króna (ISK)",
		value: "ISK",
		symbol: "kr."
	},
	{
		label: "Indian Rupee (INR)",
		value: "INR",
		symbol: "₹"
	},
	{
		label: "Indonesian Rupiah (IDR)",
		value: "IDR",
		symbol: "Rp"
	},
	{
		label: "Iranian Rial (IRR)",
		value: "IRR",
		symbol: "﷼"
	},
	{
		label: "Iraqi Dinar (IQD)",
		value: "IQD",
		symbol: "ع.د"
	},
	{
		label: "Israeli New Sheqel (ILS)",
		value: "ILS",
		symbol: "₪"
	},
	{
		label: "Jamaican Dollar (JMD)",
		value: "JMD",
		symbol: "$"
	},
	{
		label: "Japanese Yen (JPY)",
		value: "JPY",
		symbol: "¥"
	},
	{
		label: "Jordanian Dinar (JOD)",
		value: "JOD",
		symbol: "د.ا"
	},
	{
		label: "Kazakhstani Tenge (KZT)",
		value: "KZT",
		symbol: "₸"
	},
	{
		label: "Kenyan Shilling (KES)",
		value: "KES",
		symbol: "KSh"
	},
	{
		label: "Kuwaiti Dinar (KWD)",
		value: "KWD",
		symbol: "د.ك"
	},
	{
		label: "Kyrgyzstani Som (KGS)",
		value: "KGS",
		symbol: "som"
	},
	{
		label: "Lao Kip (LAK)",
		value: "LAK",
		symbol: "₭"
	},
	{
		label: "Lebanese Pound (LBP)",
		value: "LBP",
		symbol: "ل.ل"
	},
	{
		label: "Lesotho Loti (LSL)",
		value: "LSL",
		symbol: "L"
	},
	{
		label: "Liberian Dollar (LRD)",
		value: "LRD",
		symbol: "$"
	},
	{
		label: "Libyan Dinar (LYD)",
		value: "LYD",
		symbol: "ل.د"
	},
	{
		label: "Macanese Pataca (MOP)",
		value: "MOP",
		symbol: "P"
	},
	{
		label: "Macedonian Denar (MKD)",
		value: "MKD",
		symbol: "ден"
	},
	{
		label: "Malagasy Ariary (MGA)",
		value: "MGA",
		symbol: "Ar"
	},
	{
		label: "Malawian Kwacha (MWK)",
		value: "MWK",
		symbol: "MK"
	},
	{
		label: "Malaysian Ringgit (MYR)",
		value: "MYR",
		symbol: "RM"
	},
	{
		label: "Maldivian Rufiyaa (MVR)",
		value: "MVR",
		symbol: "MVR"
	},
	{
		label: "Mauritanian Ouguiya (MRU)",
		value: "MRU",
		symbol: "UM"
	},
	{
		label: "Mauritian Rupee (MUR)",
		value: "MUR",
		symbol: "₨"
	},
	{
		label: "Mexican Peso (MXN)",
		value: "MXN",
		symbol: "$"
	},
	{
		label: "Moldovan Leu (MDL)",
		value: "MDL",
		symbol: "L"
	},
	{
		label: "Mongolian Tögrög (MNT)",
		value: "MNT",
		symbol: "₮"
	},
	{
		label: "Moroccan Dirham (MAD)",
		value: "MAD",
		symbol: "د.م."
	},
	{
		label: "Mozambican Metical (MZN)",
		value: "MZN",
		symbol: "MTn"
	},
	{
		label: "Myanmar Kyat (MMK)",
		value: "MMK",
		symbol: "K"
	},
	{
		label: "Namibian Dollar (NAD)",
		value: "NAD",
		symbol: "$"
	},
	{
		label: "Nepalese Rupee (NPR)",
		value: "NPR",
		symbol: "Rs."
	},
	{
		label: "Netherlands Antillean Gulden (ANG)",
		value: "ANG",
		symbol: "ƒ"
	},
	{
		label: "New Leone (SLE)",
		value: "SLE",
		symbol: "Le"
	},
	{
		label: "New Taiwan Dollar (TWD)",
		value: "TWD",
		symbol: "$"
	},
	{
		label: "New Zealand Dollar (NZD)",
		value: "NZD",
		symbol: "$"
	},
	{
		label: "Nicaraguan Córdoba (NIO)",
		value: "NIO",
		symbol: "C$"
	},
	{
		label: "Nigerian Naira (NGN)",
		value: "NGN",
		symbol: "₦"
	},
	{
		label: "North Korean Won (KPW)",
		value: "KPW",
		symbol: "₩"
	},
	{
		label: "Norwegian Krone (NOK)",
		value: "NOK",
		symbol: "kr"
	},
	{
		label: "Omani Rial (OMR)",
		value: "OMR",
		symbol: "ر.ع."
	},
	{
		label: "Pakistani Rupee (PKR)",
		value: "PKR",
		symbol: "₨"
	},
	{
		label: "Palladium (XPD)",
		value: "XPD",
		symbol: "oz t"
	},
	{
		label: "Panamanian Balboa (PAB)",
		value: "PAB",
		symbol: "B/."
	},
	{
		label: "Papua New Guinean Kina (PGK)",
		value: "PGK",
		symbol: "K"
	},
	{
		label: "Paraguayan Guaraní (PYG)",
		value: "PYG",
		symbol: "₲"
	},
	{
		label: "Peruvian Sol (PEN)",
		value: "PEN",
		symbol: "S/"
	},
	{
		label: "Philippine Peso (PHP)",
		value: "PHP",
		symbol: "₱"
	},
	{
		label: "Platinum (XPT)",
		value: "XPT",
		symbol: "oz t"
	},
	{
		label: "Polish Złoty (PLN)",
		value: "PLN",
		symbol: "zł"
	},
	{
		label: "Qatari Riyal (QAR)",
		value: "QAR",
		symbol: "ر.ق"
	},
	{
		label: "Romanian Leu (RON)",
		value: "RON",
		symbol: "Lei"
	},
	{
		label: "Russian Ruble (RUB)",
		value: "RUB",
		symbol: "₽"
	},
	{
		label: "Rwandan Franc (RWF)",
		value: "RWF",
		symbol: "FRw"
	},
	{
		label: "Saint Helenian Pound (SHP)",
		value: "SHP",
		symbol: "£"
	},
	{
		label: "Salvadoran Colón (SVC)",
		value: "SVC",
		symbol: "₡"
	},
	{
		label: "Samoan Tala (WST)",
		value: "WST",
		symbol: "T"
	},
	{
		label: "São Tomé and Príncipe Dobra (STD)",
		value: "STD",
		symbol: "Db"
	},
	{
		label: "São Tomé and Príncipe Second Dobra (STN)",
		value: "STN",
		symbol: "Db"
	},
	{
		label: "Saudi Riyal (SAR)",
		value: "SAR",
		symbol: "ر.س"
	},
	{
		label: "Serbian Dinar (RSD)",
		value: "RSD",
		symbol: "РСД"
	},
	{
		label: "Seychellois Rupee (SCR)",
		value: "SCR",
		symbol: "₨"
	},
	{
		label: "Sierra Leonean Leone (SLL)",
		value: "SLL",
		symbol: "Le"
	},
	{
		label: "Silver (Troy Ounce) (XAG)",
		value: "XAG",
		symbol: "oz t"
	},
	{
		label: "Singapore Dollar (SGD)",
		value: "SGD",
		symbol: "$"
	},
	{
		label: "Slovak Koruna (SKK)",
		value: "SKK",
		symbol: "Sk"
	},
	{
		label: "Solomon Islands Dollar (SBD)",
		value: "SBD",
		symbol: "$"
	},
	{
		label: "Somali Shilling (SOS)",
		value: "SOS",
		symbol: "Sh"
	},
	{
		label: "South African Rand (ZAR)",
		value: "ZAR",
		symbol: "R"
	},
	{
		label: "South Korean Won (KRW)",
		value: "KRW",
		symbol: "₩"
	},
	{
		label: "South Sudanese Pound (SSP)",
		value: "SSP",
		symbol: "£"
	},
	{
		label: "Special Drawing Rights (XDR)",
		value: "XDR",
		symbol: "SDR"
	},
	{
		label: "Sri Lankan Rupee (LKR)",
		value: "LKR",
		symbol: "₨"
	},
	{
		label: "Sudanese Pound (SDG)",
		value: "SDG",
		symbol: "£"
	},
	{
		label: "Surinamese Dollar (SRD)",
		value: "SRD",
		symbol: "$"
	},
	{
		label: "Swazi Lilangeni (SZL)",
		value: "SZL",
		symbol: "E"
	},
	{
		label: "Swedish Krona (SEK)",
		value: "SEK",
		symbol: "kr"
	},
	{
		label: "Swiss Franc (CHF)",
		value: "CHF",
		symbol: "CHF"
	},
	{
		label: "Syrian Pound (SYP)",
		value: "SYP",
		symbol: "£S"
	},
	{
		label: "Tajikistani Somoni (TJS)",
		value: "TJS",
		symbol: "ЅМ"
	},
	{
		label: "Tanzanian Shilling (TZS)",
		value: "TZS",
		symbol: "Sh"
	},
	{
		label: "Thai Baht (THB)",
		value: "THB",
		symbol: "฿"
	},
	{
		label: "Tongan Paʻanga (TOP)",
		value: "TOP",
		symbol: "T$"
	},
	{
		label: "Trinidad and Tobago Dollar (TTD)",
		value: "TTD",
		symbol: "$"
	},
	{
		label: "Tunisian Dinar (TND)",
		value: "TND",
		symbol: "د.ت"
	},
	{
		label: "Turkish Lira (TRY)",
		value: "TRY",
		symbol: "₺"
	},
	{
		label: "Turkmenistani Manat (TMT)",
		value: "TMT",
		symbol: "T"
	},
	{
		label: "Ugandan Shilling (UGX)",
		value: "UGX",
		symbol: "USh"
	},
	{
		label: "Ukrainian Hryvnia (UAH)",
		value: "UAH",
		symbol: "₴"
	},
	{
		label: "Unidad de Fomento (CLF)",
		value: "CLF",
		symbol: "UF"
	},
	{
		label: "United Arab Emirates Dirham (AED)",
		value: "AED",
		symbol: "د.إ"
	},
	{
		label: "United States Dollar (USD)",
		value: "USD",
		symbol: "$"
	},
	{
		label: "Uruguayan Peso (UYU)",
		value: "UYU",
		symbol: "$U"
	},
	{
		label: "Uzbekistan Som (UZS)",
		value: "UZS",
		symbol: "so'm"
	},
	{
		label: "Vanuatu Vatu (VUV)",
		value: "VUV",
		symbol: "Vt"
	},
	{
		label: "Venezuelan Bolívar Soberano (VES)",
		value: "VES",
		symbol: "Bs"
	},
	{
		label: "Vietnamese Đồng (VND)",
		value: "VND",
		symbol: "₫"
	},
	{
		label: "West African Cfa Franc (XOF)",
		value: "XOF",
		symbol: "Fr"
	},
	{
		label: "Yemeni Rial (YER)",
		value: "YER",
		symbol: "﷼"
	},
	{
		label: "Zambian Kwacha (ZMK)",
		value: "ZMK",
		symbol: "ZK"
	},
	{
		label: "Zambian Kwacha (ZMW)",
		value: "ZMW",
		symbol: "K"
	}
];

var getCurrencies = function getCurrencies(allowedCurrencies) {
  if (isPresent(allowedCurrencies) && isNotEmpty(allowedCurrencies)) {
    return currencyData.filter(function (item) {
      return allowedCurrencies.includes(item.value);
    });
  }
  return currencyData;
};

var _excluded$1 = ["label", "allowedCurrencies"];
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var Currency = function Currency(_ref) {
  var label = _ref.label,
    allowedCurrencies = _ref.allowedCurrencies,
    otherSelectProps = _objectWithoutProperties(_ref, _excluded$1);
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  var data = useMemo(function () {
    return getCurrencies(allowedCurrencies);
  }, [allowedCurrencies]);
  return /*#__PURE__*/jsx(Select, _objectSpread$1({
    label: label || t("neetoMolecules.common.currency"),
    options: data
  }, otherSelectProps));
};

var _excluded = ["label", "name", "allowedCurrencies"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var FormikCurrency = function FormikCurrency(_ref) {
  var label = _ref.label,
    _ref$name = _ref.name,
    name = _ref$name === void 0 ? "currency" : _ref$name,
    allowedCurrencies = _ref.allowedCurrencies,
    otherSelectProps = _objectWithoutProperties(_ref, _excluded);
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  var data = useMemo(function () {
    return getCurrencies(allowedCurrencies);
  }, [allowedCurrencies]);
  return /*#__PURE__*/jsx(Select$1, _objectSpread({
    name: name,
    label: label || t("neetoMolecules.common.currency"),
    options: data
  }, otherSelectProps));
};

export { Currency, FormikCurrency };
//# sourceMappingURL=Currency.js.map
