"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAxisPointerStyle = exports.getAxisTickStyle = exports.getAxisLineStyle = exports.getAxisTitleStyle = exports.getAxisLabelStyle = exports.DEFAULT_AXIS_TITLE_FONT_SIZE = exports.DEFAULT_AXIS_LABEL_FONT_SIZE = void 0;
const themeColors_1 = require("./themeColors");
exports.DEFAULT_AXIS_LABEL_FONT_SIZE = 11.5;
exports.DEFAULT_AXIS_TITLE_FONT_SIZE = 12;
/**
 * Get axis label styling (for values like "Jan", "Feb", "Mar")
 */
const getAxisLabelStyle = (fontSize) => ({
    color: themeColors_1.GRAY_7,
    fontWeight: '500',
    fontSize: fontSize ?? exports.DEFAULT_AXIS_LABEL_FONT_SIZE,
});
exports.getAxisLabelStyle = getAxisLabelStyle;
/**
 * Get axis title styling (for titles like "Month", "Amount")
 */
const getAxisTitleStyle = (fontSize) => ({
    color: themeColors_1.AXIS_TITLE_COLOR,
    fontWeight: '500',
    fontSize: fontSize ?? exports.DEFAULT_AXIS_TITLE_FONT_SIZE,
});
exports.getAxisTitleStyle = getAxisTitleStyle;
/**
 * Get axis line styling (the main axis line)
 */
const getAxisLineStyle = () => ({
    show: true,
    lineStyle: {
        color: themeColors_1.GRAY_4,
        type: 'solid',
    },
});
exports.getAxisLineStyle = getAxisLineStyle;
/**
 * Get tick line styling (small marks on axis)
 * @param show - Whether to show tick lines. Defaults to true when undefined for backwards compatibility with existing charts, false for new charts
 */
const getAxisTickStyle = (show) => ({
    // For backwards compatibility: undefined means show ticks (existing charts)
    // false means hide ticks (new charts default to hidden)
    show: show ?? true,
    lineStyle: {
        color: themeColors_1.GRAY_4,
        type: 'solid',
    },
});
exports.getAxisTickStyle = getAxisTickStyle;
/**
 * Get axis pointer styling (for highlighting when hovering over series)
 * @param useLinePointer - Whether to use line pointer (for line/area/scatter charts) or shadow pointer (for bar charts)
 */
const getAxisPointerStyle = (useLinePointer = false) => {
    if (useLinePointer) {
        return {
            type: 'line',
            lineStyle: {
                color: themeColors_1.GRAY_5,
                type: [4, 2], // Dashed: 4px dash, 2px gap
                width: 1,
            },
            label: {
                show: true,
                fontWeight: 500,
                fontSize: 11,
                color: themeColors_1.WHITE,
                backgroundColor: themeColors_1.GRAY_7,
            },
        };
    }
    return {
        type: 'shadow',
        label: {
            show: true,
            fontWeight: 500,
            fontSize: 11,
            color: themeColors_1.WHITE,
            backgroundColor: themeColors_1.GRAY_7,
        },
    };
};
exports.getAxisPointerStyle = getAxisPointerStyle;
//# sourceMappingURL=axisStyles.js.map