"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.iconFormatter = void 0;
const utils_1 = require("@slickgrid-universal/utils");
/** Display whichever icon you want (library agnostic, it could be Font-Awesome, Material or any other icons set) */
const iconFormatter = (_row, _cell, _value, columnDef) => {
    const columnParams = columnDef?.params ?? {};
    const cssClasses = columnParams.iconCssClass || columnParams.icon || columnParams.formatterIcon;
    if (!cssClasses) {
        throw new Error('[Slickgrid-Universal] When using `Formatters.icon`, you must provide the "iconCssClass" via the generic "params". (e.g.: `{ formatter: Formatters.icon, params: { iconCssClass: "mdi mdi-magnify" }}`');
    }
    return (0, utils_1.createDomElement)('i', { className: cssClasses, ariaHidden: 'true' });
};
exports.iconFormatter = iconFormatter;
//# sourceMappingURL=iconFormatter.js.map