{% set styles = _args.styles|default(['default']) %}
{% set icon = _args.icon %}
{% set title = _args.title %}
{% set subtitle = _args.subtitle %}
{% set tooltip = _args.tooltip|default(null) %}
{% set action = _args.action|default(null) %}
{% if styles is not iterable %}
{% set styles = styles|split(' ') %}
{% endif %}
<div class="donutlegend__item">
<span class="donutlegend__icon donutlegend__icon--{{- styles|join(' donutlegend__icon--')|trim -}}">
<i class="{{- icon -}}"></i>
</span>
<span class="donutlegend__detail">
<span class="donutlegend__title text-medium text-gray-dark d-block">
{{- title -}}
</span>
<span class="donutlegend__text d-flex flex-wrap">
<span class="font-14 text-semibold">
{{- subtitle -}}
{% if tooltip is not empty %}
<span class="badge badge--sphere text-extrabold" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{- tooltip -}}">?</span>
{% endif %}
{% if action is not empty %}
<a class="text-medium font-14 text-body text-underline" href="{{- action.link|default('#') -}}">
{{- action.text -}}
</a>
{% endif %}
</span>
</span>
</span>
</div>