import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["text", "href", "as", "className"];
import * as React from 'react';
import classnames from 'classnames';

var MenuItem = function MenuItem(_ref) {
  var text = _ref.text,
      href = _ref.href,
      _ref$as = _ref.as,
      Type = _ref$as === void 0 ? 'a' : _ref$as,
      className = _ref.className,
      restProps = _objectWithoutProperties(_ref, _excluded);

  var elementClass = classnames('sg-menu-list__link', className);
  return /*#__PURE__*/React.createElement("li", {
    className: "sg-menu-list__element"
  }, /*#__PURE__*/React.createElement(Type, _extends({}, restProps, {
    className: elementClass,
    href: href
  }), text));
};

export default MenuItem;