const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
let src_components_pisellInput_components_BankCard_cardPng_JCB_png = require("./cardPng/JCB.png");
src_components_pisellInput_components_BankCard_cardPng_JCB_png = require_runtime.__toESM(src_components_pisellInput_components_BankCard_cardPng_JCB_png);
let src_components_pisellInput_components_BankCard_cardPng_AMEX_png = require("./cardPng/AMEX.png");
src_components_pisellInput_components_BankCard_cardPng_AMEX_png = require_runtime.__toESM(src_components_pisellInput_components_BankCard_cardPng_AMEX_png);
let src_components_pisellInput_components_BankCard_cardPng_MasterCard_png = require("./cardPng/MasterCard.png");
src_components_pisellInput_components_BankCard_cardPng_MasterCard_png = require_runtime.__toESM(src_components_pisellInput_components_BankCard_cardPng_MasterCard_png);
let src_components_pisellInput_components_BankCard_cardPng_VISA_png = require("./cardPng/VISA.png");
src_components_pisellInput_components_BankCard_cardPng_VISA_png = require_runtime.__toESM(src_components_pisellInput_components_BankCard_cardPng_VISA_png);
let src_components_pisellInput_components_BankCard_cardPng_UnionPay_png = require("./cardPng/UnionPay.png");
src_components_pisellInput_components_BankCard_cardPng_UnionPay_png = require_runtime.__toESM(src_components_pisellInput_components_BankCard_cardPng_UnionPay_png);
let src_components_pisellInput_components_BankCard_cardPng_Discover_png = require("./cardPng/Discover.png");
src_components_pisellInput_components_BankCard_cardPng_Discover_png = require_runtime.__toESM(src_components_pisellInput_components_BankCard_cardPng_Discover_png);
//#region src/components/pisellInput/components/BankCard/utils.ts
const isJcb = (str) => {
	return str.startsWith("35");
};
const isAmex = (str) => {
	return str.startsWith("34") || str.startsWith("37");
};
const isMasterCard = (str) => {
	return str.startsWith("51") || str.startsWith("52") || str.startsWith("53") || str.startsWith("54") || str.startsWith("55") || str.startsWith("22") || str.startsWith("23") || str.startsWith("24") || str.startsWith("25") || str.startsWith("26") || str.startsWith("27");
};
const isVisa = (str) => {
	return str.startsWith("4");
};
const isUnionPay = (str) => {
	return str.startsWith("62") || str.startsWith("81");
};
const isDiscover = (str) => {
	return str.startsWith("60") || str.startsWith("64") || str.startsWith("65");
};
const getCardType = (str) => {
	if (isJcb(str)) return "jcb";
	if (isAmex(str)) return "amex";
	if (isVisa(str)) return "visa";
	if (isMasterCard(str)) return "masterCard";
	if (isUnionPay(str)) return "unionPay";
	if (isDiscover(str)) return "discover";
};
const bankTypeMap = {
	jcb: src_components_pisellInput_components_BankCard_cardPng_JCB_png.default,
	amex: src_components_pisellInput_components_BankCard_cardPng_AMEX_png.default,
	masterCard: src_components_pisellInput_components_BankCard_cardPng_MasterCard_png.default,
	visa: src_components_pisellInput_components_BankCard_cardPng_VISA_png.default,
	unionPay: src_components_pisellInput_components_BankCard_cardPng_UnionPay_png.default,
	discover: src_components_pisellInput_components_BankCard_cardPng_Discover_png.default
};
const getBankCardTypeImg = (val) => {
	const type = getCardType(`${val || ""}`);
	return type ? bankTypeMap[type] : null;
};
//#endregion
exports.bankTypeMap = bankTypeMap;
exports.getBankCardTypeImg = getBankCardTypeImg;
exports.getCardType = getCardType;
