<h2 class="mb-4"><i class="bi bi-arrows-move"></i> <?= is_file($fullPath) ? 'Bestand' : 'Map' ?> verplaatsen</h2>

<form method="post" class="card shadow-sm">
    <input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrf) ?>">

    <div class="card-body">
        <div class="mb-3">
            <label class="form-label text-muted">Te verplaatsen item</label>
            <p class="form-control-plaintext fw-bold">
                <i class="bi <?= is_file($fullPath) ? 'bi-file' : 'bi-folder' ?>"></i>
                <?= htmlspecialchars(basename($fullPath)) ?>
            </p>
        </div>
        <div class="mb-3">
            <label for="target_dir" class="form-label">Doelmap</label>
            <select class="form-select" id="target_dir" name="target_dir" required>
                <option value="">-- Selecteer doelmap --</option>
                <option value="">/ (hoofdmap)</option>
                <?php foreach ($dirs as $d): ?>
                    <option value="<?= htmlspecialchars($d) ?>"><?= htmlspecialchars($d) ?></option>
                <?php endforeach; ?>
            </select>
            <div class="form-text">Selecteer de map waar het item naartoe verplaatst moet worden.</div>
        </div>
        <?php if (!empty($message)): ?>
            <div class="alert alert-<?= $messageType ?>"><?= htmlspecialchars($message) ?></div>
        <?php endif; ?>
    </div>

    <div class="card-footer text-end">
        <a href="/admin/content&dir=<?= urlencode(dirname($item) === '.' ? '' : dirname($item)) ?>" class="btn btn-secondary">Annuleren</a>
        <button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Verplaatsen</button>
    </div>
</form>
