"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MultiValueChip = void 0;
var react_1 = __importDefault(require("react"));
var prop_types_1 = __importDefault(require("prop-types"));
var ramda_1 = require("ramda");
var Cancel_1 = __importDefault(require("@mui/icons-material/Cancel"));
var ValueChip_1 = require("../ValueChip");
var MultiValueChip = function (props) {
    var children = props.children, data = props.data, removeProps = props.removeProps;
    return (react_1.default.createElement(ValueChip_1.ValueChip, { tabIndex: -1, label: children, count: (0, ramda_1.prop)('formattedNumber', data), onDelete: removeProps.onClick, deleteIcon: react_1.default.createElement(Cancel_1.default, __assign({}, props.removeProps)) }));
};
exports.MultiValueChip = MultiValueChip;
exports.MultiValueChip.propTypes = {
    children: prop_types_1.default.node,
    data: prop_types_1.default.shape({
        value: prop_types_1.default.string,
        label: prop_types_1.default.string,
        number: prop_types_1.default.number
    }).isRequired,
    removeProps: prop_types_1.default.shape({
        onClick: prop_types_1.default.func.isRequired,
        onMouseDown: prop_types_1.default.func.isRequired,
        onTouchEnd: prop_types_1.default.func.isRequired
    }).isRequired
};
