import { __assign, __rest } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import cx from 'classnames';
import { forwardRef } from 'react';
import Tag from './Tag';
export var SelectTag = forwardRef(function (_a, ref) {
    var className = _a.className, children = _a.children, selected = _a.selected, onChange = _a.onChange, rest = __rest(_a, ["className", "children", "selected", "onChange"]);
    var handleClick = function (_e) {
        onChange === null || onChange === void 0 ? void 0 : onChange(!selected);
    };
    return (_jsx(Tag, __assign({ className: cx('zent-select-tag', className, {
            'zent-select-tag-selected': selected,
        }), ref: ref, onClick: handleClick, outline: true }, rest, { children: children }), void 0));
});
SelectTag.displayName = 'ZentSelectTag';
export default SelectTag;
