<?php use function App\Core\e; $section = 'mesaj-raporlari'; ?>
<div class="panel zpanel zpanel-app">
    <?php require BASE_PATH . '/app/Views/zpanel/_sidebar.php'; ?>
    <section class="panel-body zpanel-main">
        <div class="zpanel-head"><div><p class="eyebrow">ZPanel</p><h1>Mesaj Raporlari</h1><p class="muted">Raporlanan mesajlar. Mesaji sil ve raporu kapat aksiyonlari icin gelismis workflow TODO.</p></div></div>
        <section class="zpanel-card"><div class="table-scroll"><table class="zpanel-table">
            <thead><tr><th>ID</th><th>Reporter</th><th>Mesaj sahibi</th><th>Sebep</th><th>Mesaj</th><th>Durum</th><th>Tarih</th><th>Aksiyon</th></tr></thead><tbody>
            <?php foreach (($reports ?? []) as $report): ?><tr><td><?= e($report['id'] ?? '') ?></td><td><?= e($report['reporter_username'] ?? '-') ?></td><td><?= e($report['owner_username'] ?? '-') ?></td><td><?= e($report['reason'] ?? '') ?></td><td><?= e($report['message_body'] ?? '') ?></td><td><span class="status-pill"><?= e($report['status'] ?? '') ?></span></td><td><?= e($report['created_at'] ?? '') ?></td><td><button disabled>Mesaji sil TODO</button><button disabled>Raporu kapat TODO</button></td></tr><?php endforeach; ?>
            <?php if (empty($reports)): ?><tr><td colspan="8">Mesaj raporu yok.</td></tr><?php endif; ?>
            </tbody></table></div></section>
    </section>
</div>
