import { createDimensionContent, createMarkContent } from "./tooltip.js";
import { getTooltipStyle } from "./tooltipStyle.js";
import { updateTooltipElement } from "./tooltipElement.js";
const tooltipOfDualAxisSeries = (options)=>(spec, context)=>{
        const result = {
            ...spec
        };
        const { advancedVSeed, vseed } = context;
        const { measures = [], datasetReshapeInfo, chartType, dimensions = [], encoding, reshapeMeasures = [] } = advancedVSeed;
        const baseConfig = advancedVSeed.config[chartType];
        const { tooltip = {
            enable: true
        } } = baseConfig;
        const { enable } = tooltip;
        const unfoldInfo = datasetReshapeInfo[0].unfoldInfo;
        result.tooltip = {
            visible: enable,
            mark: {
                title: {
                    visible: false
                },
                content: createMarkContent(encoding.tooltip || [], dimensions, vseed.measures, options.foldInfo, unfoldInfo)
            },
            dimension: {
                title: {
                    visible: true
                },
                content: createDimensionContent(encoding.tooltip || [], encoding.color || [], measures, options.foldInfo, unfoldInfo, reshapeMeasures.length > 1)
            }
        };
        return result;
    };
const tooltipDualAxis = (spec, context)=>{
    const result = {
        ...spec
    };
    const { advancedVSeed } = context;
    const { chartType } = advancedVSeed;
    const baseConfig = advancedVSeed.config[chartType];
    const { tooltip = {
        enable: true
    } } = baseConfig;
    result.tooltip = {
        style: getTooltipStyle(tooltip),
        updateElement: updateTooltipElement
    };
    return result;
};
export { tooltipDualAxis, tooltipOfDualAxisSeries };

//# sourceMappingURL=tooltipDualAxis.js.map