import _extends from"babel-runtime/helpers/extends";import _classCallCheck from"babel-runtime/helpers/classCallCheck";import _createClass from"babel-runtime/helpers/createClass";import _possibleConstructorReturn from"babel-runtime/helpers/possibleConstructorReturn";import _inherits from"babel-runtime/helpers/inherits";import*as React from"react";import{Item}from"rc-menu";import*as PropTypes from"prop-types";import Tooltip from"../tooltip";var MenuItem=function(e){function t(){_classCallCheck(this,t);var e=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onKeyDown=function(t){e.menuItem.onKeyDown(t)},e.saveMenuItem=function(t){e.menuItem=t},e}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this.context.inlineCollapsed,t=this.props;return React.createElement(Tooltip,{title:e&&1===t.level?t.children:"",placement:"right",overlayClassName:t.rootPrefixCls+"-inline-collapsed-tooltip"},React.createElement(Item,_extends({},t,{ref:this.saveMenuItem})))}}]),t}(React.Component);MenuItem.contextTypes={inlineCollapsed:PropTypes.bool},MenuItem.isMenuItem=1;export default MenuItem;