import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { __rest } from "tslib";
import * as React from 'react';
import classNames from 'classnames';
import { Divider } from 'rc-menu';
import { ConfigContext } from '../config-provider';

var MenuDivider = function MenuDivider(_a) {
  var customizePrefixCls = _a.prefixCls,
      className = _a.className,
      dashed = _a.dashed,
      restProps = __rest(_a, ["prefixCls", "className", "dashed"]);

  var _React$useContext = React.useContext(ConfigContext),
      getPrefixCls = _React$useContext.getPrefixCls;

  var prefixCls = getPrefixCls('menu', customizePrefixCls);
  var classString = classNames(_defineProperty({}, "".concat(prefixCls, "-item-divider-dashed"), !!dashed), className);
  return /*#__PURE__*/React.createElement(Divider, _extends({
    className: classString
  }, restProps));
};

export default MenuDivider;