text: "use strict";
  
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = exports.styles = void 0;
  
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
  
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread"));
  
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
  
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
  
  var _react = _interopRequireDefault(require("react"));
  
  var _propTypes = _interopRequireDefault(require("prop-types"));
  
  var _classnames = _interopRequireDefault(require("classnames"));
  
  var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
  
  var styles = function styles(theme) {
    return {
      root: {},
      horizontal: {
        paddingLeft: theme.spacing.unit,
        paddingRight: theme.spacing.unit,
        '&:first-child': {
          paddingLeft: 0
        },
        '&:last-child': {
          paddingRight: 0
        }
      },
      vertical: {},
      alternativeLabel: {
        flex: 1,
        position: 'relative'
      }
    };
  };
  
  exports.styles = styles;
  
  function Step(props) {
    var active = props.active,
        alternativeLabel = props.alternativeLabel,
        children = props.children,
        classes = props.classes,
        classNameProp = props.className,
        completed = props.completed,
        connector = props.connector,
        disabled = props.disabled,
        index = props.index,
        last = props.last,
        orientation = props.orientation,
        other = (0, _objectWithoutProperties2.default)(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "connector", "disabled", "index", "last", "orientation"]);
    var className = (0, _classnames.default)(classes.root, classes[orientation], (0, _defineProperty2.default)({}, classes.alternativeLabel, alternativeLabel), classNameProp);
    return _react.default.createElement("div", (0, _extends2.default)({
      className: className
    }, other), _react.default.Children.map(children, function (child) {
      return _react.default.cloneElement(child, (0, _objectSpread2.default)({
        active: active,
        alternativeLabel: alternativeLabel,
        completed: completed,
        disabled: disabled,
        icon: index + 1,
        last: last,
        orientation: orientation
      }, child.props));
    }), connector && alternativeLabel && !last && _react.default.cloneElement(connector, {
      orientation: orientation,
      alternativeLabel: alternativeLabel
    }));
  }
  
  Step.propTypes = process.env.NODE_ENV !== "production" ? {
    /**
     * Sets the step as active. Is passed to child components.
     */
    active: _propTypes.default.bool,
  
    /**
     * @ignore
     * Set internally by Stepper when it's supplied with the alternativeLabel property.
     */
    alternativeLabel: _propTypes.default.bool,
  
    /**
     * Should be `Step` sub-components such as `StepLabel`, `StepContent`.
     */
    children: _propTypes.default.node,
  
    /**
     * Useful to extend the style applied to components.
     */
    classes: _propTypes.default.object.isRequired,
  
    /**
     * @ignore
     */
    className: _propTypes.default.string,
  
    /**
     * Mark the step as completed. Is passed to child components.
     */
    completed: _propTypes.default.bool,
  
    /**
     * @ignore
     * Passed down from Stepper if alternativeLabel is also set.
     */
    connector: _propTypes.default.element,
  
    /**
     * Mark the step as disabled, will also disable the button if
     * `StepButton` is a child of `Step`. Is passed to child components.
     */
    disabled: _propTypes.default.bool,
  
    /**
     * @ignore
     * Used internally for numbering.
     */
    index: _propTypes.default.number,
  
    /**
     * @ignore
     */
    last: _propTypes.default.bool,
  
    /**
     * @ignore
     */
    orientation: _propTypes.default.oneOf(['horizontal', 'vertical'])
  } : {};
  Step.defaultProps = {
    active: false,
    completed: false,
    disabled: false
  };
  
  var _default = (0, _withStyles.default)(styles, {
    name: 'MuiStep'
  })(Step);
  
  exports.default = _default;