{# API #}
{%- set props = props | default([]) -%}
{%- set _href = props.href -%}
{%- set _isCurrent = props.isCurrent | default(false) -%}
{%- set _rootClass = props.rootClass -%}

{# Class names #}
{%- set _rootClassName = _spiritClassPrefix ~ _rootClass -%}
{%- set _rootCurrentClassName = _isCurrent ? _spiritClassPrefix ~ _rootClass ~ '--current' : null -%}

{# Attributes #}
{%- set _ariaCurrentAttr = _isCurrent ? 'aria-current=page' : null -%}

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

<a
    {{ mainProps(props, _allowedAttributes) }}
    {{ styleProp(_styleProps) }}
    {{ classProp(_classNames) }}
    href="{{ _href }}"
    {{ _ariaCurrentAttr }}
>
    {% block content %}{% endblock %}
</a>
