"use strict";

var _icon = _interopRequireDefault(require("../../icon"));

var _ = _interopRequireDefault(require(".."));

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

var _reactDom = _interopRequireDefault(require("react-dom"));

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

var textRender = function textRender(percent) {
  if (percent === 100) {
    return /*#__PURE__*/_react["default"].createElement(_icon["default"], {
      type: "select",
      size: "medium"
    });
  }

  return "".concat(percent.toFixed(2), "%");
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement("div", null, [1, 2, 3, 4, 5, 6].map(function (value, index) {
  return /*#__PURE__*/_react["default"].createElement(_["default"], {
    key: index,
    percent: value / 6 * 100,
    shape: "circle",
    color: "hsl(".concat(index * 60 + 60, ", 90%, 50%)"),
    textRender: textRender
  });
}), [1, 2, 3, 4, 5, 6].map(function (value, index) {
  return /*#__PURE__*/_react["default"].createElement(_["default"], {
    key: index,
    percent: value / 6 * 100,
    shape: "line",
    color: "hsl(".concat(index * 60 + 60, ", 90%, 50%)"),
    textRender: textRender
  });
})), document.getElementById('progress-demo-8'));