import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import classNames from 'classnames';
import MenuItem from './MenuItem';
/**
 * @ignore
 */

export default function MenuTitle(_ref) {
  var _classNames;

  var className = _ref.className,
      prefixCls = _ref.prefixCls,
      trigger = _ref.trigger,
      selected = _ref.selected,
      silent = _ref.silent,
      disabled = _ref.disabled,
      other = _objectWithoutProperties(_ref, ["className", "prefixCls", "trigger", "selected", "silent", "disabled"]);

  var classes = classNames(prefixCls, className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-selected"), !silent && selected), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-trigger"), trigger), _defineProperty(_classNames, "".concat(prefixCls, "-silent"), silent), _classNames));
  return React.createElement(MenuItem, _extends({
    className: classes
  }, other, {
    disabled: disabled,
    tag: "div",
    selectable: false
  }));
}
MenuTitle.defaultProps = {
  prefixCls: 'ne-menu-title'
};