"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _constants = require("../../../../../constants");
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
var _common = require("../common");
var ChecklistProgressElement = function ChecklistProgressElement(props) {
  var _context$checklistPro;
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
  var data = context ? (0, _common.toBadgeProps)((_context$checklistPro = context.checklistProgress) === null || _context$checklistPro === void 0 ? void 0 : _context$checklistPro.toString()) : null;
  return data ? /*#__PURE__*/_react.default.createElement(_common.BaseBadgeElement, (0, _extends2.default)({
    icon: _constants.IconType.CheckItem
  }, data, props, {
    name: _constants.ElementName.ChecklistProgress
  })) : null;
};
var _default = exports.default = ChecklistProgressElement;