{#
    This component outputs a semantic headline.

        <h1>headline</h1>

    Mandatory variables:
        @var string text

    Optional variables:
        @var string tag_name
        @var \Contao\CoreBundle\String\HtmlAttributes attributes

    Note:
        You can either group all variables in an object named "headline" or
        all directly in the context. Grouping under an object has precedence.
#}

{% block headline_component %}
    {% set headline = headline|default(_context) %}
    {% set tag_name = headline.tag_name|default('h1') %}

    <{{ tag_name }}{% block headline_attributes %}{{ headline.attributes|default }}{% endblock %}>
    {%- block headline_inner -%}
        {{ headline.text|insert_tag_raw }}
    {%- endblock -%}
    </{{ tag_name }}>
{% endblock %}
