"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _VisuallyHidden = _interopRequireDefault(require("../../../Atoms/VisuallyHidden"));
var _Typography = _interopRequireDefault(require("../../../Atoms/Typography"));
var _OldIcon = _interopRequireDefault(require("../../../Atoms/OldIcon"));
var _constants = require("../constants");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var StyledTypography = (0, _styledComponents.default)(_Typography.default).withConfig({
  displayName: "Status__StyledTypography",
  componentId: "sc-1ps4k9t-0"
})(["position:absolute;top:", "px;left:", "px;", "{left:", "px;}"], function (p) {
  return p.theme.spacing.unit(_constants.VERTICAL_PADDING);
}, function (p) {
  return p.theme.spacing.unit(_constants.HORIZONTAL_PADDING);
}, function (p) {
  return p.theme.media.greaterThan(p.theme.breakpoints.sm);
}, function (p) {
  return p.theme.spacing.unit(_constants.HORIZONTAL_PADDING_DESKTOP);
});
var Circle = _styledComponents.default.span.withConfig({
  displayName: "Status__Circle",
  componentId: "sc-1ps4k9t-1"
})(["width:", "px;height:", "px;background-color:", ";color:", ";border-radius:50%;display:flex;align-items:center;justify-content:center;"], function (p) {
  return p.theme.spacing.unit(_constants.STEP_NUMBER_SIZE);
}, function (p) {
  return p.theme.spacing.unit(_constants.STEP_NUMBER_SIZE);
}, function (p) {
  return p.$current ? p.theme.color.cta : p.theme.color.disabledBackground;
}, function (p) {
  return p.$current ? p.theme.color.buttonText : p.theme.color.disabledText;
});
var Status = function Status(_ref) {
  var current = _ref.current,
    done = _ref.done,
    noIcons = _ref.noIcons,
    number = _ref.number,
    titleDone = _ref.titleDone,
    titleNotDone = _ref.titleNotDone;
  return _react.default.createElement(_react.default.Fragment, null, done && _react.default.createElement(_VisuallyHidden.default, null, titleDone), !done && !current && _react.default.createElement(_VisuallyHidden.default, null, titleNotDone), !noIcons && _react.default.createElement(StyledTypography, {
    type: "secondary",
    weight: "bold",
    "aria-hidden": true
  }, done ? _react.default.createElement(_OldIcon.default.CheckMarkCircle, {
    size: _constants.STEP_NUMBER_SIZE,
    fill: function fill(t) {
      return t.color.functionGreen;
    }
  }) : _react.default.createElement(Circle, {
    $current: current
  }, number)));
};
var _default = exports.default = Status;