{% set attributes = id ? attributes.setAttribute('id', 'shoelace-tree-item-' ~ id) : attributes %}
{% set attributes = expanded ? attributes.setAttribute('expanded', true) : attributes %}

<sl-tree-item {{ attributes }}>
  {% if icon %}
    <sl-icon name="{{ icon }}"></sl-icon>
  {% endif %}
  {{ title }}
  {{ children }}
</sl-tree-item>
