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

{% block title %}{% if isDir %}{{ ta.folder|default('Map') }}{% else %}{{ ta.file|default('Bestand') }}{% endif %} {{ ta.move_suffix|default('verplaatsen') }} - {{ ta.admin_title|default('CodePress Admin') }}{% endblock %}

{% block content %}
<h2 class="mb-4"><i class="bi bi-arrows-move"></i> {% if isDir %}{{ ta.folder|default('Map') }}{% else %}{{ ta.file|default('Bestand') }}{% endif %} {{ ta.move_suffix|default('verplaatsen') }}</h2>

<form method="post" class="card shadow-sm">
    <input type="hidden" name="csrf_token" value="{{ csrf_token }}">
    <div class="card-body">
        <div class="alert alert-info">
            {{ ta.move_prefix|default('Verplaats') }} <strong>{{ itemName }}</strong> {{ ta.move_to|default('naar:') }}
        </div>
        <div class="mb-3">
            <label for="destination" class="form-label">{{ ta.target_folder|default('Doelmap') }}</label>
            <select class="form-select" id="destination" name="destination" required>
                {% for directory in directories %}
                <option value="{{ directory }}">{{ directory }}</option>
                {% endfor %}
            </select>
        </div>
    </div>
    <div class="card-footer bg-white">
        <button type="submit" class="btn btn-primary">
            <i class="bi bi-check-lg"></i> {{ ta.move|default('Verplaatsen') }}
        </button>
        <a href="/admin/content?dir={{ itemDir|url_encode }}" class="btn btn-outline-secondary">{{ ta.cancel|default('Annuleren') }}</a>
    </div>
</form>
{% endblock %}