"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListBoxMenu = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ListGroupItem_1 = tslib_1.__importDefault(require("../../../components/List/ListGroupItem"));
const ListGroup_1 = tslib_1.__importDefault(require("../../../components/List/ListGroup"));
const Icon_1 = require("../../../components/Icon");
class ListBoxMenu extends React.Component {
    constructor(props) {
        super(props);
        this.state = {};
    }
    render() {
        let menuItems = this.props.MenuItems.map((menuItem, index) => {
            return (React.createElement(ListGroupItem_1.default, { key: index, onClick: () => this.onClick(menuItem) },
                menuItem.icon && React.createElement(Icon_1.IconComponent, { icon: menuItem.icon }),
                menuItem.label));
        });
        return (React.createElement("div", { style: divStyle },
            React.createElement(ListGroup_1.default, null, menuItems)));
    }
    onClick(menuItem) {
        this.props.onMenuItemClick(menuItem);
    }
}
exports.ListBoxMenu = ListBoxMenu;
let divStyle = {
    overflowY: 'auto',
    overflowX: 'hidden',
    height: '450px',
    marginBottom: '0',
};
