"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get RENDERER_TYPE () {
        return RENDERER_TYPE;
    },
    get passwordRenderer () {
        return passwordRenderer;
    },
    get valueFormatter () {
        return valueFormatter;
    }
});
const _element = require("../../helpers/dom/element");
const _mixed = require("../../helpers/mixed");
const RENDERER_TYPE = 'password';
function valueFormatter(value, cellProperties) {
    const hashLength = cellProperties.hashLength || (0, _mixed.stringify)(value).length;
    const hashSymbol = cellProperties.hashSymbol || '*';
    let hash = '';
    for(let i = 0; i < hashLength; i++){
        hash += hashSymbol;
    }
    return hash;
}
function passwordRenderer(hotInstance, TD, row, col, prop, value) {
    (0, _element.fastInnerHTML)(TD, value, hotInstance.getSettings().sanitizer);
}
passwordRenderer.valueFormatter = valueFormatter;
passwordRenderer.RENDERER_TYPE = RENDERER_TYPE;
