<div class="adminVue js-vue-environment">
    
    
    <table class="manage-items">
        <thead>
        <tr>
            <th>ID</th>
            <th>Item</th>
            <th style="width:550px;">Item variation (size)</th>
            <th style="width:490px;">Options</th>
        </tr>
        </thead>
    
        <tbody class="tabular">
        {% for temp_item in items %}
            <tr>
                <td>{{ temp_item.id }}</td>
                <td><a href="{{ temp_item.shop_item.getAdminUrl() }}">{{ temp_item.shop_item.name }}</a></td>
                <td style="width:550px;">
                    

                    {% if temp_item.shop_item and temp_item.shop_item.sizes|length > 1 %}
                        <admin-subscription-variations
                                :item="{{ temp_item | json_encode }}"
                                :subscription-id="{{ subscription.id }}"
                                form-url="/subscription/{{ subscription.id }}/update-subscription-item/"
                        >
                            {% if (temp_item.shop_item_size.size) %}
                                <a href="{{ temp_item.shop_item_size.getAdminUrl() }}">
                                    {{ temp_item.shop_item_size.size }}
                                </a>
                            {% else %}
                                -
                            {% endif %}
                        </admin-subscription-variations>
                    {% else %}
                        -
                    {% endif %}
    
                </td>
                
                <td style="width:490px;">
                    
                    <admin-subscription-actions

                            :has-failed-payment="{% if subscription.hasFailedPayment() %}true{% else %}false{% endif %}"
                            pay-url="/shop/checkout/basket_overview.php?order_id={{ subscription.getLatestFailedPayment().id }}"

                            pause-url="{{ route('admin-subscriptions-set-paused', [ subscription.id ] ) }}"
                            :is-paused="{% if subscription.isPaused() %}true{% else %}false{% endif %}"
                            :can-be-paused="{% if subscription.can_be_paused %}true{% else %}false{% endif %}"

                            activate-url="{{ route('admin-subscriptions-set-active', [ subscription.id ] ) }}"
                            :is-active="{% if subscription.isActive() %}true{% else %}false{% endif %}"

                            cancel-url="{{ route('admin-subscriptions-set-cancelled', [ subscription.id ] ) }}"
                            :is-cancelled="{% if subscription.isCancelled() %}true{% else %}false{% endif %}"
                            :cancel-reasons="{{ cancellation_reasons | json_encode }}"

                            edit-url="{{ subscription.edit_url }}"
                            :is-editable="{% if subscription.edit_url %}true{% else %}false{% endif %}"

                    ></admin-subscription-actions>
                    
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    
</div> <!-- .adminVue -->
