"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, timezone, displayTimezone) => {
    const pivotValuesColumn = pivotValuesColumnsMap?.[key];
    const item = itemsMap[pivotValuesColumn?.referenceField ?? key];
    return (0, formatting_1.formatItemValue)(item, value, convertToUTC, parameters, timezone, displayTimezone);
};
exports.getFormattedValue = getFormattedValue;
const valueFormatter = (yFieldId, itemsMap, pivotValuesColumnsMap, parameters, timezone, displayTimezone) => (rawValue) => (0, exports.getFormattedValue)(rawValue, yFieldId, itemsMap, undefined, pivotValuesColumnsMap, parameters, timezone, displayTimezone);
exports.valueFormatter = valueFormatter;
//# sourceMappingURL=valueFormatter.js.map