<?= $this->extend('layouts/enterprise') ?>

<?= $this->section('content') ?>

<?= view('partials/workspace_hero', [
    'workspaceCrumbPill'    => 'Reports',
    'workspaceCrumbCurrent' => 'All Reports',
    'workspaceTitle'        => 'Enterprise Reports',
    'workspaceDesc'         => 'Attendance, payroll, sales, inventory, procurement, accounting, and operations reports in one place.',
]) ?>

<?php foreach ($sections as $section): ?>
    <section class="mb-4">
        <div class="d-flex align-items-center gap-2 mb-3">
            <i class="fa-solid <?= esc($section['icon']) ?> text-muted"></i>
            <h2 class="h5 mb-0"><?= esc($section['label']) ?></h2>
        </div>
        <div class="row g-3">
            <?php foreach ($section['items'] as $item): ?>
                <div class="col-md-6 col-xl-4">
                    <div class="enterprise-data-panel h-100">
                        <div class="enterprise-data-panel__head">
                            <h3 class="enterprise-data-panel__title">
                                <i class="fa-solid <?= esc($item['icon']) ?> me-2"></i><?= esc($item['title']) ?>
                            </h3>
                            <p class="enterprise-data-panel__subtitle"><?= esc($item['desc']) ?></p>
                        </div>
                        <div class="enterprise-data-panel__footer">
                            <a href="<?= base_url($item['path']) ?>" class="btn btn-primary btn-sm">Open</a>
                        </div>
                    </div>
                </div>
            <?php endforeach; ?>
        </div>
    </section>
<?php endforeach; ?>

<?= $this->endSection() ?>
