import { isChrome } from '../../lib/client.js';
import { globalClasses } from './Toggle.styles.js';
export var toggleSizeMixin = function (fontSize, toggleHeight, toggleWidth) {
    return "\n    line-height: ".concat(toggleHeight, ";\n    font-size: ").concat(fontSize, ";\n\n    &::before {\n      width: ").concat(toggleWidth, ";\n    }\n  ");
};
export var buttonSizeMixin = function (labGrotesqueBaselineCompensation, fontSize, toggleHeight, toggleWidth, toggleBorderRadius, toggleButtonOffsetY) {
    var labGrotesqueCompenstation = parseInt(labGrotesqueBaselineCompensation);
    var buttonFontSize = parseInt(fontSize);
    var baselineCompensation = buttonFontSize <= 16 && isChrome ? -labGrotesqueCompenstation : 0;
    return "\n    height: ".concat(toggleHeight, ";\n    width: ").concat(toggleWidth, ";\n    flex: 1 0 ").concat(toggleWidth, ";\n\n    border-radius: ").concat(toggleBorderRadius, ";\n    line-height: ").concat(toggleHeight, ";\n\n    margin-top: calc(").concat(toggleButtonOffsetY, " + ").concat(baselineCompensation, "px);\n  ");
};
export var captionSizeMixin = function (fontSize, toggleHeight) {
    return "\n    line-height: ".concat(toggleHeight, ";\n    font-size: ").concat(fontSize, ";\n  ");
};
export var handleMixin = function (toggleHandleSize, toggleHandleBorderRadius) {
    return "\n    border-radius: ".concat(toggleHandleBorderRadius, ";\n    height: ").concat(toggleHandleSize, ";\n    width: ").concat(toggleHandleSize, ";\n  ");
};
export var containerSizeMixin = function (toggleBorderRadius) {
    return "\n    border-radius: ".concat(toggleBorderRadius, ";\n  ");
};
export var inputSizeMixin = function (toggleHeight, toggleWidth) {
    var handleWidthWithBorders = toggleHeight;
    var height = parseInt(toggleHeight);
    return "\n    &:checked ~ .".concat(globalClasses.containerDisabled, " .").concat(globalClasses.background, " {\n      border-radius: ").concat(height * 0.5, "px 0 0 ").concat(height * 0.5, "px;\n    }\n    &:checked ~ .").concat(globalClasses.handle, " {\n      transform: translateX(").concat(toggleWidth, ") translateX(-").concat(handleWidthWithBorders, ");\n    }\n  ");
};
//# sourceMappingURL=Toggle.mixins.js.map