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

<div class="card card-sm">
    <div class="card-body">
        <div class="row align-items-center">
            <div class="col-auto">
                {% if not url is empty %}<a href="{{ url }}">{% endif %}
                <span class="bg-{{ color }} text-{{ color }}-fg avatar">
                    {{ icon(options.icon, true) }}
                </span>
                {% if not url is empty %}</a>{% endif %}
            </div>
            <div class="col">

                <div class="font-weight-medium">
                    {{ title|trans }}
                </div>
                <div class="text-body-secondary">
                    {% block widget_data %}
                        {{ data }}
                    {% endblock %}
                </div>
            </div>
        </div>
    </div>
</div>
