import "core-js/modules/es.array.map.js";
import * as React from 'react';
import { Header } from '@megafon/ui-core';
import { cnCreate, convert, titleConvertConfig } from '@megafon/ui-helpers';
import "./Steps.css";
var cn = cnCreate('mfui-steps');
var Steps = function Steps(_ref) {
  var className = _ref.className,
    classes = _ref.classes,
    title = _ref.title,
    rootRef = _ref.rootRef,
    _ref$theme = _ref.theme,
    theme = _ref$theme === void 0 ? 'none' : _ref$theme,
    children = _ref.children;
  return /*#__PURE__*/React.createElement("div", {
    className: cn({
      theme: theme
    }, [className]),
    ref: rootRef
  }, !!title && /*#__PURE__*/React.createElement(Header, {
    as: "h2",
    align: "center",
    className: cn('title', [classes === null || classes === void 0 ? void 0 : classes.title])
  }, convert(title, titleConvertConfig)), /*#__PURE__*/React.createElement("ul", {
    className: cn('list', [classes === null || classes === void 0 ? void 0 : classes.list])
  }, React.Children.map(children, function (child) {
    return /*#__PURE__*/React.createElement("li", {
      className: cn('item', [classes === null || classes === void 0 ? void 0 : classes.item])
    }, child);
  })));
};
export default Steps;