"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 textRenderer () {
        return textRenderer;
    }
});
const _element = require("../../helpers/dom/element");
const _mixed = require("../../helpers/mixed");
const RENDERER_TYPE = 'text';
function textRenderer(hotInstance, TD, row, col, prop, value, cellProperties) {
    let escaped = value;
    if (!escaped && cellProperties.placeholder) {
        escaped = cellProperties.placeholder;
    }
    escaped = (0, _mixed.stringify)(escaped);
    if (cellProperties.trimWhitespace) {
        escaped = escaped.trim();
    }
    // this is faster than innerHTML.
    (0, _element.fastInnerText)(TD, escaped);
}
textRenderer.RENDERER_TYPE = RENDERER_TYPE;
