"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPercentFormat = createPercentFormat;
const isNil_1 = __importDefault(require("lodash/isNil"));
const utils_1 = require("../utils");
const number_1 = require("./utils/number");
function createPercentFormat(numAdapterLocale) {
    return {
        align: 'right',
        cell(val) {
            return (0, isNil_1.default)(val) ? (0, utils_1.renderValueHandleEmpty)(val) : `${(0, number_1.getNumFromStr)(val, numAdapterLocale)}%`;
        },
    };
}
