{% extends 'user/detail.html.twig' %}

{% block userDetailContent %}
    <div class="playlist-row playlist-row-user">
        {% if playlists|length > 0 %}
            <div class="playlist-list">
                {% for playlist in playlists %}
                    <a href="{{ path('playlist.detail', {playlistId: playlist.id}) }}" class="playlist-item" style="background-image: url({{ asset('uploads/cover/' ~ playlist.fileReference ~ '.png?t=' ~ date().timestamp) }});">
                        {% if not playlist.isOfficial %}
                            <div class="shade">
                                <div class="content">
                                    <div class="title">{{ playlist.title }}{% if playlist.isOfficial %}<span class="official-badge">OFFICIAL</span>{% endif %}</div>
                                    <div class="quickinfo">{{ playlist.songs|length }} Charts</div>
                                </div>
                            </div>
                        {% endif %}
                    </a>
                {% endfor %}
            </div>
        {% else %}
            <div class="list-noresults">
                <div class="noresults-text">This user did not create any playlists yet.</div>
            </div>
        {% endif %}
    </div>

    <div class="playlist-action">
        <a href="{{ path('playlist.create') }}" class="button">Add New</a>
    </div>
{% endblock %}