import { __assign } from "tslib";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo, useCallback } from 'react';
import Icon from '../icon';
function SelectTag(_a) {
    var item = _a.item, onRemove = _a.onRemove, renderValue = _a.renderValue;
    var onClick = useCallback(function (e) {
        e.stopPropagation();
        onRemove(item);
    }, [onRemove, item]);
    return (_jsxs("div", __assign({ className: "zent-select-v2-tag", "data-zv": 'v10.0.12' }, { children: [renderValue ? (renderValue(item)) : (_jsx("span", __assign({ title: item.text, className: "zent-select-v2-tag-text", "data-zv": 'v10.0.12' }, { children: item.text }), void 0)), _jsx(Icon, { type: "close", className: "zent-select-v2-tag-close", onClick: onClick }, void 0)] }), void 0));
}
export default memo(SelectTag);
