<div class="d-flex justify-content-between align-items-center mb-4">
    <h2><i class="bi bi-pencil"></i> Plugin bewerken: <?= htmlspecialchars($pluginName) ?></h2>
    <a href="/admin/plugins" class="btn btn-outline-secondary btn-sm">
        <i class="bi bi-arrow-left"></i> Terug
    </a>
</div>

<div class="card shadow-sm">
    <div class="card-body">
        <form method="POST" action="/admin/plugins-edit&plugin=<?= urlencode($pluginName) ?>" id="editor-form">
            <input type="hidden" name="csrf_token" value="<?= $csrf ?>">
            <div class="d-flex justify-content-between align-items-center mb-2">
                <span class="badge bg-secondary">PHP</span>
                <small class="text-muted"><?= htmlspecialchars($pluginName) ?>/<?= htmlspecialchars($pluginName) ?>.php</small>
            </div>
            <div class="editor-toolbar" id="editor-toolbar"></div>
            <div class="editor-wrapper">
                <textarea name="content" id="editor-textarea" data-ext="php"><?= htmlspecialchars($fileContent) ?></textarea>
            </div>
            <div class="d-flex gap-2 mt-3">
                <button type="submit" class="btn btn-primary">
                    <i class="bi bi-check-lg"></i> Opslaan
                </button>
                <a href="/admin/plugins" class="btn btn-outline-secondary">Annuleren</a>
            </div>
        </form>
    </div>
</div>
