import { createDomElement, isNumber } from '@slickgrid-universal/utils';
import { formatNumber } from '../services/utilities';
import { retrieveFormatterOptions } from '../formatters/formatterUtilities';
export const sumTotalsBoldFormatter = (totals, columnDef, grid) => {
    const field = columnDef.field ?? '';
    const val = totals.sum?.[field];
    const params = columnDef?.params;
    const prefix = params?.groupFormatterPrefix || '';
    const suffix = params?.groupFormatterSuffix || '';
    const { minDecimal, maxDecimal, decimalSeparator, thousandSeparator, wrapNegativeNumber } = retrieveFormatterOptions(columnDef, grid, 'regular', 'group');
    if (isNumber(val)) {
        const formattedNumber = formatNumber(val, minDecimal, maxDecimal, wrapNegativeNumber, '', '', decimalSeparator, thousandSeparator);
        return createDomElement('span', { style: { fontWeight: 'bold' }, textContent: `${prefix}${formattedNumber}${suffix}` });
    }
    return '';
};
//# sourceMappingURL=sumTotalsBoldFormatter.js.map