"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "getSingleSliderLayout", {
    enumerable: true,
    get: function() {
        return getSingleSliderLayout;
    }
});
const _Slidertokens = require("../Slider.tokens");
const getSingleSliderLayout = ({ value, min, max, isVertical, isHovered, reversed, scaleTicks, showRangeValues, showScale, showCurrentValue, currentValueVisibility, label, labelContentLeft, labelContent, labelPlacement, sliderAlign, rangeValuesPlacementOld, scaleAlign, pointerSize, pointerVisibility })=>{
    const innerShowScale = Boolean((showRangeValues || showScale) && !scaleTicks);
    const innerShowCurrentValue = !scaleTicks && (currentValueVisibility === 'hover' ? showCurrentValue && isHovered : showCurrentValue);
    const hasLabelContent = Boolean(label || labelContentLeft || labelContent) && (!isVertical || sliderAlign !== 'none');
    const labelPlacementClass = !isVertical && (labelPlacement === 'outer' || labelPlacement === 'top') ? _Slidertokens.classes.labelPlacementOuter : _Slidertokens.classes.labelPlacementInner;
    const rangeValuesPlacement = rangeValuesPlacementOld === 'outer' || scaleAlign === 'bottom' || scaleAlign === 'top' || Boolean(scaleTicks) ? 'outer' : 'inner';
    const scaleAlignClass = rangeValuesPlacement === 'outer' ? _Slidertokens.classes.rangeValuesPlacementOuter : _Slidertokens.classes.rangeValuesPlacementInner;
    const labelVerticalPlacement = reversed ? 'bottom' : 'top';
    const showPointer = pointerSize !== 'none' && (pointerVisibility === 'always' || isHovered);
    const thumbPercent = (value - min) / (max - min);
    const thumbSize = `var(${_Slidertokens.privateTokens.thumbSize})`;
    const thumbPosition = `calc(${thumbPercent} * (100% - ${thumbSize}) + ${thumbSize} / 2)`;
    const currentValueStyle = isVertical ? {
        top: `calc(${1 - thumbPercent} * (100% - ${thumbSize}) + ${thumbSize} / 2)`
    } : {
        left: thumbPosition
    };
    const progressSizeStyle = isVertical ? {
        height: `calc(${thumbPercent} * (100% - ${thumbSize}))`
    } : {
        width: `calc(${thumbPercent} * (100% - ${thumbSize}))`
    };
    return {
        innerShowScale,
        innerShowCurrentValue,
        hasLabelContent,
        labelPlacementClass,
        rangeValuesPlacement,
        scaleAlignClass,
        labelVerticalPlacement,
        showPointer,
        currentValueStyle,
        progressSizeStyle
    };
};
