{% set url = null %}
{% if options.route is defined %}
    {% set url = path(options.route, options.routeOptions|default([])) %}
{% endif %}

<div class="card card-sm">
    <div class="card-body">
        <div class="row align-items-center">
            <div class="col-auto">
                <span class="bg-{{ options.color|default('green') }} text-white avatar">
                    <i class="{{ options.icon|icon(true, options.icon) }}"></i>
                </span>
            </div>
            <div class="col">
                {% if not url is empty %}<a href="{{ url }}">{% endif %}
                <div class="font-weight-medium">
                    {{ title|trans }}
                </div>
                <div class="text-body-secondary">
                    {% block widget_data %}
                        {{ data }}
                    {% endblock %}
                </div>
                {% if not url is empty %}</a>{% endif %}
            </div>
        </div>
    </div>
</div>
