{# API #}
{%- set props = props | default([]) -%}
{%- set _color = props.color | default('neutral') -%}
{%- set _elementType = props.elementType | default('span') -%}
{%- set _isSubtle = props.isSubtle | default(false) -%}
{%- set _size = props.size | default('medium') -%}

{# Class names #}
{%- set _rootClassName = _spiritClassPrefix ~ 'Tag' -%}
{%- set _colorClassName = _spiritClassPrefix ~ 'Tag--' ~ _color -%}
{%- set _sizeClassName = _spiritClassPrefix ~ 'Tag--' ~ _size -%}
{%- set _subtleClassname = _isSubtle ? _spiritClassPrefix ~ 'Tag--subtle' : null -%}

{# Miscellaneous #}
{%- set _styleProps = useStyleProps(props) -%}
{%- set _classNames = [ _rootClassName, _colorClassName, _sizeClassName, _subtleClassname, _styleProps.className ] -%}

<{{ _elementType }} {{ mainProps(props) }} {{ styleProp(_styleProps) }} {{ classProp(_classNames) }}>
{%- block content %}{% endblock -%}
</{{ _elementType }}>
