{%
  set classes = [
    'paragraph',
    'paragraph--type--' ~ paragraph.bundle|clean_class,
    view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
    not paragraph.isPublished() ? 'paragraph--unpublished'
  ]
%}

{% set id = paragraph.id() %}
{% set items = [] %}

{% for item in paragraph.field_tabs_items %}
  {% set sub_paragraph = item.entity %}
  {% if sub_paragraph %}
    {% set items = items|merge([{
      title: sub_paragraph.field_title.value,
      content: sub_paragraph.field_text.value|raw
    }]) %}
  {% endif %}
{% endfor %}

<div{{ attributes.addClass(classes) }}>
  {% include 'starman:tab' with { id: id, items: items } %}
</div>
