"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const rc_menu_1 = require("rc-menu");
const react_1 = tslib_1.__importDefault(require("react"));
const MenuContext_1 = tslib_1.__importDefault(require("./MenuContext"));
class MenuItem extends react_1.default.Component {
    constructor() {
        super(...arguments);
        this.renderItem = () => {
            const { title, ...rest } = this.props;
            return (react_1.default.createElement(MenuContext_1.default.Consumer, null, ({ inlineCollapsed }) => {
                if (!inlineCollapsed) {
                    return react_1.default.createElement(rc_menu_1.Item, { ...rest, title: title });
                }
                return react_1.default.createElement(rc_menu_1.Item, { ...rest, title: title });
            }));
        };
    }
    render() {
        return this.renderItem();
    }
}
MenuItem.isMenuItem = true;
exports.default = MenuItem;
//# sourceMappingURL=MenuItem.js.map