import { tokens } from "../Slider.tokens";
export const getTickStyle = ({ tick, min, max, isVertical, reversed })=>{
    const percent = (tick - min) / (max - min) * 100;
    const tickSizeVar = `var(${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}%`
    };
};
