"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _victory = require("victory");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var GradientLine = function GradientLine(_ref) {
  var x = _ref.x,
      datum = _ref.datum,
      scale = _ref.scale;
  var isPrimary = datum.type === "primary";
  var stroke = isPrimary ? "#721d7c" : "#AAA4AB";
  var overlap = isPrimary ? 0 : 0;
  var width = isPrimary ? 8 : 6;
  var opacity = isPrimary ? 1 : 1;
  return _react["default"].createElement(_victory.Line, {
    y1: scale.y(0) + overlap,
    y2: scale.y(1) - overlap,
    x1: x,
    x2: x,
    style: {
      stroke: stroke,
      strokeWidth: width,
      strokeOpacity: opacity
    }
  });
};

GradientLine.propTypes = {
  x: _propTypes["default"].number,
  datum: _propTypes["default"].shape({
    type: _propTypes["default"].string
  }),
  scale: _propTypes["default"].shape({
    y: _propTypes["default"].func
  })
};
var _default = GradientLine;
exports["default"] = _default;