{% extends "oscar/customer/wishlists/wishlists_list.html" %}
{% load i18n %}

{% block tabcontent %}
{% if wishlists %}
<table class="table table-card align-data-middle">
    <thead>
        <tr>
            <th class="border-0">{% trans 'Name' %}</th>
            <th class="border-0">{% trans 'Number of products' %}</th>
            <th class="border-0">{% trans "Visibility" %}</th>
            <th class="border-0"></th>
            <th class="border-0"></th>
            <th class="border-0"></th>
        </tr>
    </thead>
    <tbody>
        {% for wishlist in wishlists %}
        <tr>
            <td><a href="{% url 'customer:wishlists-detail' key=wishlist.key %}" class="text-dark">{{ wishlist.name }}</a></td>
            <td data-prefix="{% trans 'Products' %}:">{{ wishlist.lines.count }}</td>
            <td>{{ wishlist.visibility }}</td>
            <td class="wishlists-list-actions">
                <a class="btn" href="{% url 'customer:wishlists-update' key=wishlist.key %}">
                    <i class="fa fa-pencil"></i> {% trans "Edit" %}
                </a>
            </td>
            <td class="wishlists-list-actions">
                <a href="{{ wishlist.get_shared_url }}" class="clipboard-item btn shadow-none">
                    <i class="fa fa-copy-regular me-2"></i>{% trans "Copy" %}
                </a>
            </td>
            <td class="wishlists-list-actions">
                <a href="{% url 'customer:wishlists-delete' key=wishlist.key %}" class="text-danger">
                    <i class="fa fa-trash"></i>
                </a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% include "oscar/partials/pagination.html" %}
{% else %}
<p>
    {% trans "You don't have any wish lists yet." %}
</p>
{% endif %}
<p>
    <a href="{% url 'customer:wishlists-create' %}" class="btn btn-primary">{% trans 'Create a new wish list' %}</a>
</p>
{% endblock tabcontent %}