import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/esm/taggedTemplateLiteralLoose";
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
import { css } from "../../../lib/theming/Emotion";
import { getLabGrotesqueBaselineCompensation } from "../../../lib/styles/getLabGrotesqueBaselineCompensation";
import { isChrome, isFirefox } from "../../../lib/client";
export var radioSizeMixin = function radioSizeMixin(fontSize, lineHeight, paddingY, radioSize) {
  return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n    font-size: ", ";\n    line-height: ", ";\n    padding: ", " 0;\n    &::before {\n      width: ", ";\n    }\n  "])), fontSize, lineHeight, paddingY, radioSize);
};
export var circleSizeMixin = function circleSizeMixin(labGrotesqueBaselineCompensation, fontSize, radioSize, radioBorderWidthCompensation, radioCircleOffsetY) {
  var labGrotesqueCompenstation = parseInt(labGrotesqueBaselineCompensation);
  var radioFontSize = parseInt(fontSize);
  var baselineCompensation = getLabGrotesqueBaselineCompensation(radioFontSize, labGrotesqueCompenstation, isChrome, isFirefox);
  var circleSize = "calc(" + radioSize + " - 2 * " + radioBorderWidthCompensation + ")";
  var circleOffsetY = "calc(" + radioCircleOffsetY + " + " + radioBorderWidthCompensation + " + " + baselineCompensation + "px)";
  var circleMarginX = radioBorderWidthCompensation;
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n    height: ", ";\n    width: ", ";\n    margin: ", " ", " 0;\n  "])), circleSize, circleSize, circleOffsetY, circleMarginX);
};
export var radioCheckedMixin = function radioCheckedMixin(bulletSize) {
  return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n    &::before {\n      height: ", ";\n      width: ", ";\n    }\n  "])), bulletSize, bulletSize);
};
export var afterOutlineMixin = function afterOutlineMixin(radioOutlineWidth) {
  return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n    content: ' ';\n    position: absolute;\n    top: -", ";\n    bottom: -", ";\n    left: -", ";\n    right: -", ";\n    border-width: ", ";\n    border-style: solid;\n    border-radius: 50%;\n    box-sizing: border-box;\n  "])), radioOutlineWidth, radioOutlineWidth, radioOutlineWidth, radioOutlineWidth, radioOutlineWidth);
};
export var outlineColorMixin = function outlineColorMixin(shadow, borderColor) {
  return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n    box-shadow: ", ";\n    border-color: ", ";\n  "])), shadow, borderColor);
};