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


<div class="card">
    <div class="card-content">
        <h1 class="is-size-3 has-text-weight-light">
            <span class="icon is-medium mr-3">
                {% icon "ic:baseline-business" 36 %}
            </span>{{ entity.name }}
        </h1>
        <h2>{{ entity.address_1 }}</h2>

        <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>

        <h4>Created: {{ entity.created | timesince }} ago</h4>
        {% if entity.last_closing_date %}
            <p class="is-italic">{% trans 'Last Closing Date' %}:
                {{ entity.last_closing_date }}
            </p>
        {% endif %}
    </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>