{#
/**
 * @file
 * Template for Tasklist item component.
 */
#}
{% set id = attributes.id|default(id)|default('tasklist') %}
{% set attributes = attributes|default(create_attribute()) %}

{% if title is not empty %}
  <li class="kern-task-list__item">
    {% if number %}
      <span class="kern-number">{{ number }}</span>
    {% endif %}
    <div class="kern-task-list__title" id="task-{{ id }}-title">
      {% if href %}
        <a href="#" class="kern-link kern-link--stretched" aria-describedby="task-{{ id }}-status">
          {{ title }}
        </a>
      {% else %}
        <p class="kern-body">{{ title }}</p>
      {% endif %}
      {% if badge is not empty %}
        <div class="kern-task-list__status" id="task-{{ id }}-status">
          {{ badge }}
        </div>
      {% endif %}
    </div>
  </li>
{% endif %}
