{# API #}
{%- set props = props | default([]) -%}
{%- set _alignmentX = props.alignmentX | default('right') -%}
{%- set _description = props.description | default(null) -%}

{# Class names #}
{%- set _actionsClassName = _spiritClassPrefix ~ 'ModalFooter__actions' -%}
{%- set _descriptionClassName = _spiritClassPrefix ~ 'ModalFooter__description' -%}
{%- set _rootAlignmentXClassName = _spiritClassPrefix ~ 'ModalFooter--' ~ _alignmentX -%}
{%- set _rootClassName = _spiritClassPrefix ~ 'ModalFooter' -%}

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

<footer
    {{ mainProps(props) }}
    {{ styleProp(_styleProps) }}
    {{ classProp(_classNames) }}
>
    {% if _description %}
        <div class="{{ _descriptionClassName }}">
            {{ _description }}
        </div>
    {% endif %}
    <div class="{{ _actionsClassName }}">
        {% block content %}{% endblock %}
    </div>
</footer>
