import Color from "color";
import React from "react";
export function getInternalLabel(_ref) {
  var ellipsizedName = _ref.ellipsizedName,
    id = _ref.id,
    annotationType = _ref.annotationType,
    revTransform = _ref.revTransform,
    angleAdjust = _ref.angleAdjust,
    isPart = _ref.isPart,
    colorToUse = _ref.colorToUse,
    textPath = _ref.textPath,
    locationNumber = _ref.locationNumber;
  if (!ellipsizedName) return null;
  var pathId = "" + annotationType + id + (locationNumber !== null && locationNumber !== void 0 ? locationNumber : "");
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", {
    id: pathId,
    fill: "none",
    d: textPath.print()
  }), /*#__PURE__*/React.createElement("text", {
    className: "veLabelText veCircularViewInternalLabelText ve-monospace-font",
    transform: (revTransform || "") + (angleAdjust ? " rotate(" + angleAdjust + ")" : ""),
    fill: isPart ? "#ac68cc" : Color(colorToUse).isDark() ? "white" : "black",
    dy: -3
  }, /*#__PURE__*/React.createElement("textPath", {
    textAnchor: "middle",
    startOffset: "50%",
    xlinkHref: "#" + pathId
  }, ellipsizedName)));
}