export var roundedArrow = function roundedArrow(width, outerRadius, bgColor) {
  var cornerHeight = outerRadius * (1 - 1 / Math.sqrt(2));
  var radiusBase = 2;
  var ax = width - cornerHeight;
  var ay = 2 * width + cornerHeight;
  var bx = ax + outerRadius * (1 / Math.sqrt(2));
  var by = 2 * width;
  var cx = 2 * width - radiusBase;
  var cy = 2 * width;
  var dx = 2 * width;
  var dy = 2 * width - radiusBase;
  var fx = 2 * width + cornerHeight;
  var fy = width - cornerHeight;
  var ex = 2 * width;
  var ey = fy + outerRadius * (1 / Math.sqrt(2));
  return {
    borderRadius: {
      _skip_check_: true,
      value: "0 0 2px"
    },
    pointerEvents: 'none',
    '&::before': {
      position: 'absolute',
      top: -width,
      insetInlineStart: -width,
      width: width * 3,
      height: width * 3,
      background: bgColor,
      // Hack firefox: https://github.com/ant-design/ant-design/pull/33710#issuecomment-1015287825
      backgroundRepeat: 'no-repeat',
      backgroundPosition: "".concat(Math.ceil(-width + 1), "px ").concat(Math.ceil(-width + 1), "px"),
      content: '""',
      clipPath: "path('M ".concat(ax, " ").concat(ay, " A ").concat(outerRadius, " ").concat(outerRadius, " 0 0 1 ").concat(bx, " ").concat(by, " L ").concat(cx, " ").concat(cy, " A ").concat(radiusBase, " ").concat(radiusBase, " 0 0 0 ").concat(dx, " ").concat(dy, " L ").concat(ex, " ").concat(ey, " A ").concat(outerRadius, " ").concat(outerRadius, " 0 0 1 ").concat(fx, " ").concat(fy, " Z')")
    }
  };
};