"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "getTickStyle", {
    enumerable: true,
    get: function() {
        return getTickStyle;
    }
});
const _Slidertokens = require("../Slider.tokens");
const getTickStyle = ({ tick, min, max, isVertical, reversed })=>{
    const percent = (tick - min) / (max - min) * 100;
    const tickSizeVar = `var(${_Slidertokens.tokens.tickSize})`;
    if (isVertical) {
        const direction = reversed ? 'bottom' : 'top';
        if (tick === min) {
            return {
                [direction]: `calc(${percent}% + ${tickSizeVar} / 2 )`
            };
        }
        if (tick === max) {
            return {
                [direction]: `calc(${percent}% - ${tickSizeVar} / 2 )`
            };
        }
        return {
            [direction]: `${percent}%`
        };
    }
    if (tick === min) {
        return {
            left: `calc(${percent}% + ${tickSizeVar} / 2 )`
        };
    }
    if (tick === max) {
        return {
            left: `calc(${percent}% - ${tickSizeVar} / 2 )`
        };
    }
    return {
        left: `${percent}%`
    };
};
