import { createDomElement, isNumber } from '@slickgrid-universal/utils';
import {} from '../core/index.js';
import { sumTotalsDollarFormatter } from './sumTotalsDollarFormatter.js';
export const sumTotalsDollarColoredBoldFormatter = (totals, columnDef, grid) => {
    const field = columnDef.field ?? '';
    const val = totals.sum?.[field];
    if (isNumber(val)) {
        const color = val >= 0 ? 'green' : 'red';
        const textContent = sumTotalsDollarFormatter(totals, columnDef, grid);
        return createDomElement('span', {
            style: {
                color,
                fontWeight: 'bold',
            },
            textContent,
        });
    }
    return '';
};
//# sourceMappingURL=sumTotalsDollarColoredBoldFormatter.js.map