"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends2=require("babel-runtime/helpers/extends"),_extends3=_interopRequireDefault(_extends2),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn"),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=require("babel-runtime/helpers/inherits"),_inherits3=_interopRequireDefault(_inherits2),_react=require("react"),React=_interopRequireWildcard(_react),_rcMenu=require("rc-menu"),_propTypes=require("prop-types"),PropTypes=_interopRequireWildcard(_propTypes),_tooltip=require("../tooltip"),_tooltip2=_interopRequireDefault(_tooltip);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var MenuItem=function(e){function r(){(0,_classCallCheck3.default)(this,r);var t=(0,_possibleConstructorReturn3.default)(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments));return t.onKeyDown=function(e){t.menuItem.onKeyDown(e)},t.saveMenuItem=function(e){t.menuItem=e},t}return(0,_inherits3.default)(r,e),(0,_createClass3.default)(r,[{key:"render",value:function(){var e=this.context.inlineCollapsed,t=this.props;return React.createElement(_tooltip2.default,{title:e&&1===t.level?t.children:"",placement:"right",overlayClassName:t.rootPrefixCls+"-inline-collapsed-tooltip"},React.createElement(_rcMenu.Item,(0,_extends3.default)({},t,{ref:this.saveMenuItem})))}}]),r}(React.Component);MenuItem.contextTypes={inlineCollapsed:PropTypes.bool},MenuItem.isMenuItem=1,exports.default=MenuItem,module.exports=exports.default;