{% load pi_fyad_tags %}

<div class="col-md-6 col-xl-4 mb-3">
    <div class="card h-100 border-start border-3 border-{% if pin.extractor_status == 'active' %}success{% elif pin.extractor_status == 'expired' %}danger{% else %}secondary{% endif %}">
        <div class="card-body">
            <div class="d-flex justify-content-between align-items-start mb-2">
                <div>
                    {% eve_type_icon pin.type_id 32 %}
                    <span class="ms-2 fw-bold small">{{ pin.type_name }}</span>
                </div>
                {{ pin|extractor_status_badge }}
            </div>
            <table class="table table-sm table-borderless mb-0 small">
                <tr>
                    <td class="text-muted">Product</td>
                    <td>
                        {% if pin.extractor_product_type_id %}
                        {% eve_type_icon pin.extractor_product_type_id 20 %}
                        {% endif %}
                        {{ pin.extractor_product_name|default:"—" }}
                    </td>
                </tr>
                <tr>
                    <td class="text-muted">Heads</td>
                    <td>{{ pin.extractor_head_count }}</td>
                </tr>
                <tr>
                    <td class="text-muted">Per Cycle</td>
                    <td>{{ pin.extractor_qty_per_cycle|format_quantity }}</td>
                </tr>
                <tr>
                    <td class="text-muted">Time Left</td>
                    <td class="{{ pin|extractor_status_class }}">
                        {{ pin|time_remaining_display }}
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
