{% extends "layouts/admin.twig" %}

{% block title %}{{ guide_page ? (ta.guide|default('Handleiding')) ~ ' - ' : '' }}{{ ta.guide|default('Handleiding') }}{% endblock %}

{% block content %}
<div class="row">
    {% if guide_nav %}
    <aside class="col-md-3 mb-3">
        <div class="card shadow-sm">
            <div class="card-header">
                <h5 class="mb-0"><i class="bi bi-list-ul"></i> {{ ta.navigation|default('Navigatie') }}</h5>
            </div>
            <div class="card-body">
                {{ guide_nav|raw }}
            </div>
        </div>
    </aside>
    <div class="col-md-9">
    {% else %}
    <div class="col-12">
    {% endif %}
        <nav aria-label="breadcrumb" class="mb-4">
            <ol class="breadcrumb">
                <li class="breadcrumb-item {{ not guide_page ? 'active' : '' }}">
                    {% if guide_page %}
                        <a href="/admin/guide{% if guide_lang %}?lang={{ guide_lang }}{% endif %}">{{ ta.guide|default('Handleiding') }}</a>
                    {% else %}
                        {{ ta.manuals|default('Handleidingen') }}
                    {% endif %}
                </li>
                {% if guide_breadcrumbs %}
                    {% for crumb in guide_breadcrumbs %}
                        {% if loop.last %}
                            <li class="breadcrumb-item active">{{ crumb.title }}</li>
                        {% else %}
                            <li class="breadcrumb-item">
                                <a href="/admin/guide?lang={{ guide_lang }}&page={{ crumb.url }}">{{ crumb.title }}</a>
                            </li>
                        {% endif %}
                    {% endfor %}
                {% endif %}
            </ol>
        </nav>

        <div class="guide-content card shadow-sm">
            <div class="card-body">
                {{ content|raw }}
            </div>
        </div>
    </div>
</div>
{% endblock %}