"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 _a = this.props, { title } = _a, rest = tslib_1.__rest(_a, ["title"]);
            return (react_1.default.createElement(MenuContext_1.default.Consumer, null, ({ inlineCollapsed }) => {
                if (!inlineCollapsed) {
                    return react_1.default.createElement(rc_menu_1.Item, Object.assign({}, rest, { title: title }));
                }
                return react_1.default.createElement(rc_menu_1.Item, Object.assign({}, rest, { title: title }));
            }));
        };
    }
    render() {
        return this.renderItem();
    }
}
exports.default = MenuItem;
MenuItem.isMenuItem = true;
//# sourceMappingURL=MenuItem.js.map