import { __rest } from '../../_virtual/_tslib.js';
import React__default from 'react';
import { IconWrapper } from './styles.js';
import { getTagComponent } from './utils.js';
import { getId } from '../../utils/index.js';

function Tag(_a) {
    var { label, variant = 'neutral', icon, size = 'large', isSubtle, className } = _a, props = __rest(_a, ["label", "variant", "icon", "size", "isSubtle", "className"]);
    const TagComponent = getTagComponent(variant);
    const appendTestId = getId(props['data-testid']);
    return (React__default.createElement(TagComponent, { className: className, size: size, isSubtle: isSubtle, "data-testid": props['data-testid'], "data-trackid": props['data-trackid'], "aria-label": props['aria-label'] || label },
        icon && size === 'large' && (React__default.createElement(IconWrapper, { "data-testid": appendTestId('icon') }, icon)),
        label));
}

export { Tag };
