const getAnnotationLineDash = (lineStyle, lineDash)=>{
    if (Array.isArray(lineDash)) return lineDash;
    if ('dashed' === lineStyle) return [
        2,
        2
    ];
    if ('dotted' === lineStyle) return [
        2,
        5
    ];
    return [
        0
    ];
};
const isSubset = (sub, obj, excludeMeasuresIds)=>Object.entries(sub).every(([key, value])=>{
        if (excludeMeasuresIds && excludeMeasuresIds.includes(key)) return false;
        if ('string' == typeof value) return obj[key] === value;
        if ('number' == typeof value) return obj[key] === value;
        return true;
    });
const ANNOTATION_AREA_TEXT_STYLE_BY_POSITION = {
    top: {
        textAlign: 'center',
        textBaseline: 'top'
    },
    topRight: {
        textAlign: 'right',
        textBaseline: 'top'
    },
    topLeft: {
        textAlign: 'left',
        textBaseline: 'top'
    },
    bottom: {
        textAlign: 'center',
        textBaseline: 'bottom'
    },
    bottomLeft: {
        textAlign: 'left',
        textBaseline: 'bottom'
    },
    bottomRight: {
        textAlign: 'right',
        textBaseline: 'bottom'
    },
    left: {
        textAlign: 'left',
        textBaseline: 'middle'
    },
    right: {
        textAlign: 'right',
        textBaseline: 'middle'
    }
};
const resolveAnnotationValue = (options)=>{
    const { dynamicFilter, fallback, defaultValue } = options;
    if (dynamicFilter?.result?.success && void 0 !== dynamicFilter.result.data) return dynamicFilter.result.data;
    if (void 0 !== fallback) return fallback;
    return defaultValue;
};
export { ANNOTATION_AREA_TEXT_STYLE_BY_POSITION, getAnnotationLineDash, isSubset, resolveAnnotationValue };

//# sourceMappingURL=utils.js.map