"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.ProgressLabel = void 0;
var _react = _interopRequireDefault(require("react"));
var _Text = _interopRequireDefault(require("../../Text"));
var _CircularProgressBarCore = require("./CircularProgressBarCore");
var _constants = require("../constants");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/CircularProgressBar/CircularProgressBarCore/ProgressLabel.tsx";
var labelSkinMap = {
  standard: 'primary',
  premium: 'premium',
  success: 'success'
};
var labelSizeMap = {
  tiny: undefined,
  small: undefined,
  medium: 'tiny',
  large: 'medium'
};
var ProgressLabel = props => {
  var sizeKey = props.size;
  if ([_constants.Size.tiny, _constants.Size.small].includes(sizeKey)) {
    return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
  }
  var labelSize = labelSizeMap[sizeKey];
  var labelSkin = labelSkinMap[props['data-skin']];
  return /*#__PURE__*/_react.default.createElement(_Text.default, {
    skin: labelSkin,
    size: labelSize,
    weight: "bold",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 39,
      columnNumber: 5
    }
  }, props.label || (0, _CircularProgressBarCore.convertToPercentageString)(props.value));
};
exports.ProgressLabel = ProgressLabel;
//# sourceMappingURL=ProgressLabel.js.map