{{ attach_library('ui_patterns/routes_table_snippet.routes_table_snippet_lib') }}

{% set wrapper_attr = create_attribute()
    .setAttribute('id', 'route-table-snippet')
%}

{% set headers = [] %}
{% set rows = [] %}
{% for row in items %}
  {% set headers = headers|merge([row.header]) %}
  {% set rows = rows|merge([row.value]) %}
{% endfor %}

{% if header is not empty %}
  {{ header }}
{% endif %}
{% include '@molecules/html/table/table.twig' with {
  'headers': headers,
  'rows': [rows],
  'wrapper_attr': wrapper_attr,
} only %}
