"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

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

var _classnames = _interopRequireDefault(require("classnames"));

var _theme = _interopRequireDefault(require("./theme.css"));

var _box = _interopRequireDefault(require("../box"));

var _typography = require("../typography");

var ProgressStep = function ProgressStep(_ref) {
  var _cx;

  var label = _ref.label,
      meta = _ref.meta,
      _ref$active = _ref.active,
      active = _ref$active === void 0 ? false : _ref$active,
      _ref$completed = _ref.completed,
      completed = _ref$completed === void 0 ? false : _ref$completed,
      onClick = _ref.onClick;
  var classNames = (0, _classnames.default)(_theme.default['step'], (_cx = {}, (0, _defineProperty2.default)(_cx, _theme.default['is-active'], active), (0, _defineProperty2.default)(_cx, _theme.default['is-completed'], completed), (0, _defineProperty2.default)(_cx, _theme.default['is-clickable'], !!onClick), (0, _defineProperty2.default)(_cx, _theme.default['has-meta'], !!meta), _cx));
  return /*#__PURE__*/_react.default.createElement(_box.default, {
    className: classNames
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _theme.default['step-label-holder']
  }, /*#__PURE__*/_react.default.createElement(_typography.TextSmall, {
    className: _theme.default['step-label']
  }, label), meta && /*#__PURE__*/_react.default.createElement(_typography.TextSmall, {
    className: _theme.default['step-meta']
  }, meta)), /*#__PURE__*/_react.default.createElement("span", {
    className: _theme.default['status-bullet-halo'],
    onClick: onClick
  }), /*#__PURE__*/_react.default.createElement("span", {
    className: _theme.default['status-bullet'],
    onClick: onClick
  }));
};

ProgressStep.displayName = 'ProgressTracker.ProgressStep';
var _default = ProgressStep;
exports.default = _default;