{% load i18n %}

{% if not corporation %}
    <div class="alert alert-info" role="alert">
        {% translate "No Corporation found." %}
    </div>
{% else %}
    <div class="card-header bg-primary rounded-top d-flex align-items-center mt-4">
        <h3 class="text-white">{% translate "Corporation" %}</h3>
    </div>
    <div class="card-body bg-secondary">
        <ul class="card-characters">
            <div class="card">
                <!-- Corporation Name -->
                <div class="card-header text-center">
                    {{ corporation.corporation_name }} {{ corporation.get_status.bootstrap_icon }}
                </div>
                <!-- Corporation Logo -->
                <div class="card-body text-center">
                    <a href="{% url 'ledger:corporation_ledger' corporation_id=corporation.corporation.corporation_id %}?single=True">
                        <img src="{{ corporation.corporation.logo_url_256 }}">
                    </a>
                </div>
                <!-- Corporation Actions -->
                <div class="card-footer text-center">
                    <a class="btn btn-success btn-sm"
                        href="{% url 'ledger:corporation_ledger' corporation_id=corporation.corporation.corporation_id %}?single=True"
                        role="button"
                        data-tooltip-toggle="ledger-tooltip"
                        title="{% translate 'View Corporation Ledger' %}">
                        <i class="fas fa-sign-in-alt"></i>
                    </a>

                    <button type="button" class="btn btn-danger btn-sm btn-square me-2"
                        data-bs-toggle="modal"
                        data-tooltip-toggle="ledger-tooltip"
                        data-title="{% translate 'Delete Corporation' %} {{ corporation.corporation.corporation_name }}"
                        data-text="{% translate 'Are you sure to Delete this Corporation?' %}"
                        data-bs-target="#ledger-delete-confirm"
                        data-action="{% url 'ledger:delete_corp' corporation_id=corporation.corporation.corporation_id %}"
                        >
                        <span class="fas fa-trash"></span>
                    </button>
                </div>
            </div>
        </ul>
    </div>
{% endif %}
