import isNil from 'lodash/isNil';
import { formatCardNumber, renderValueHandleEmpty } from '../utils';
export function createBankFormat() {
    return (column) => {
        return {
            cell(val) {
                // 处理空值：如果值为 null、undefined 或空字符串，显示空值占位符
                if (isNil(val) || val === '') {
                    return renderValueHandleEmpty(val);
                }
                return formatCardNumber(`${val}`, column.cardTypes);
            },
        };
    };
}
