"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createBankFormat = createBankFormat;
const isNil_1 = __importDefault(require("lodash/isNil"));
const utils_1 = require("../utils");
function createBankFormat() {
    return (column) => {
        return {
            cell(val) {
                // 处理空值：如果值为 null、undefined 或空字符串，显示空值占位符
                if ((0, isNil_1.default)(val) || val === '') {
                    return (0, utils_1.renderValueHandleEmpty)(val);
                }
                return (0, utils_1.formatCardNumber)(`${val}`, column.cardTypes);
            },
        };
    };
}
