(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "react", "./styles"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var tslib_1 = require("tslib");
    var react_1 = (0, tslib_1.__importDefault)(require("react"));
    var styles_1 = require("./styles");
    var DropdownItem = function (_a) {
        var getItemLabel = _a.getItemLabel, getItemOnClick = _a.getItemOnClick, onItemClick = _a.onItemClick, getItemDisabled = _a.getItemDisabled, getItemLeadContent = _a.getItemLeadContent, getItemAttributes = _a.getItemAttributes, item = _a.item;
        return (react_1.default.createElement(styles_1.DropdownItemStyled, (0, tslib_1.__assign)({}, getItemAttributes(item), { icon: getItemLeadContent(item), isDisabled: getItemDisabled(item), viewType: "ghost", size: "s", onClick: function (event) {
                var _a;
                event.preventDefault();
                getItemOnClick(item)
                    ? (_a = getItemOnClick(item)) === null || _a === void 0 ? void 0 : _a(event, item)
                    : onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(event, item);
            } }), getItemLabel(item)));
    };
    exports.default = DropdownItem;
});
