import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["items", "size", "className"];
import * as React from 'react';
import classNames from 'classnames';
import MenuItem from './subcomponents/MenuItem';
export var SIZE = {
  SMALL: 'small',
  NORMAL: 'normal',
  LARGE: 'large'
};

// This component is deprecated
var MenuList = function MenuList(_ref) {
  var _ref$items = _ref.items,
      items = _ref$items === void 0 ? [] : _ref$items,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? SIZE.NORMAL : _ref$size,
      className = _ref.className,
      props = _objectWithoutProperties(_ref, _excluded);

  var listClass = classNames('sg-menu-list', _defineProperty({}, "sg-menu-list--".concat(size), size !== SIZE.NORMAL), className);
  return /*#__PURE__*/React.createElement("ul", _extends({}, props, {
    className: listClass
  }), items.map(function (_ref2, index) {
    var elementProps = _extends({}, _ref2);

    return /*#__PURE__*/React.createElement(MenuItem, _extends({}, elementProps, {
      key: index
    }));
  }));
};

export default MenuList;
export { MenuItem };