import { FoldXMeasureId, FoldYMeasureId } from "../../../../../dataReshape/constant.js";
const addPivotDimensionsForScatter = (advancedVSeed)=>{
    const { reshapeMeasures = [] } = advancedVSeed;
    if (reshapeMeasures[0]?.length >= 2) {
        const dimensions = advancedVSeed.dimensions ?? [];
        const xMeasures = reshapeMeasures[0].filter((m)=>'xAxis' === m.encoding);
        const yMeasures = reshapeMeasures[0].filter((m)=>'yAxis' === m.encoding);
        if (xMeasures.length > 1 || yMeasures.length > 1) {
            dimensions.push({
                id: FoldXMeasureId,
                alias: ' ',
                encoding: 'column'
            });
            dimensions.push({
                id: FoldYMeasureId,
                alias: ' ',
                encoding: 'row'
            });
        }
        return {
            ...advancedVSeed,
            dimensions
        };
    }
    return advancedVSeed;
};
export { addPivotDimensionsForScatter };

//# sourceMappingURL=addPivotDimensionsForScatter.js.map