import { BAND_AXIS_INNER_OFFSET_IN_PIVOT } from "../../../../utils/constant.js";
const pivotAxisStyle = (axisStyle)=>(spec, context)=>{
        const result = axisStyle(spec, context);
        if (result.axes) {
            const { advancedVSeed } = context;
            const { config, chartType } = advancedVSeed;
            const themConfig = config?.[chartType]?.pivotGrid ?? {};
            result.axes.forEach((axis)=>{
                axis.domainLine = {
                    visible: false
                };
                if (themConfig.chartGridColor && axis.grid && axis.grid.visible && axis.grid.style) axis.grid.style.stroke = themConfig.chartGridColor;
                if (themConfig.axisLabelColor && axis.label && axis.label.visible && axis.label.style) axis.label.style.fill = themConfig.axisLabelColor;
                if ('band' === axis.type) {
                    if ('left' === axis.orient || 'right' === axis.orient) axis.innerOffset = {
                        top: BAND_AXIS_INNER_OFFSET_IN_PIVOT,
                        bottom: BAND_AXIS_INNER_OFFSET_IN_PIVOT
                    };
                    else if ('top' === axis.orient || 'bottom' === axis.orient) axis.innerOffset = {
                        left: BAND_AXIS_INNER_OFFSET_IN_PIVOT,
                        right: BAND_AXIS_INNER_OFFSET_IN_PIVOT
                    };
                }
            });
        }
        return result;
    };
export { pivotAxisStyle };

//# sourceMappingURL=pivotAxisStyle.js.map