{%
  set classes = [
    'toolbar-title',
  ]
%}
{% if modifiers is iterable %}
  {% set classes = classes|merge(modifiers|map(modifier => "toolbar-title--#{modifier}")) %}
{% endif %}

{% if extra_classes is iterable %}
  {% set classes = classes|merge(extra_classes) %}
{% endif %}

<{{html_tag|default('h2')}}{{attributes.addClass(classes)}}>
  {% if icon %}
    {{ icon('navigation', icon, { class: 'toolbar-title__icon', size: 16 }) }}
  {% endif %}
  <span class="toolbar-title__label">
    {% block content %}
      {{ content }}
    {% endblock %}
  </span>
</{{html_tag|default('h2')}}>
