function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from "react";
import { getStripedPattern } from "../utils/editorUtils";
import drawDirectedPiePiece from "./drawDirectedPiePiece";
import { getInternalLabel } from "./getInternalLabel";
export default function CircularPrimer(props) {
  var _props$color = props.color,
    color = _props$color === void 0 ? "orange" : _props$color,
    radius = props.radius,
    _props$arrowheadLengt = props.arrowheadLength,
    arrowheadLength = _props$arrowheadLengt === void 0 ? 0.5 : _props$arrowheadLengt,
    annotationHeight = props.annotationHeight,
    totalAngle = props.totalAngle,
    id = props.id,
    labelNeedsFlip = props.labelNeedsFlip,
    ellipsizedName = props.ellipsizedName;
  var _drawDirectedPiePiece = drawDirectedPiePiece({
      radius: radius,
      annotationHeight: annotationHeight,
      totalAngle: totalAngle,
      arrowheadLength: arrowheadLength,
      tailThickness: 1,
      //feature specific
      returnTextPath: true,
      hasLabel: ellipsizedName,
      labelNeedsFlip: labelNeedsFlip
    }),
    path = _drawDirectedPiePiece[0],
    textPath = _drawDirectedPiePiece[1];
  return /*#__PURE__*/React.createElement(React.Fragment, null, getStripedPattern({
    color: color
  }), /*#__PURE__*/React.createElement("path", {
    className: "vePrimer veCircularViewPrimer",
    id: id,
    strokeWidth: ".5",
    stroke: "black",
    fill: "url(#diagonalHatch)",
    d: path.print()
  }), getInternalLabel(_extends({}, props, {
    colorToUse: color,
    textPath: textPath
  })));
}