{% extends 'base.html.twig' %}

{% block title %}Search Results &mdash - Torsearch{% endblock %}

{% block body %}
    <div class="p-4 flex flex-col grow gap-4">
        <h2 class="mb-2 text-3xl font-bold text-gray-50">Search Results</h2>
        <div class="flex flex-row w-full gap-2">
            <twig:Card title="{{ results.results|length }} results for {{ results.term }}" contentClass="flex flex-col gap-4 justify-between w-full">
                {% for result in results.results %}
                    <ul>
                        <li>
                            <twig:SearchResult
                                    mediaType="{{ result.mediaType }}"
                                    title="{{ result.title }}"
                                    year="{{ result.year }}"
                                    description="{{ result.description }}"
                                    poster="{{ result.poster }}"
                                    imdbId="{{ result.imdbId }}"
                                    tmdbId="{{ result.tmdbId }}"
                            />
                        </li>
                    </ul>
                {% endfor %}
            </twig:Card>
        </div>
    </div>
{% endblock %}
