"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.valueFormatter = exports.getFormattedValue = void 0;
const formatting_1 = require("../../utils/formatting");
const getFormattedValue = (value, key, itemsMap, convertToUTC = true, pivotValuesColumnsMap, parameters) => {
    const pivotValuesColumn = pivotValuesColumnsMap?.[key];
    const item = itemsMap[pivotValuesColumn?.referenceField ?? key];
    return (0, formatting_1.formatItemValue)(item, value, convertToUTC, parameters);
};
exports.getFormattedValue = getFormattedValue;
const valueFormatter = (yFieldId, itemsMap, pivotValuesColumnsMap, parameters) => (rawValue) => (0, exports.getFormattedValue)(rawValue, yFieldId, itemsMap, undefined, pivotValuesColumnsMap, parameters);
exports.valueFormatter = valueFormatter;
//# sourceMappingURL=valueFormatter.js.map