"use strict";

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

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

var _util = require("./util");

require("./index.css");

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

var prefix = "titaui-ring-progress";

var RingProgress = function RingProgress(_ref) {
  var _ref$percent = _ref.percent,
      percent = _ref$percent === void 0 ? 0 : _ref$percent;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: prefix
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__total")
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__done"),
    style: {
      transform: "rotate(-".concat((0, _util.getRotateDeg)(percent), "deg)")
    }
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__center")
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__space")
  }), /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(prefix, "__percent-text")
  }, percent, "%"));
};

var _default = RingProgress;
exports["default"] = _default;