"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.mapCardTypeToGraphic = void 0;
const PaymentCard_1 = require("../models/PaymentCard");
const RoomstayThemeEngine_1 = __importDefault(require("../providers/RoomstayThemeEngine"));
const CARD_ASSET_ROOT = 'assets/img/payment-cards';
const mapCardTypeToGraphic = (type) => {
    switch (type) {
        case PaymentCard_1.ECardType.Visa:
        case PaymentCard_1.ECardType.VisaElectron:
        case PaymentCard_1.ECardType.Mastercard:
        case PaymentCard_1.ECardType.Maestro:
        case PaymentCard_1.ECardType.AmericanExpress:
        case PaymentCard_1.ECardType.JCB:
        case PaymentCard_1.ECardType.DinersClub:
        case PaymentCard_1.ECardType.UnionPay:
        case PaymentCard_1.ECardType.Switch: {
            const urlRoot = `${RoomstayThemeEngine_1.default.getAssetUrl()}${CARD_ASSET_ROOT}/${type}/`;
            return {
                backgroundUrl: `${urlRoot}large-card-background.svg`,
                cardIconUrl: `${urlRoot}icon.svg`,
                cardNameIconUrl: `${urlRoot}logo.svg`,
                miniCardUrl: `${urlRoot}mini-card.svg`,
            };
        }
        default: {
            const urlRoot = `${RoomstayThemeEngine_1.default.getAssetUrl()}${CARD_ASSET_ROOT}/empty/`;
            return {
                backgroundUrl: `${urlRoot}large-card-background.svg`,
                cardIconUrl: `${urlRoot}icon.svg`,
                cardNameIconUrl: `${urlRoot}logo.svg`,
                miniCardUrl: `${urlRoot}mini-card.svg`,
            };
        }
    }
};
exports.mapCardTypeToGraphic = mapCardTypeToGraphic;
//# sourceMappingURL=PaymentCardHelper.js.map