import { FoldMeasureId, FoldMeasureName, FoldMeasureValue, foldMeasures } from "../../../../../dataReshape/index.js";
import "../../../../spec/chart/pipes/index.js";
import { findAllMeasures } from "../../../../utils/index.js";
const reshapePivotTable = (advancedVSeed, context)=>{
    const result = {
        ...advancedVSeed
    };
    const { vseed } = context;
    const { dataset, chartType } = vseed;
    const { measureTree } = advancedVSeed;
    const { dataset: newDatasets, foldInfo } = foldMeasures(dataset, findAllMeasures(measureTree), {
        measureId: FoldMeasureId,
        measureName: FoldMeasureName,
        measureValue: FoldMeasureValue,
        allowEmptyFold: false
    });
    const datasetReshapeInfo = [
        {
            id: String(chartType),
            index: 0,
            foldInfo
        }
    ];
    return {
        ...result,
        dataset: newDatasets,
        datasetReshapeInfo: datasetReshapeInfo
    };
};
export { reshapePivotTable };

//# sourceMappingURL=reshapePivotTable.js.map