{% load humanize %}
{% load i18n %}
{% load price_formats %}

<div class="card bg-info text-white">
    <div class="card-body">
        <i class="fas fa-info-circle"></i>
        <strong>{% trans "How to create the contract:" %}</strong>
        <ol class="mb-0 mt-2">
            <li>{% trans "Open contracts ingame and click" %} <strong>{% trans "Create Contract" %}</strong></li>
            <li>{% trans "Select" %} <strong>{% trans "Item Exchange" %}</strong> {% trans "and search for" %}
                <strong id="cs-owner">{% if program.is_corporation %}{{ program.owner.corporation }}{% else %}{{ program.owner.character.character }}{% endif %}</strong>
                <button class="btn btn-sm btn-light ms-1 py-0" onclick="copyText('cs-owner')"><i class="fas fa-copy"></i></button>
            </li>
            <li>{% trans "Add all items from your inventory to the contract" %}</li>
            <li>{% trans "On the price page set" %} <strong>{% trans "I will receive" %}</strong>
                {% if contract_price_data.contract_net_total >= 0 %}
                    <strong id="cs-price">{{ contract_price_data.contract_net_total|custom_number_format:2 }}</strong> ISK
                    <button class="btn btn-sm btn-light ms-1 py-0" onclick="copyText('cs-price')"><i class="fas fa-copy"></i></button>
                {% else %}
                    <strong>0 ISK</strong> <i><s>{{ contract_price_data.contract_net_total|custom_number_format:2 }} ISK</s></i>
                {% endif %}
            </li>
            <li>{% trans "Set the contract description to your tracking number:" %}
                <strong id="cs-tracking" style="font-family:monospace;">{{ tracking_number }}</strong>
                <button class="btn btn-sm btn-light ms-1 py-0" onclick="copyText('cs-tracking')"><i class="fas fa-copy"></i></button>
            </li>
            <li>{% trans "Set expiration to" %} <strong>{{ program.expiration }}</strong> {% trans "and submit" %}</li>
        </ol>
    </div>
</div>
