(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", "@greenatom/icons", "../../../Tag"], 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 icons_1 = require("@greenatom/icons");
    var Tag_1 = (0, tslib_1.__importDefault)(require("../../../Tag"));
    var MultiSelectMultiValue = function (props) {
        var selectProps = props.selectProps;
        if (selectProps.type === "avatar") {
            return (react_1.default.createElement(Tag_1.default, { size: "s", isClosable: true, onClickClose: props.removeProps.onClick, as: "div", isReadOnly: selectProps.isReadOnly, avatarProps: {
                    icon: react_1.default.createElement(icons_1.IconBrokenUser, null),
                    image: props.data.url
                } }, props.children));
        }
        return (react_1.default.createElement(Tag_1.default, { size: "s", isReadOnly: selectProps.isReadOnly, isClosable: true, onClickClose: props.removeProps.onClick, onMouseDown: function (event) { return event.stopPropagation(); }, as: "div", isDisabled: selectProps.isDisabled && !selectProps.isReadOnly }, props.children));
    };
    exports.default = MultiSelectMultiValue;
});
