{# API #}
{%- set _color = props.color | default('primary') -%}
{%- set _href = props.href -%}

{# Class names #}
{%- set _rootClassName = _spiritClassPrefix ~ 'ToastBar__link' -%}
{%- set _rootUnderlinedClassName = _spiritClassPrefix ~ 'link-underlined' -%}

{# Miscellaneous #}
{%- set _styleProps = useStyleProps(props) -%}
{%- set _classNames = [ _rootClassName, _rootUnderlinedClassName, _styleProps.className ] -%}
{%- set _allowedAttributes = [ 'target', 'title' ] -%}

<a
    {{ mainProps(props, _allowedAttributes) }}
    href="{{ _href }}"
    {{ styleProp(_styleProps) }}
    {{ classProp(_classNames) }}
    data-spirit-populate-field="link"
>
    {%- block content %}{% endblock %}
</a>
