"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const ListItemIcon_1 = tslib_1.__importDefault(require("@material-ui/core/ListItemIcon"));
const ListItemText_1 = tslib_1.__importDefault(require("@material-ui/core/ListItemText"));
const ListItem_1 = tslib_1.__importDefault(require("@material-ui/core/ListItem"));
const react_1 = tslib_1.__importDefault(require("react"));
const core_1 = require("@bluebase/core");
exports.DrawerItem = (props) => {
    const { active, disabled, icon, onPress, right, title } = props;
    const Icon = core_1.getComponent('Icon', 'Noop');
    return (react_1.default.createElement(ListItem_1.default, { button: !!onPress, disabled: disabled, selected: active, onClick: onPress },
        icon ? react_1.default.createElement(ListItemIcon_1.default, null,
            react_1.default.createElement(Icon, Object.assign({}, icon))) : null,
        (title) ? react_1.default.createElement(ListItemText_1.default, { inset: !!icon, primary: title }) : null,
        right));
};
