import { AXIS_LABEL_SPACE } from "../../../../utils/index.js";
const bandAxisStyle = (config)=>{
    const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange, animation } = config;
    return {
        type: 'band',
        sampling: !(labelAutoHide || labelAutoRotate || labelAutoLimit),
        visible,
        hover: true,
        label: {
            visible: label?.visible,
            flush: true,
            space: AXIS_LABEL_SPACE,
            style: {
                maxLineWidth: labelAutoLimitLength,
                fill: label?.labelColor,
                angle: label?.labelAngle,
                fontSize: label?.labelFontSize,
                fontWeight: label?.labelFontWeight
            },
            minGap: labelAutoHideGap,
            autoHide: labelAutoHide,
            autoHideMethod: 'greedy',
            autoHideSeparation: labelAutoHideGap,
            autoLimit: labelAutoLimit,
            autoRotate: labelAutoRotate,
            autoRotateAngle: labelAutoRotateAngleRange,
            lastVisible: true
        },
        title: {
            visible: title?.visible,
            text: title?.titleText,
            style: {
                fill: title?.titleColor,
                fontSize: title?.titleFontSize,
                fontWeight: title?.titleFontWeight
            }
        },
        tick: {
            visible: tick?.visible,
            tickSize: tick?.tickSize,
            inside: tick?.tickInside,
            style: {
                stroke: tick?.tickColor
            }
        },
        grid: {
            visible: grid?.visible,
            style: {
                lineWidth: grid?.gridWidth,
                stroke: grid?.gridColor,
                lineDash: grid?.gridLineDash
            }
        },
        domainLine: {
            visible: line?.visible,
            style: {
                lineWidth: line?.lineWidth,
                stroke: line?.lineColor
            }
        },
        animation: !!animation,
        animationUpdate: {
            duration: animation?.duration,
            easing: animation?.easing
        }
    };
};
export { bandAxisStyle };

//# sourceMappingURL=bandAxisStyle.js.map