"use strict";

exports.__esModule = true;
exports.AxisNumbers = AxisNumbers;
var _react = _interopRequireDefault(require("react"));
var _shouldFlipText = _interopRequireDefault(require("./shouldFlipText"));
var _proteinUtils = require("../utils/proteinUtils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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 = (0, _shouldFlipText["default"])(annotation.startAngle + rotationRadians);
  return /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("rect", {
    y: -17,
    width: 1,
    height: 5,
    fill: "black"
  }), !hideNumbers && /*#__PURE__*/_react["default"].createElement("text", {
    transform: (shouldFlip ? "rotate(180)" : "") + (" translate(0, " + (shouldFlip ? -textHeightOffset : textHeightOffset) + ")"),
    style: {
      textAnchor: "middle",
      dominantBaseline: "central",
      fontSize: "small"
    }
  }, (0, _proteinUtils.divideBy3)(annotation.tickPosition + 1, isProtein) + ""));
}