import { createStackCornerRadius, hasMoveInAnimation } from "./stackCornerRadiusUtils.js";
const hasBarMoveInAnimation = (spec)=>[
        spec.animationAppear,
        spec.animationNormal,
        spec.animationEnter,
        spec.animationUpdate
    ].some(hasMoveInAnimation);
const stackCornerRadius_stackCornerRadius = (spec, context)=>{
    const { advancedVSeed, vseed } = context;
    const { chartType } = vseed;
    const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
    if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
    const stackCornerRadiusCallback = createStackCornerRadius(stackCornerRadius);
    if (!hasBarMoveInAnimation(spec)) return {
        ...spec,
        stackCornerRadius: stackCornerRadiusCallback
    };
    return {
        ...spec,
        bar: {
            ...spec.bar,
            style: {
                ...spec.bar?.style,
                cornerRadius: stackCornerRadiusCallback
            }
        }
    };
};
export { stackCornerRadius_stackCornerRadius as stackCornerRadius };

//# sourceMappingURL=stackCornerRadius.js.map