<?php require dirname(__DIR__) . '/layouts/app.php'; ?>

<section class="page-heading">
    <div>
        <p class="eyebrow">Données</p>
        <h1>Exports CSV</h1>
    </div>
</section>

<section class="export-grid">
    <?php foreach ($exports as $key => $definition): ?>
        <article class="export-card">
            <div>
                <h2><?= e($definition['label']) ?></h2>
                <p>Exporter les donnees au format CSV compatible Excel.</p>
            </div>
            <a class="button-link" href="<?= url('/exports/download?type=' . $key) ?>">Telecharger</a>
        </article>
    <?php endforeach; ?>

    <?php if (empty($exports)): ?>
        <article class="empty-state">Aucun export disponible pour vos permissions.</article>
    <?php endif; ?>
</section>

<?php require dirname(__DIR__) . '/layouts/app_footer.php'; ?>
