import { buildLabel } from "./label.js";
const labelPie = (spec, context)=>{
    const result = {
        ...spec
    };
    const { advancedVSeed, vseed } = context;
    const { datasetReshapeInfo } = advancedVSeed;
    const { chartType, encoding } = advancedVSeed;
    const baseConfig = advancedVSeed.config[chartType];
    const foldInfo = datasetReshapeInfo[0].foldInfo;
    const { label } = baseConfig;
    result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, [
        foldInfo
    ], advancedVSeed?.locale);
    if (label.labelLayout) result.label.layout = {
        align: label.labelLayout
    };
    return result;
};
export { labelPie };

//# sourceMappingURL=labelPie.js.map