{% load django_ledger %}
{% load i18n %}
{% now "Y" as current_year %}


<div class="card">
    <div class="card-content">
        <p class="title has-text-weight-light">
            <span class="icon is-medium">{% icon "ic:baseline-business" 36 %}</span>{{ entity.name }}
        </p>
        <p class="subtitle">{{ entity.address_1 }}</p>
        <h3 class="is-size-4 has-text-weight-light">
            {% if entity.is_accrual_method %}
                <span class="icon is-medium has-text-info">
                    {% icon 'mdi:cash-clock' 24 %}</span>
                {% trans 'Accrual Method' %}
            {% elif entity.is_cash_method %}
                <span class="icon is-medium has-text-success">
                    {% icon 'bi:cash-stack' 24 %}</span>
                {% trans 'Cash Method' %}
            {% endif %}

        </h3>

        <p>Created: {{ entity.created | timesince }} ago</p>
    </div>
    <footer class="card-footer">
        <a href="{{ entity.get_dashboard_url }}" class="card-footer-item">Dashboard</a>
        <a href="{{ entity.get_manage_url }}" class="card-footer-item has-text-info">Manage</a>
        <a href="{{ entity.get_delete_url }}" class="card-footer-item has-text-danger">Delete</a>
    </footer>
</div>