import i18n from "../global/i18n";
const basePath = "https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package";
const CHARGE_NAMES = {
    "normal_charge": "Thailand Post",
    "ems_charge": "EMS",
    "cod_charge": "เก็บเงินปลายทาง",
    "additionalproduct_charge": "ค่าส่งเพิ่มเติมต่อชิ้น",
    "kerry_charge": "Kerry Express",
    "kerry1d_charge": "Kerry Same Day",
    "kerry2d_charge": "Kerry within 2 Days",
    "flash_charge": "Flash Express",
    "dhl_charge": "DHL",
    "grab_charge": "Grab",
    "lineman_charge": "LINE MAN",
    "skootar_charge": "Skootar",
    "alphaexpress_charge": "Alpha Express",
    "lalamove_charge": "Lalamove",
    "nim_charge": "NIM Express",
    "ninjavan_charge": "Ninja Van",
    "jtexpress_charge": "J&T Express",
    "cjlogistics_charge": "CJ Logistics",
    "nikos_charge": "Nikos Express",
    "scgexpress_charge": "SCG Express",
    "deliveree_charge": "Deliveree",
    "tnt_charge": "TNT Express",
    "bestexpress_charge": "Best Express",
    "interexpress_charge": "Inter Express",
    "other_charge": "ขนส่งรูปแบบอื่น",
    "other2_charge": "ขนส่งรูปแบบอื่น 2",
    "other3_charge": "ขนส่งรูปแบบอื่น 3",
    "other4_charge": "ขนส่งรูปแบบอื่น 4",
    "other5_charge": "ขนส่งรูปแบบอื่น 5",
    "true_charge": "True e-logistics",
    "bee_charge": "Bee Express",
    "jwdchilled_charge": "JWD Express Chilled",
    "jwdfrozen_charge": "JWD Express Frozen",
    "aramex_charge": "Aramex",
    "shippopexpress_charge": "SHIPPOP Express Sameday",
    "shippopchilled_charge": "SHIPPOP Chilled Sameday",
    "zto_charge": "ZTO Express",
    "shopeexpress_charge": "Shopee Xpress"
};
export function getChargeName(shippingType) {
    return CHARGE_NAMES[shippingType] || CHARGE_NAMES['other_charge'];
}
export function getChargeLogo(shippingType) {
    const assetsBasePath = `${basePath}/charges`;
    if (!shippingType) {
        return `${assetsBasePath}/other_charge.png`;
    }
    return shippingType?.includes('other') ?? false
        ? `${assetsBasePath}/other_charge.png`
        : `${assetsBasePath}/${shippingType}_logo.png`;
}
export function getPaymentName(payment) {
    switch (payment) {
        case 'banktransfer':
        case 'transfer':
            return i18n.t('chat_profile_view.order_payments.bank_transfer');
        case 'qrcode':
            return i18n.t('chat_profile_view.order_payments.qr_code');
        case 'fbpay':
            return i18n.t('chat_profile_view.order_payments.mobile_banking');
        case 'cod':
            return i18n.t('chat_profile_view.order_payments.cod');
        default:
            return i18n.t('chat_profile_view.order_payments.credit_card');
    }
}
