import { formatItemValue } from '../../utils/formatting';
export const getFormattedValue = (value, key, itemsMap, convertToUTC = true, pivotValuesColumnsMap, parameters) => {
    const pivotValuesColumn = pivotValuesColumnsMap?.[key];
    const item = itemsMap[pivotValuesColumn?.referenceField ?? key];
    return formatItemValue(item, value, convertToUTC, parameters);
};
export const valueFormatter = (yFieldId, itemsMap, pivotValuesColumnsMap, parameters) => (rawValue) => getFormattedValue(rawValue, yFieldId, itemsMap, undefined, pivotValuesColumnsMap, parameters);
//# sourceMappingURL=valueFormatter.js.map