"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _react = _interopRequireDefault(require("react"));
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
var _system = require("@wix/wix-ui-icons-common/system");
var _constants = require("../constants");
var _StepMarkerSt = require("./StepMarker.st.css.js");
var _WixDesignSystemIconThemeProvider = require("../../WixDesignSystemIconThemeProvider");
var _excluded = ["number", "active", "type", "styleType", "hovered", "disabled", "className"];
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Stepper/components/StepMarker.jsx",
  _this = void 0;
var StepMarker = function StepMarker(_ref) {
  var number = _ref.number,
    active = _ref.active,
    type = _ref.type,
    styleType = _ref.styleType,
    hovered = _ref.hovered,
    disabled = _ref.disabled,
    className = _ref.className,
    otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
  var icons = (0, _WixDesignSystemIconThemeProvider.useIcons)('StepMarker', {
    Confirm: _wixUiIconsCommon.Confirm,
    StatusAlertFilled: _wixUiIconsCommon.StatusAlertFilled,
    FormFieldErrorSmall: _system.FormFieldErrorSmall
  });
  var renderCompleted = function renderCompleted() {
    return /*#__PURE__*/_react["default"].createElement(icons.Confirm, {
      __self: _this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 25,
        columnNumber: 33
      }
    });
  };
  var renderNumber = function renderNumber() {
    return "".concat(number).concat(styleType === _constants.Type.Text ? '.' : '');
  };
  var renderError = function renderError() {
    return styleType === _constants.Type.Text ? /*#__PURE__*/_react["default"].createElement(icons.StatusAlertFilled, {
      __self: _this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 29,
        columnNumber: 7
      }
    }) : /*#__PURE__*/_react["default"].createElement(icons.FormFieldErrorSmall, {
      size: "12px",
      __self: _this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 31,
        columnNumber: 7
      }
    });
  };
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _StepMarkerSt.st)(_StepMarkerSt.classes.root, {
      type: type,
      styleType: styleType,
      selected: active,
      hovered: hovered
    }, className),
    __self: _this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 35,
      columnNumber: 5
    }
  }, type === _constants.StepType.Error ? renderError() : type === _constants.StepType.Completed ? renderCompleted() : renderNumber());
};
var _default = exports["default"] = StepMarker;