import React from "react";
import shouldFlipText from "./shouldFlipText";
import { divideBy3 } from "../utils/proteinUtils";
export function AxisNumbers(_ref) {
  var rotationRadians = _ref.rotationRadians,
    _ref$textHeightOffset = _ref.textHeightOffset,
    textHeightOffset = _ref$textHeightOffset === void 0 ? -5 : _ref$textHeightOffset,
    annotation = _ref.annotation,
    isProtein = _ref.isProtein,
    hideNumbers = _ref.hideNumbers;
  var shouldFlip = shouldFlipText(annotation.startAngle + rotationRadians);
  return /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("rect", {
    y: -17,
    width: 1,
    height: 5,
    fill: "black"
  }), !hideNumbers && /*#__PURE__*/React.createElement("text", {
    transform: (shouldFlip ? "rotate(180)" : "") + (" translate(0, " + (shouldFlip ? -textHeightOffset : textHeightOffset) + ")"),
    style: {
      textAnchor: "middle",
      dominantBaseline: "central",
      fontSize: "small"
    }
  }, divideBy3(annotation.tickPosition + 1, isProtein) + ""));
}