import React from 'react';

// 内库使用-start
import DOMUtil from "./../../../../utils/DOMUtil";
// 内库使用-end

/* 测试使用-start
import { DOMUtil } from 'seedsui-react'
测试使用-end */

// 标签
var Tag = function Tag(_ref) {
  var style = _ref.style,
    className = _ref.className,
    name = _ref.name,
    readOnly = _ref.readOnly,
    disabled = _ref.disabled,
    allowClear = _ref.allowClear,
    onEdit = _ref.onEdit,
    onDelete = _ref.onDelete;
  return /*#__PURE__*/React.createElement("div", {
    className: DOMUtil.classNames('select-combo-tags-item', className),
    style: style,
    onClick: readOnly || disabled ? undefined : function (e) {
      onEdit && onEdit();
      e.stopPropagation();
    }
  }, name, readOnly || disabled || !allowClear ? null : /*#__PURE__*/React.createElement("i", {
    className: "select-combo-tags-item-clear",
    onClick: function onClick(e) {
      onDelete && onDelete();
      e.stopPropagation();
    }
  }));
};
export default Tag;