/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-9f08182
 * Released under the MIT license.
 */

import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { CloseIcon } from '../../../icons/index.js';
import { tasty } from '../../../tasty/index.js';
import { Item } from '../Item/index.js';
const TagElement = tasty(Item, {
    qa: 'Tag',
    role: 'status',
    styles: {
        padding: 0,
        preset: {
            '': 'tag',
            'size=xsmall': 't4',
            'size=small | size=medium': 't3',
            'size=large | size=xlarge': 't2',
        },
        '$min-inline-padding': '.5x',
        Label: {
            textAlign: 'center',
            placeSelf: 'center',
        },
    },
});
function Tag(allProps, ref) {
    let { theme = 'default', isClosable, onClose, closeButtonStyles, children, size = 'inline', mods, ...props } = allProps;
    let type = 'card';
    if (theme === 'special') {
        theme = 'default';
        type = 'primary';
    }
    return (_jsx(TagElement, { ref: ref, size: size, "data-type": type, variant: `${theme}.${type}`, mods: mods, actions: isClosable ? (_jsx(Item.Action, { "aria-label": "Close", styles: { color: 'currentColor', ...closeButtonStyles }, icon: _jsx(CloseIcon, {}), onPress: onClose })) : undefined, ...props, children: children }));
}
const _Tag = forwardRef(Tag);
_Tag.displayName = 'Tag';
export { _Tag as Tag };

        